Advertisement
fleft17

Untitled

Nov 26th, 2014
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. # Anti-Portal Trap skript by Fleft
  2. # /antiportaltrip on/off/toggle
  3.  
  4. options:
  5. # chat color used
  6. C: §c
  7.  
  8. # stops lava flow within 5 blocks of portals
  9. on flow:
  10. {AntiPortalTrap} is true
  11. event-block is lava or flowing lava
  12. loop blocks in radius 5 around event-block:
  13. loop-block is portal
  14. cancel the event
  15.  
  16. # prevents lava/fire placement within 5 blocks of portals
  17. on place:
  18. {AntiPortalTrap} is true
  19. event-block is lava or fire
  20. loop blocks in radius 5 around event-block:
  21. loop-block is portal
  22. cancel the event
  23.  
  24.  
  25. # used to remove fire/lava when a player enters a portal
  26. on portal:
  27. {AntiPortalTrap} is true
  28. wait 2 ticks
  29. loop blocks in radius 5 around event-player:
  30. loop-block is lava or fire
  31. set loop-block to air
  32.  
  33. # command
  34. command /antiportaltrap [<text>]:
  35. aliases: /apt
  36. permission: skript.portaltrap
  37. trigger:
  38. if arg-1 is "on" or "enable":
  39. broadcast "{@C}Anti-Portal Trap enabled!"
  40. set {AntiPortalTrap} to true
  41. else if arg-1 is "off" or "disable":
  42. broadcast "{@C}Anti-Portal Trap disabled!"
  43. delete {AntiPortalTrap}
  44. else if arg-1 is "toggle":
  45. if {AntiPortalTrap} is true:
  46. command "/antiportaltrap off"
  47. else:
  48. command "/antiportaltrap on"
  49. else:
  50. message "{@C}/antiportaltrap on/off"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement