Guest User

Backpacks Skript

a guest
Sep 9th, 2014
3,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. command /backpacks [<text>]:
  2. permission: skript.op
  3. trigger:
  4. if arg-1 is "on" or "enable" or "start":
  5. if {backpacks} is 1:
  6. message "<gold>Backpacks is already enabled."
  7. else:
  8. set {backpacks} to 1
  9. broadcast "<gold><b>Backpacks enabled."
  10. if arg-1 is "off" or "disable" or "stop":
  11. if {backpacks} is 0:
  12. message "<gold>Backpacks is already disabled."
  13. else:
  14. set {backpacks} to 0
  15. broadcast "<gold><b>Backpacks disabled."
  16.  
  17. command /bp [<player>]:
  18. trigger:
  19. if {backpacks} is 1:
  20. if player-argument is set:
  21. player is an op
  22. player-argument is online
  23. open player-argument's ender chest to the player
  24. if player-argument is not set:
  25. open the player's ender chest to the player
  26. else:
  27. message "<gold>Backpacks is disabled." to the player
  28.  
  29. command /bpclear [<player>]:
  30. permission: skript.op
  31. trigger:
  32. if {backpacks} is 1:
  33. if player-argument is set:
  34. clear player-argument's ender chest
  35. message "<gold>%player-argument%'s backpack emptied."
  36. else:
  37. loop all players:
  38. clear loop-player's ender chest
  39. broadcast "<gold><b>All backpacks emptied."
  40. else:
  41. message "<gold>Backpacks is disabled." to the player
  42.  
  43. on death:
  44. if {backpacks} is 1:
  45. set {_ender} to the victim's ender chest
  46. set {_deathloc} to the block below the player
  47. set the block at {_deathloc} to a chest
  48. set the inventory of the block at {_deathloc} to {_ender}
  49. set {_signloc} to the location 1 meter south of {_deathloc}
  50. set the block at {_signloc} to a wall sign
  51. set line 1 of the block at {_signloc} to "================="
  52. set line 2 of the block at {_signloc} to "%victim%'s"
  53. set line 3 of the block at {_signloc} to "<b>Backpack"
  54. set line 4 of the block at {_signloc} to "================="
  55. clear victim's ender chest
  56. message "<gold>Your backpack has been emptied." to the victim
Advertisement
Add Comment
Please, Sign In to add comment