fleft17

Untitled

Jun 29th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. variables:
  2. {Moles.version} = "1"
  3.  
  4. options:
  5. P: &8[&bMoles&8]&r
  6.  
  7. command /moles [<text>]:
  8. permission: skript.op
  9. trigger:
  10. if arg 1 is not set:
  11. message "{@P} /moles help"
  12.  
  13. else if arg 1 is equal to "set":
  14.  
  15.  
  16. delete {Mole.IsMole::*}
  17. delete {Mole.MoleOfTeam::*}
  18.  
  19. broadcast "{@P} Moles set by &b%command sender%&r!"
  20. loop all players:
  21. set {isMole.%loop-player%} to false
  22. wait 1 second
  23. loop {Teams::*}:
  24. set {_Mole} to (random element out of {Team.%loop-value%::*})
  25. set {Mole.IsMole::%{_Mole}%} to loop-value
  26. set {Mole.MoleOfTeam::%loop-value%} to {_Mole}
  27.  
  28. set {_MolePlayer} to ("%{_Mole}%" parsed as offlineplayer)
  29. if {_MolePlayer} is online:
  30. message "&eYou are a mole! Use /molekit" to {_MolePlayer}
  31. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  32. set {molekit.%{_MolePlayer}%} to true
  33. set {isMole.%{_MolePlayer}%} to true
  34. set {HasMoleKit.%{_MolePlayer}%} to false
  35.  
  36.  
  37. else if arg 1 is equal to "delete" or "reset":
  38. if command sender does not have the permission "moles.delete":
  39. message "{@P} NOPE!"
  40. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  41.  
  42. delete {Moles.IsMole::*}
  43. delete {Moles.MolesOfTeam::*}
  44. loop all players:
  45. delete {isMole.%loop-player%}
  46. delete {HasMoleKit.%loop-player%}
  47. broadcast "{@P} Reset by %command sender%!"
  48. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  49.  
  50. else if arg is equal to "help":
  51. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  52. message "{@P} Mole Skript v%{Moles.version}% commands:"
  53. message "{@P} /moles set: sets moles"
  54. message "{@P} /moles reset: removes variables, resets moles"
  55.  
  56.  
  57.  
  58. else:
  59. message "{@P} /moles help"
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. on death of player:
  67. if {Moles.IsMole::%player%} is set:
  68. delete {Mole.IsMole::%player%}
  69. delete {isMole:%player%}
  70.  
  71.  
  72. command /molekit [<text>] [<text>]:
  73. trigger:
  74. if {molekit.%command sender%} is true:
  75. {HasMoleKit.%command sender%} is false:
  76. {isMole.%command sender%} is true:
  77. if arg-1 is not set:
  78. message "{@P} Use /molekit list to see the kits!"
  79. if arg-1 is "list":
  80. message "{@P} The mole kits are:"
  81. message "{@P} &91. &rThe Mobber"
  82. message "{@P} &92. &rThe Troll"
  83. message "{@P} &93. &rThe Potter"
  84. message "{@P} &94. &rThe Fighter"
  85. message "{@P} &95. &rThe Trapper"
  86. message "{@P} &96. &rThe Pyro"
  87. message "{@P} Use &9/molekit info&r to learn about each kit!"
  88. message "{@P} Use &9/molekit choose &r<&91&r - &96&r> to get your kit!"
  89.  
  90.  
  91. if arg-1 is "info" or "explain" or "learn":
  92. arg-2 is "1":
  93. message "{@P} The Mobber gets a various assortment of mob spawn eggs." to the command sender
  94. arg-2 is "2":
  95. message "{@P} The Troll gets 16 cobweb as well as 5 TnT and 2 end portal blocks." to the command sender
  96. arg-2 is "3":
  97. message "{@P} The Potter gets a weakness potion, a swiftness potions, and a poison potion." to the command sender
  98. arg-2 is "4":
  99. message "{@P} The Fighter gets a diamond sword, a bow, 64 arrows, and a golden apple." to the command sender
  100. arg-2 is "5":
  101. message "{@P} The Trapper gets 16 TnT, 2 of each type of piston, 64 redstone, and a flint and steel." to the command sender
  102. arg-2 is "6":
  103. message "{@P} The Pyro gets 5 blaze spawn eggs, a flint and steel, a fire resist potion, and 3 TnT." to the command sender
  104. arg-2 is not set:
  105. message "Please specify which kit you'd like to learn about. 1-6."
  106.  
  107. if arg-1 is "select" or "choose" or "pick":
  108. arg-2 is "1" or "Mobber" or "The Mobber":
  109. give player 3 creeper spawn egg
  110. give player 3 spider spawn egg
  111. give player 3 skeleton spawn egg
  112. give player 3 zombie spawn egg
  113. set {molekit.%command sender%} to false
  114. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  115.  
  116. arg-2 is "2" or "Troll" or "The Troll":
  117. give player 16 cobweb
  118. give player 5 TNT
  119. give player 2 end portal
  120. set {molekit.%command sender%} to false
  121. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  122.  
  123. arg-2 is "3" or "Potter" or "The Potter":
  124. give player 1 unextended splash Weakness potion II item
  125. give player 1 potion of:8226
  126. give player 1 potion of:16420
  127. set {molekit.%command sender%} to false
  128. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  129.  
  130. arg-2 is "4" or "Fighter" or "The Fighter":
  131. give player 1 diamond sword
  132. give player 1 bow
  133. give player 1 golden apple
  134. give player 64 arrows
  135. set {molekit.%command sender%} to false
  136. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  137.  
  138. arg-2 is "5" or "Trapper" or "The Trapper":
  139. give player 16 TNT
  140. give player 2 piston
  141. give player 2 sticky piston
  142. give player 64 redstone
  143. give player 1 flint and steel
  144. set {molekit.%command sender%} to false
  145. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  146.  
  147. arg-2 is "6" or "Pyro" or "The Pyro":
  148. give player 5 blaze spawn egg
  149. give player 1 flint and steel
  150. give player 1 potion of:8227
  151. give player 3 TNT
  152. set {molekit.%command sender%} to false
  153.  
  154.  
  155.  
  156. else:
  157. message "{@P} You're not a mole!"
  158.  
  159. if {HasMoleKit.%command sender%} is not set:
  160. if {isMole.%command sender%} is true:
  161. message "{@P} You've already gotten your kit!"
  162.  
  163.  
  164. command /mcc <text>:
  165. usage: /mcc <message>
  166. trigger:
  167. {isMole.%command sender%} is true:
  168. set {_player} to command sender
  169. loop all players:
  170. {isMole.%loop-player%} is true:
  171. message "{@P} &e%command sender%&r: %arg%" to the loop-player
  172. else:
  173. message "{@P} You're not a mole!"
  174.  
  175.  
  176. command /mcl:
  177. usage: /mcl - broadcast location to other moles
  178. trigger:
  179. {isMole.%command sender%} is true:
  180. set {_moleLoc} to the command sender's location
  181. loop all players:
  182. {isMole.%loop-player%} is true:
  183. message "{@P} &e%command sender%&r says: %{_moleLoc}%" to the loop-player
  184.  
  185. else:
  186. message "{@P} You're not a mole!"
  187.  
  188. command /mcp:
  189. usage: /mcp - list mole players alive
  190. trigger:
  191. {isMole.%command sender%} is true:
  192. loop all players:
  193. if {isMole.%loop-player%} is true:
  194. message "{@P} %loop-player% "
  195. else:
  196. message "{@P} You're not a mole!"
  197.  
  198. command /mclist:
  199. usage: /mclist - List all mole players
  200. permission: skript.op
  201. trigger:
  202. if {Mole.MoleOfTeam::*} is not set:
  203. message "{@P} There are no moles"
  204. else:
  205. loop {Mole.MoleOfTeam::*}:
  206. message "{@P} Mole of &9Team %loop-index%§r: %loop-value%" to the command sender
Advertisement
Add Comment
Please, Sign In to add comment