Dancingninjas

Untitled

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