kollinkoko

Team Inventory [SK] (Dancing)

Nov 18th, 2016
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. options:
  2. Pre: &e[&bTeamInv&e]&f
  3.  
  4. command /teaminventory [<text>]:
  5. permission: skript.op
  6. trigger:
  7. if arg-1 is "on":
  8. set {teaminventory} to true
  9. message "{@Pre} Team inventory enabled"
  10. execute player command "team autodelete off"
  11. stop
  12. if arg-1 is "off":
  13. delete {teaminventory}
  14. message "{@Pre} Team inventory disabled"
  15. execute player command "team autodelete on"
  16. stop
  17. if arg-1 is "reset":
  18. loop all players:
  19. clear loop-player's ender chest
  20. delete {teaminv::*}
  21. message "{@Pre} Team inventories reset"
  22. stop
  23. if arg-1 is "help":
  24. message "{@Pre} /teaminventory <&6on&f/&6off&f/&6reset&f>"
  25. stop
  26. else:
  27. execute player command "teaminventory help"
  28.  
  29. command /teaminv:
  30. aliases: /ti
  31. trigger:
  32. if {teaminventory} is true:
  33. if {TeamNumber::%player%} is not set:
  34. open the player's ender chest to the player
  35. stop
  36. else:
  37. if {teaminv::%{TeamNumber::%player%}%} is not set:
  38. open the player's ender chest to the player
  39. set {teaminv::%{TeamNumber::%player%}%} to "%command sender%" parsed as offline player
  40. stop
  41. else:
  42. open {teaminv::%{TeamNumber::%player%}%}'s ender chest to the player
  43. else:
  44. message "Team inventory is disabled"
  45.  
  46. on death of player:
  47. if {teaminventory} is true:
  48. if {TeamNumber::%victim%} is not set:
  49. set {_ender} to the victim's ender chest
  50. set {_deathloc} to the block above the victim
  51. set the block at {_deathloc} to a chest
  52. set the inventory of the block at {_deathloc} to {_ender}
  53. stop
  54. else:
  55. if size of {Team.%{TeamNumber::%victim%}%::*} is greater than 1:
  56. execute console command "/team kick %victim%"
  57. stop
  58. else:
  59. set {_ender} to {teaminv::%{TeamNumber::%victim%}%}'s ender chest
  60. set {_deathloc} to the block above the victim
  61. set the block at {_deathloc} to a chest
  62. set the inventory of the block at {_deathloc} to {_ender}
Advertisement
Add Comment
Please, Sign In to add comment