Shell_Guy_

Potential Moles

Apr 24th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.40 KB | None | 0 0
  1. #THIS SKRIPT DEPENDS ON
  2. #THE D4 TEAM MANAGER
  3.  
  4. # Welcome to Moles Skript v2!
  5. # Thanks to bitlington for the initial push with the first version.
  6. options:
  7. P: &8[&bMoles&8]&r
  8.  
  9. command /moles [<text>] [<integer>]:
  10. permission: skript.op
  11. trigger:
  12. if arg-1 is not set:
  13. message "{@P} /moles help"
  14.  
  15. else if arg-1 is equal to "set":
  16. if command sender does not have the permission "moles.set":
  17. message "{@P} NOPE!"
  18. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  19. stop trigger
  20.  
  21. set {Mole} to true
  22.  
  23. delete {Mole.IsMole::*}
  24. delete {Mole.MoleOfTeam::*}
  25. delete {Mole.Moles::*}
  26.  
  27. loop all players:
  28. set {isMole.%loop-player%} to false
  29.  
  30. if arg-2 is not set:
  31. set {_MoleAmount} to 1
  32.  
  33. if arg-2 is set:
  34. set {_MoleAmount} to arg-2
  35.  
  36. loop {Teams::*}:
  37. set {_potMoles::*} to {Team.%loop-value%::*}
  38. loop {_MoleAmount} times:
  39. set {_Mole} to (random element out of {_potMoles::*})
  40. remove {_Mole} from {_potMoles::*}
  41. chance of 50%:
  42. set {Mole.IsMole::%{_Mole}%} to loop-value
  43. set {Mole.MoleOfTeam::%loop-value%} to {_Mole}
  44. add {_Mole} to {Mole.Moles::*}
  45. set {_MolePlayer} to ("%{_Mole}%" parsed as offlineplayer)
  46. if {_MolePlayer} is online:
  47. message "&eYou are a mole! Use /molekit" to {_MolePlayer}
  48. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  49. set {molekit.%{_MolePlayer}%} to true
  50. set {isMole.%{_MolePlayer}%} to true
  51. set {HasMoleKit.%{_MolePlayer}%} to false
  52.  
  53. broadcast "{@P} Set &b&l%{_MoleAmount}%&r Mole per team by &b&l%command sender%!"
  54. delete {_potMoles::*}
  55.  
  56. else if arg-1 is equal to "delete" or "reset":
  57. if command sender does not have the permission "moles.delete":
  58. message "{@P} NOPE!"
  59. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  60. stop trigger
  61.  
  62. set {Mole} to false
  63.  
  64. delete {Moles.IsMole::*}
  65. delete {Moles.MolesOfTeam::*}
  66. loop {Mole.Moles::*}:
  67. delete {isMole.%loop-value%}
  68. delete {HasMoleKit.%loop-value%}
  69. delete {molekit.%loop-value%}
  70. delete {Mole.Moles::*}
  71.  
  72. broadcast "{@P} Reset by &b&l%command sender%!"
  73. loop all players:
  74. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  75.  
  76.  
  77. else if arg-1 is equal to "list" or "show":
  78. if command sender does not have the permission "moles.list":
  79. message "{@P} NOPE!"
  80. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  81. stop trigger
  82.  
  83.  
  84. if {Mole.Moles::*} is not set:
  85. message "{@P} There are no moles!"
  86. else:
  87. message "{@P} %{Mole.Moles::*}%"
  88.  
  89. else if arg-1 is equal to "help":
  90. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  91. message "{@P} Mole Skript v1.1 commands:"
  92. message "{@P} /moles set <amount>: sets moles"
  93. message "{@P} /moles reset: removes variables, resets moles"
  94. message "{@P} /moles list: lists all moles"
  95.  
  96.  
  97. else:
  98. message "{@P} /moles help"
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. on death of player:
  106. if {Moles} is true:
  107. if {Moles.IsMole::%player%} is set:
  108. delete {Mole.IsMole::%player%}
  109. delete {isMole:%player%}
  110.  
  111.  
  112. command /molekit [<text>] [<text>]:
  113. trigger:
  114. if {molekit.%command sender%} is true:
  115. {HasMoleKit.%command sender%} is false:
  116. {isMole.%command sender%} is true:
  117. if arg-1 is not set:
  118. message "{@P} Use /molekit list to see the kits!"
  119. if arg-1 is "list":
  120. message "{@P} The mole kits are:"
  121. message "{@P} &91. &rThe Mobber"
  122. message "{@P} &92. &rThe Troll"
  123. message "{@P} &93. &rThe Potter"
  124. message "{@P} &94. &rThe Fighter"
  125. message "{@P} &95. &rThe Trapper"
  126. message "{@P} &96. &rThe Pyro"
  127. message "{@P} &97. &rThe Tank"
  128. message "{@P} &98. &rThe Horse Rider"
  129. message "{@P} &99. &rThe Enchanter"
  130. message "{@P} &910. &rThe Wolf Tamer"
  131. message "{@P} Use &9/molekit info&r to learn about each kit!"
  132. message "{@P} Use &9/molekit choose &r<&91&r - &910&r> to get your kit!"
  133.  
  134.  
  135. if arg-1 is "info" or "explain" or "learn":
  136. arg-2 is "1":
  137. message "{@P} The Mobber gets a various assortment of mob spawn eggs." to the command sender
  138. arg-2 is "2":
  139. message "{@P} The Troll gets 16 cobweb as well as 5 TnT and 2 end portal blocks." to the command sender
  140. arg-2 is "3":
  141. message "{@P} The Potter gets a weakness potion, a swiftness potions, and a poison potion." to the command sender
  142. arg-2 is "4":
  143. message "{@P} The Fighter two diamonds, 4 sticks, 3 string, 64 arrows, and a golden apple." to the command sender
  144. arg-2 is "5":
  145. message "{@P} The Trapper gets 16 TnT, 2 of each type of piston, 64 redstone, and a flint and steel." to the command sender
  146. arg-2 is "6":
  147. message "{@P} The Pyro gets 5 blaze spawn eggs, a flint and steel, a fire resist potion, and 3 TnT." to the command sender
  148. arg-2 is "7":
  149. message "{@P} The Tank gets a full set of diamond armor with 5 durability left." to the command sender
  150. arg-2 is "8":
  151. message "{@P} The Horse rider gets a horse spawn egg, a saddle, horse armor, and sugar." to the command sender
  152. arg-2 is "9":
  153. message "{@P} The Enchanter gets the ingredients to make an enchantment table and EXP bottles." to the command sender
  154. arg-2 is "10":
  155. message "{@P} The Wolf Tamer gets 10 wolf spawn eggs and a stack of bones." to the command sender
  156. arg-2 is not set:
  157. message "Please specify which kit you'd like to learn about. 1-10."
  158.  
  159. if arg-1 is "select" or "choose" or "pick":
  160.  
  161. arg-2 is "1" or "Mobber" or "The Mobber":
  162. give player 3 creeper spawn egg
  163. give player 3 spider spawn egg
  164. give player 3 skeleton spawn egg
  165. give player 3 zombie spawn egg
  166. set {molekit.%command sender%} to false
  167. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  168.  
  169. arg-2 is "2" or "Troll" or "The Troll":
  170. give player 16 cobweb
  171. give player 5 TNT
  172. give player 2 end portal
  173. set {molekit.%command sender%} to false
  174. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  175.  
  176. arg-2 is "3" or "Potter" or "The Potter":
  177. give player 1 unextended splash Weakness potion II item
  178. give player 1 potion of:8226
  179. give player 1 potion of:16420
  180. set {molekit.%command sender%} to false
  181. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  182.  
  183. arg-2 is "4" or "Fighter" or "The Fighter":
  184. give player 2 diamonds
  185. give player 3 string
  186. give player 4 sticks
  187. give player 1 golden apple
  188. give player 64 arrows
  189. set {molekit.%command sender%} to false
  190. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  191.  
  192. arg-2 is "5" or "Trapper":
  193. give player 16 TNT
  194. give player 2 piston
  195. give player 2 sticky piston
  196. give player 64 redstone
  197. give player 1 flint and steel
  198. set {molekit.%command sender%} to false
  199. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  200.  
  201. arg-2 is "6" or "Pyro" or "The Pyro":
  202. give player 5 blaze spawn egg
  203. give player 1 flint and steel
  204. give player 1 potion of:8227
  205. give player 3 TNT
  206. set {molekit.%command sender%} to false
  207. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  208.  
  209. arg-2 is "7" or "Tank":
  210. set {_helmet} to a diamond helmet
  211. set the data value of {_helmet} to 523
  212. give player 1 of {_helmet}
  213. set {_chestplate} to a diamond chestplate
  214. set the data value of {_chestplate} to 523
  215. give player 1 of {_chestplate}
  216. set {_leggings} to diamond leggings
  217. set the data value of {_leggings} to 523
  218. give player 1 of {_leggings}
  219. set {_boots} to diamond boots
  220. set the data value of {_boots} to 523
  221. give player 1 of {_boots}
  222. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  223.  
  224. arg-2 is "8" or "Horse" or "Horseman":
  225. give player 1 horse spawn egg
  226. give player 1 saddle
  227. give player 10 sugar
  228. give player 1 gold horse armor
  229. set {molekit.%command sender%} to false
  230. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  231.  
  232. arg-2 is "9" or "Enchant" or "Enchanter" or "Enchanting":
  233. give player 4 obsidian
  234. give player 2 diamonds
  235. give player 1 book
  236. give player 10 experience bottles
  237. set {molekit.%command sender%} to false
  238. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  239.  
  240. arg-2 is "10" or "Wolf" or "Wolves":
  241. give player 10 wolf spawn eggs
  242. give player 64 bones
  243. set {molekit.%command sender%} to false
  244. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  245.  
  246. else:
  247. message "{@P} You're not a mole!"
  248.  
  249. if {HasMoleKit.%command sender%} is not set:
  250. if {isMole.%command sender%} is true:
  251. message "{@P} You've already gotten your kit!"
  252.  
  253.  
  254. command /mcc <text>:
  255. usage: /mcc <message>
  256. trigger:
  257. {isMole.%command sender%} is true:
  258. set {_player} to command sender
  259. loop all players:
  260. {isMole.%loop-player%} is true:
  261. message "{@P} &e%command sender%&r: %arg%" to the loop-player
  262. else:
  263. message "{@P} You're not a mole!"
  264.  
  265.  
  266. command /mcl:
  267. usage: /mcl - broadcast location to other moles
  268. trigger:
  269. {isMole.%command sender%} is true:
  270. set {_moleLoc} to the command sender's location
  271. loop all players:
  272. {isMole.%loop-player%} is true:
  273. message "{@P} &9%command sender%'s coords are:&r %{_moleLoc}%" to the loop-player
  274.  
  275. else:
  276. message "{@P} You're not a mole!"
  277.  
  278. command /mcp:
  279. usage: /mcp - list mole players alive
  280. trigger:
  281. {isMole.%command sender%} is true:
  282. loop all players:
  283. if {isMole.%loop-player%} is true:
  284. message "{@P} %loop-player% "
  285. else:
  286. message "{@P} You're not a mole!"
  287.  
  288.  
  289.  
  290.  
  291. on death of player:
  292. if {Mole} is true:
  293. execute console command "/team leave %player%"
  294.  
  295.  
  296. on join:
  297. if {Moles} is true:
  298. if {isMole.%player%} is true:
  299. message "{@P} You're a mole!"
  300.  
  301. if {HasMoleKit.%player%} is false:
  302. message "{@P} Hey! Use your /molekit!"
Advertisement
Add Comment
Please, Sign In to add comment