Entities

Untitled

Apr 4th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. command /backpack [<number>] [<offline player>]:
  2. trigger:
  3. if argument 1 isn't set:
  4. message "&cIncorrest usage:"
  5. if {staffuser.%player's uuid%} is true:
  6. message "&c/backpack <number> [player]"
  7. else:
  8. message "&c/backpack <number>"
  9.  
  10. else if argument 1 is set:
  11. if argument 2 is set:
  12. if {staffuser.%player's uuid%} is false:
  13. make player execute "backpack"
  14.  
  15. else:
  16. set {backpack.open.%player%} to arg 1
  17. set {backpack.open.else.%player%} to arg 2
  18. open chest with 6 rows named "&c%arg 2%'s &c&lBACKPACK" to player
  19. wait 1 tick
  20. set {_num} to 0
  21. loop {backpack.item.%arg 1%.%arg 2%::*}:
  22. set slot {_num} of player's current inventory to loop-value
  23. add 1 to {_num}
  24. else:
  25. if player doesn't have permission "server.backpack.%arg 1%":
  26. send "&cYou don't have permission to open backpack %arg 1%"
  27. else:
  28. set {backpack.open.%player%} to arg 1
  29. open chest with 6 rows named "&c&lBACKPACK" to player
  30. wait 1 tick
  31. set {_num} to 0
  32. loop {backpack.item.%arg 1%.%player%::*}:
  33. if {backpack.open.%player%} is set:
  34. set slot {_num} of player's current inventory to loop-value
  35. add 1 to {_num}
  36.  
  37. on rightclick on chest:
  38. if {backpack.open.%player%} is set:
  39. cancel event
  40. delete {backpack.open.%player%}
  41.  
  42. on inventory close:
  43. if {backpack.open.%player%} is set:
  44. if {backpack.open.else.%player%} is set:
  45. if inventory name of player's current inventory contains "'s &c&lBACKPACK":
  46. loop 54 times:
  47. set {backpack.item.%{vaults.open.%player%}%.%{backpack.open.else.%player%}%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
  48. delete {backpack.open.%player%}
  49. delete {backpack.open.else.%player%}
  50. else:
  51. if inventory name of player's current inventory contains "&c&lBACKPACK":
  52. loop 54 times:
  53. set {backpack.item.%{backpack.open.%player%}%.%player%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
  54. delete {backpack.open.%player%}
  55.  
  56. command /rankup:
  57. trigger:
  58. if {level.%player's uuid%} isn't 100:
  59. if {points.%player's uuid%} > {rankcost.%player's uuid%}:
  60. add 1 to {level.%player's uuid%}
  61. remove {rankcost.%player's uuid%} from {points.%player's uuid%}
  62. add 50000 to {rankcost.%player's uuid%}
  63. message "&cyou've ranked up to %{level.%player's uuid%}%"
  64. else:
  65. message "&cInsufficent currency:"
  66. message ""
  67. message "&cYour points: %{points.%player's uuid%}%"
  68. message "&cRequired points: &l%{rankcost.%player's uuid%}%"
  69. else:
  70. message "&cYou are level 100"
  71.  
  72. on block break:
  73. if player have permission "server.2x2"
  74. if player is holding a pickaxe with lore "&72x2 Pickaxe":
  75. loop blocks in radius 2 of event-block:
  76. if loop-block is cobblestone or stone or any ore:
  77. add loop-block to {2x2.pickaxe.%player%::*}
  78. loop {2x2.pickaxe.%player%::*}:
  79. drop loop-value
  80. set loop-block to air
  81. on block break:
  82. if player have permission "server.explosive":
  83. if player is holding a pickaxe with lore "&7Explosive Pickaxe":
  84. set {r adius} to a random integer between 2 and 5
  85. loop blocks in radius {radius} of event-block:
  86. if loop-block is cobblestone or stone or any ore:
  87. add loop-block to {explosive.pickaxe.%player%::*}
  88. loop {explosive.pickaxe.%player%::*}:
  89. drop loop-value
  90. set loop-block to air
  91.  
  92. on right click holding tnt named "&cBomb":
  93. loop 25 times:
  94. make player shoot snowball at speed 2
  95. add north, south, east, west, up and down to {direction of bomb::*}
  96. loop 3 times:
  97. remove random element out of {direction of bomb::*} from {direction of bomb::*}
  98. loop {direction of bomb::*}:
  99. push last shot projectile loop-value-2 at speed random number between 0.05 and 0.1
  100.  
  101. on projectile hit:
  102. create a explosion at the event-location
Add Comment
Please, Sign In to add comment