Advertisement
fleft17

Untitled

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