Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.23 KB | None | 0 0
  1. command /storeinv <player> [<player>] [<player>]:
  2. trigger:
  3. if arg-2 is not set:
  4. set {_slot} to 0
  5. set {_player} to arg-1
  6. loop 36 times:
  7. clear {theslot.%{_slot}%.%{_player}%}
  8. add 1 to {_slot}
  9. set {_slot} to 0
  10. loop 36 times:
  11. set {theslot.%{_slot}%.%{_player}%} to slot {_slot} of {_player}'s inventory
  12. add 1 to {_slot}
  13. set {thehelm.%{_player}%} to helmet of {_player}
  14. set {thechest.%{_player}%} to chestplate of {_player}
  15. set {thelegs.%{_player}%} to leggings of {_player}
  16. set {theboots.%{_player}%} to boots of {_player}
  17. message "&7%{_player}%'s inventory has been stored."
  18. stop
  19. if arg-2 is set:
  20. if arg-3 is not set:
  21. set {_slot} to 0
  22. set {_player1} to arg-1
  23. set {_player2} to arg-2
  24. loop 36 times:
  25. clear {theslot.%{_slot}%.%{_player1}%}
  26. clear {theslot.%{_slot}%.%{_player2}%}
  27. add 1 to {_slot}
  28. set {_slot} to 0
  29. loop 36 times:
  30. set {theslot.%{_slot}%.%{_player1}%} to slot {_slot} of {_player1}'s inventory
  31. set {theslot.%{_slot}%.%{_player2}%} to slot {_slot} of {_player2}'s inventory
  32. add 1 to {_slot}
  33. clear {thehelm.%{_player1}%}
  34. clear {thechest.%{_player1}%}
  35. clear {thelegs.%{_player1}%}
  36. clear {theboots.%{_player1}%}
  37. clear {thehelm.%{_player2}%}
  38. clear {thechest.%{_player2}%}
  39. clear {thelegs.%{_player2}%}
  40. clear {theboots.%{_player2}%}
  41. set {thehelm.%{_player1}%} to helmet of {_player1}
  42. set {thechest.%{_player1}%} to chestplate of {_player1}
  43. set {thelegs.%{_player1}%} to leggings of {_player1}
  44. set {theboots.%{_player1}%} to boots of {_player1}
  45. set {thehelm.%{_player2}%} to helmet of {_player2}
  46. set {thechest.%{_player2}%} to chestplate of {_player2}
  47. set {thelegs.%{_player2}%} to leggings of {_player2}
  48. set {theboots.%{_player2}%} to boots of {_player2}
  49. message "&7%{_player1}%'s and %{_player2}%'s inventories has been stored."
  50. stop
  51. if arg-3 is set:
  52. set {_slot} to 0
  53. set {_player1} to arg-1
  54. set {_player2} to arg-2
  55. set {_player3} to arg-3
  56. loop 36 times:
  57. clear {theslot.%{_slot}%.%{_player1}%}
  58. clear {theslot.%{_slot}%.%{_player2}%}
  59. clear {theslot.%{_slot}%.%{_player3}%}
  60. add 1 to {_slot}
  61. set {_slot} to 0
  62. loop 36 times:
  63. set {theslot.%{_slot}%.%{_player1}%} to slot {_slot} of {_player1}'s inventory
  64. set {theslot.%{_slot}%.%{_player2}%} to slot {_slot} of {_player2}'s inventory
  65. set {theslot.%{_slot}%.%{_player3}%} to slot {_slot} of {_player3}'s inventory
  66. add 1 to {_slot}
  67. clear {thehelm.%{_player1}%}
  68. clear {thechest.%{_player1}%}
  69. clear {thelegs.%{_player1}%}
  70. clear {theboots.%{_player1}%}
  71. clear {thehelm.%{_player2}%}
  72. clear {thechest.%{_player2}%}
  73. clear {thelegs.%{_player2}%}
  74. clear {theboots.%{_player2}%}
  75. clear {thehelm.%{_player3}%}
  76. clear {thechest.%{_player3}%}
  77. clear {thelegs.%{_player3}%}
  78. clear {theboots.%{_player3}%}
  79. set {thehelm.%{_player1}%} to helmet of {_player1}
  80. set {thechest.%{_player1}%} to chestplate of {_player1}
  81. set {thelegs.%{_player1}%} to leggings of {_player1}
  82. set {theboots.%{_player1}%} to boots of {_player1}
  83. set {thehelm.%{_player2}%} to helmet of {_player2}
  84. set {thechest.%{_player2}%} to chestplate of {_player2}
  85. set {thelegs.%{_player2}%} to leggings of {_player2}
  86. set {theboots.%{_player2}%} to boots of {_player2}
  87. set {thehelm.%{_player3}%} to helmet of {_player3}
  88. set {thechest.%{_player3}%} to chestplate of {_player3}
  89. set {thelegs.%{_player3}%} to leggings of {_player3}
  90. set {theboots.%{_player3}%} to boots of {_player3}
  91. message "&7%{_player1}%'s, %{_player2}%'s and %{_player3}%'s inventories has been stored."
  92. stop
  93.  
  94. command /unstoreinv <player> [<player>] [<player>]:
  95. trigger:
  96. if arg-2 is not set:
  97. set {_slot} to 0
  98. set {_player} to arg-1
  99. loop 36 times:
  100. set slot {_slot} of {_player} to {theslot.%{_slot}%.%{_player}%}
  101. delete {theslot.%{_slot}%.%{_player}%}
  102. add 1 to {_slot}
  103. equip {_player} with {theboots.%{_player}%}
  104. equip {_player} with {thechest.%{_player}%}
  105. equip {_player} with {thechest.%{_player}%}
  106. equip {_player} with {thehelm.%{_player}%}
  107. delete {thehelm.%{_player}%}
  108. delete {thechest.%{_player}%}
  109. delete {thelegs.%{_player}%}
  110. delete {theboots.%{_player}%}
  111. message "&7%{_player}%'s inventory has been restored."
  112. stop
  113. if arg-2 is set:
  114. if arg-3 is not set:
  115. set {_slot} to 0
  116. set {_player1} to arg-1
  117. set {_player2} to arg-2
  118. loop 36 times:
  119. set slot {_slot} of {_player1} to {theslot.%{_slot}%.%{_player1}%}
  120. set slot {_slot} of {_player2} to {theslot.%{_slot}%.%{_player2}%}
  121. delete {theslot.%{_slot}%.%{_player1}%}
  122. delete {theslot.%{_slot}%.%{_player2}%}
  123. add 1 to {_slot}
  124. equip {_player1} with {theboots.%{_player1}%}
  125. equip {_player1} with {thechest.%{_player1}%}
  126. equip {_player1} with {thelegs.%{_player1}%}
  127. equip {_player1} with {thehelm.%{_player1}%}
  128. equip {_player2} with {theboots.%{_player2}%}
  129. equip {_player2} with {thechest.%{_player2}%}
  130. equip {_player2} with {thelegs.%{_player2}%}
  131. equip {_player2} with {thehelm.%{_player2}%}
  132. delete {thehelm.%{_player1}%}
  133. delete {thechest.%{_player1}%}
  134. delete {thelegs.%{_player1}%}
  135. delete {theboots.%{_player1}%}
  136. delete {thehelm.%{_player2}%}
  137. delete {thechest.%{_player2}%}
  138. delete {thelegs.%{_player2}%}
  139. delete {theboots.%{_player2}%}
  140. message "&7%{_player1}%'s and %{_player2}%'s inventories has been restored."
  141. stop
  142. if arg-3 is set:
  143. set {_slot} to 0
  144. set {_player1} to arg-1
  145. set {_player2} to arg-2
  146. set {_player3} to arg-3
  147. loop 36 times:
  148. set slot {_slot} of {_player1} to {theslot.%{_slot}%.%{_player1}%}
  149. set slot {_slot} of {_player2} to {theslot.%{_slot}%.%{_player2}%}
  150. set slot {_slot} of {_player3} to {theslot.%{_slot}%.%{_player3}%}
  151. delete {theslot.%{_slot}%.%{_player1}%}
  152. delete {theslot.%{_slot}%.%{_player2}%}
  153. delete {theslot.%{_slot}%.%{_player3}%}
  154. add 1 to {_slot}
  155. equip {_player1} with {theboots.%{_player1}%}
  156. equip {_player1} with {thechest.%{_player1}%}
  157. equip {_player1} with {thelegs.%{_player1}%}
  158. equip {_player1} with {thehelm.%{_player1}%}
  159. equip {_player2} with {theboots.%{_player2}%}
  160. equip {_player2} with {thechest.%{_player2}%}
  161. equip {_player2} with {thelegs.%{_player2}%}
  162. equip {_player2} with {thehelm.%{_player2}%}
  163. equip {_player3} with {theboots.%{_player3}%}
  164. equip {_player3} with {thechest.%{_player3}%}
  165. equip {_player3} with {thethelegs.%{_player3}%}
  166. equip {_player3} with {thehelm.%{_player3}%}
  167. delete {thehelm.%{_player1}%}
  168. delete {thechest.%{_player1}%}
  169. delete {thelegs.%{_player1}%}
  170. delete {theboots.%{_player1}%}
  171. delete {thehelm.%{_player2}%}
  172. delete {thechest.%{_player2}%}
  173. delete {thelegs.%{_player2}%}
  174. delete {theboots.%{_player2}%}
  175. delete {thehelm.%{_player3}%}
  176. delete {thechest.%{_player3}%}
  177. delete {thelegs.%{_player3}%}
  178. delete {theboots.%{_player3}%}
  179. message "&7%{_player1}%'s, %{_player2}%'s and %{_player3}%'s inventories has been restored."
  180. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement