Jump to content

DevDav

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by DevDav

  1. The players in an smp I play on want the dragon egg to not be able to go inside any containers, and to preferably also be indestructible, but I'm having problems figuring out how to do this. So, does anyone know how to make it so the dragon egg can't be put into any container such as a chest, barrel, or enderchest? The only inventory it should ever be in is the player's. So far I've only found out how to stop it from going into hoppers. on inventory pickup: if event-item is dragon egg: cancel event I would also like it to be indestructible, but so far I've only found out how to disable it from despawning. on item despawn of dragon egg: cancel event This is good, but it should also be immune to explosions, fire, cacti, anvils, and the void. I reckon I could partly do this by detecting when the dragon egg is dropped (probably by using "on item spawn of dragon egg:") then setting the nbt data of the entity to have insanely high health, but I have no idea how to do this, and it may not work for cacti nor the void. If the egg falls into the void, I would like it to be teleported back to the end portal as well. I don't want to bother the server host by asking him to download an addon for Skript, so I would like it to be possible using only vanilla Skript, but I understand if that's too hard or impossible to do. In any case, I would greatly appreciate any help, thanks!
  2. Hi, on my SMP server, whenever you respawn you gain resistance at level 255 for 10 minutes as a sort of "grace period". Now I have this working jolly good and exactly how I want it to, but I also realized that someone could abuse this grace period by unfairly PVPing someone while they are invulnerable. So to remedy this, I need a way to disable fighting other players for any player who is in the grace period. I thought I could do this by checking if a player has resistance at tier 255, and while I can check if a player has resistance, I can't seem to figure out how to check what tier the effect is on! So I ended up making this Skript: on damage of a player: if attacker is a player: loop active potion effects of attacker: if type of loop-potion effect is resistance: cancel event And it works, the only problem is, without a way to check the tier of the resistance effect this also disables PVPing for players with resistance through a beacon or turtle master potion or any other legit method, which is unideal. Could anyone help me with this problem? How do you check the tier of a player's active potion effect? Thanks in advance.
  3. Wow, thanks so much! I had no idea that effect existed. (I'm still really new to Skript.) Still - I wonder why my original Skript didn't work, (who knows, maybe it's a bug with Skript itself...) but this works great for me in any case. Thanks again!
  4. Hey there, so in my survival server I wanted to use a Skript so that when evokers drop a totem of undying, it is immediately destroyed so no one can get any totems. So I came up with a simple command that would destroy all totems: /kill @e[type=item,name="Totem of Undying"] I then dropped a totem on the floor, ran the command, and it worked perfectly! Next I created a Skript that would use this command and automatically run it when a totem of undying spawned in the world. This is what I wrote: on item spawn of totem of undying: wait 1 tick execute console command "/kill @e[type=item,name="Totem of Undying"]" But for some reason this doesn't work! Here's a screenshot of the error I got: What's really weird is that when I do this: on item spawn of totem of undying: wait 1 tick execute console command "/kill @e[type=item]" It works fine, but obviously I don't want it to delete all items. It just seems like when I add the name Skript can't understand the command. Can someone tell me what I'm doing wrong and how to fix it, or another solution to my problem? I would really appreciate it, thanks!
×
×
  • Create New...