Advertisement
Randall123459

Moles

Jan 5th, 2017
1,159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.20 KB | None | 0 0
  1. options:
  2. P: &f[&bMoles&f]&f
  3.  
  4. command /moles [<text>] [<integer>]:
  5. permission: skript.op
  6. trigger:
  7. if arg-1 is not set:
  8. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  9. message "{@P} /moles set <amount>: sets moles"
  10. message "{@P} /moles reset: removes variables, resets moles"
  11. message "{@P} /moles list: lists all moles"
  12. else if arg-1 is equal to "set":
  13. if command sender does not have the permission "moles.set":
  14. message "{@P} NOPE!"
  15. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  16. stop trigger
  17. set {Mole} to true
  18. delete {Mole.IsMole::*}
  19. delete {Mole.MoleOfTeam::*}
  20. delete {Mole.Moles::*}
  21. loop all players:
  22. set {isMole.%loop-player%} to false
  23. if arg-2 is not set:
  24. set {_MoleAmount} to 1
  25. if arg-2 is set:
  26. set {_MoleAmount} to arg-2
  27. loop {Teams::*}:
  28. set {_potMoles::*} to {Team.%loop-value%::*}
  29. loop {_MoleAmount} times:
  30. set {_Mole} to (random element out of {_potMoles::*})
  31. remove {_Mole} from {_potMoles::*}
  32. set {Mole.IsMole::%{_Mole}%} to loop-value-2
  33. set {Mole.MoleOfTeam::%loop-value-2%} to {_Mole}
  34. add {_Mole} to {Mole.Moles::*}
  35. set {_MolePlayer} to ("%{_Mole}%" parsed as offlineplayer)
  36. if {_MolePlayer} is online:
  37. message "&eYou are a mole! Use /molekit" to {_MolePlayer}
  38. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  39. set {molekit.%{_MolePlayer}%} to true
  40. set {isMole.%{_MolePlayer}%} to true
  41. set {HasMoleKit.%{_MolePlayer}%} to false
  42. broadcast "{@P} &f%{_MoleAmount}% mole(s) has been set per team by %command sender%!"
  43. delete {_potMoles::*}
  44. else if arg-1 is equal to "delete" or "reset":
  45. if command sender does not have the permission "moles.delete":
  46. message "{@P} NOPE!"
  47. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  48. stop trigger
  49. set {Mole} to false
  50. delete {Moles.IsMole::*}
  51. delete {Moles.MolesOfTeam::*}
  52. loop {Mole.Moles::*}:
  53. delete {isMole.%loop-value%}
  54. delete {HasMoleKit.%loop-value%}
  55. delete {molekit.%loop-value%}
  56. delete {Mole.Moles::*}
  57. broadcast "{@P} is now Disabled"
  58. loop all players:
  59. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  60. else if arg-1 is equal to "list" or "show":
  61. if command sender does not have the permission "moles.list":
  62. message "{@P} NOPE!"
  63. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  64. stop trigger
  65. if {Mole.Moles::*} is not set:
  66. message "{@P} There are no moles!"
  67. else:
  68. message "{@P} %{Mole.Moles::*}%"
  69. else:
  70. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  71. message "{@P} /moles set <amount>: sets moles"
  72. message "{@P} /moles reset: removes variables, resets moles"
  73. message "{@P} /moles list: lists all moles"
  74.  
  75. on death of player:
  76. if {Moles} is true:
  77. if {Moles.IsMole::%player%} is set:
  78. delete {Mole.IsMole::%player%}
  79. delete {isMole:%player%}
  80.  
  81. command /molehelp:
  82. usage: /molehelp
  83. trigger:
  84. message "{@P} Use the command /mcc or /molechat to speak to your fellow moles"
  85. message "{@P} Use the command /mcl or /moleloc to tell your fellow moles where you are"
  86. message "{@P} Use the command /mcp or /molelist to find out who your fellow moles are"
  87.  
  88. command /mcc <text>:
  89. aliases: /molechat
  90. usage: /mcc <message>
  91. trigger:
  92. {isMole.%command sender%} is true:
  93. set {_player} to command sender
  94. loop all players:
  95. {isMole.%loop-player%} is true:
  96. message "{@P} &e%command sender%&r: %arg%" to the loop-player
  97. else:
  98. message "{@P} You're not a mole!"
  99.  
  100. command /mcl:
  101. aliases: /moleloc
  102. usage: /mcl - broadcast location to other moles
  103. trigger:
  104. {isMole.%command sender%} is true:
  105. set {_moleLoc} to the command sender's location
  106. loop all players:
  107. {isMole.%loop-player%} is true:
  108. message "{@P} &9%command sender%'s coords are:&r %{_moleLoc}%" to the loop-player
  109. else:
  110. message "{@P} You're not a mole!"
  111.  
  112. command /mcp:
  113. aliases: /molelist
  114. usage: /mcp - list mole players alive
  115. trigger:
  116. {isMole.%command sender%} is true:
  117. loop all players:
  118. if {isMole.%loop-player%} is true:
  119. message "{@P} %loop-player% "
  120. else:
  121. message "{@P} You're not a mole!"
  122.  
  123. on death of player:
  124. if {Mole} is true:
  125. execute console command "/team leave %player%"
  126.  
  127. on join:
  128. if {Moles} is true:
  129. if {isMole.%player%} is true:
  130. message "{@P} You're a mole!"
  131. if {HasMoleKit.%player%} is false:
  132. message "{@P} Hey! Use your /molekit!"
  133.  
  134. command /molekit:
  135. trigger:
  136. if {isMole.%player%} is true:
  137. if {HasMoleKit.%player%} is false:
  138. set {_chestplate} to a diamond chestplate
  139. set the data value of {_chestplate} to 523
  140. wait 3 ticks
  141. open chest with 1 rows named "&aMole Kit &8»" to player
  142. format slot 0 of player with cobweb named "&eThe Troll:" with lore " 16 Cobwebs || 5 TNT || 1 Flint And Steel" to close then run "sudo %player% /moletroll"
  143. format slot 1 of player with potion of:8226 with no nbt named "&eThe Potter:" with lore " 1 Speed 2 Potion || 1 Splash Potion Of Weakness || 1 Splash Potion Of Poison 2" to close then run "sudo %player% /molepotter"
  144. format slot 2 of player with diamond sword with no nbt named "&eThe Fighter:" with lore " 1 Diamond Sword || 1 Golden Apple || 1 Fishing Rod" to close then run "sudo %player% /molefighter"
  145. format slot 3 of player with tnt named "&eThe Trapper:" with lore " 16 TNT || 2 Of Each Piston || 1 Flint and Steel" to close then run "sudo %player% /moletrapper"
  146. format slot 4 of player with blaze spawn egg named "&eThe Pyro:" with lore " 5 Blaze Spawn Eggs || 1 Fire Resistance Potion || 3 TNT" to close then run "sudo %player% /molepyro"
  147. format slot 5 of player with {_chestplate} with no nbt named "&eThe Tank:" with lore " 1 of each part of Diamond gear with 5 duribility left" to close then run "sudo %player% /moletank"
  148. format slot 6 of player with enchantment_table named "&eThe Enchanter:" with lore " 1 Enchanting Table || 64 Experience Bottles || 64 Lapis" to close then run "sudo %player% /moleenchanter"
  149. format slot 7 of player with golden apple named "&eThe Healer:" with lore " 2 Golden Apples || 1 Healing Potion || 1 Splash Healing Potion" to close then run "sudo %player% /molehealer"
  150. format slot 8 of player with bow named "&eThe Projectile:" with lore " 1 Bow || 64 Arrows || 1 Fishing Rod" to close then run "sudo %player% /moleprojectile"
  151. else:
  152. message "{@P} You already have your mole kit"
  153. else:
  154. message "{@P} You are not the mole"
  155.  
  156. command /moletroll:
  157. trigger:
  158. wait 3 ticks
  159. open chest with 1 rows named "&aMole Kit &8» &eTroll" to player
  160. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the troll kit" to close then run "sudo %player% /moletrollgive"
  161. format slot 4 of player with book named "&f<bold>Do you wish to get the troll kit?:" to be unstealable
  162. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the troll kit" to close then run "sudo %player% /molekit"
  163.  
  164. command /moletrollgive:
  165. trigger:
  166. if {isMole.%player%} is true:
  167. if {HasMoleKit.%player%} is false:
  168. set {HasMoleKit.%player%} to true
  169. give player 16 cobweb
  170. give player 5 TNT
  171. give player 1 flint and steel
  172. else:
  173. message "{@P} You already have your mole kit"
  174. else:
  175. message "{@P} You are not the mole"
  176.  
  177. command /molepotter:
  178. trigger:
  179. wait 3 ticks
  180. open chest with 1 rows named "&aMole Kit &8» &ePotter" to player
  181. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the potter kit" to close then run "sudo %player% /molepottergive"
  182. format slot 4 of player with book named "&f<bold>Do you wish to get the potter kit?:" to be unstealable
  183. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the potter kit" to close then run "sudo %player% /molekit"
  184.  
  185. command /molepottergive:
  186. trigger:
  187. if {isMole.%player%} is true:
  188. if {HasMoleKit.%player%} is false:
  189. set {HasMoleKit.%player%} to true
  190. give player 1 unextended splash Weakness potion II item
  191. give player 1 potion of:8226
  192. give player 1 potion of:16420
  193. else:
  194. message "{@P} You already have your mole kit"
  195. else:
  196. message "{@P} You are not the mole"
  197.  
  198. command /molefighter:
  199. trigger:
  200. wait 3 ticks
  201. open chest with 1 rows named "&aMole Kit &8» &eFighter" to player
  202. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the fighter kit" to close then run "sudo %player% /molefightergive"
  203. format slot 4 of player with book named "&f<bold>Do you wish to get the fighter kit?:" to be unstealable
  204. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the fighter kit" to close then run "sudo %player% /molekit"
  205.  
  206. command /molefightergive:
  207. trigger:
  208. if {isMole.%player%} is true:
  209. if {HasMoleKit.%player%} is false:
  210. set {HasMoleKit.%player%} to true
  211. give player 2 diamonds
  212. give player 1 golden apple
  213. give player 1 fishing rod
  214. else:
  215. message "{@P} You already have your mole kit"
  216. else:
  217. message "{@P} You are not the mole"
  218.  
  219. command /moletrapper:
  220. trigger:
  221. wait 3 ticks
  222. open chest with 1 rows named "&aMole Kit &8» &eTrapper" to player
  223. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the trapper kit" to close then run "sudo %player% /moletrappergive"
  224. format slot 4 of player with book named "&f<bold>Do you wish to get the trapper kit?:" to be unstealable
  225. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the trapper kit" to close then run "sudo %player% /molekit"
  226.  
  227. command /moletrappergive:
  228. trigger:
  229. if {isMole.%player%} is true:
  230. if {HasMoleKit.%player%} is false:
  231. set {HasMoleKit.%player%} to true
  232. give player 16 TNT
  233. give player 2 piston
  234. give player 2 sticky piston
  235. give player 1 flint and steel
  236. else:
  237. message "{@P} You already have your mole kit"
  238. else:
  239. message "{@P} You are not the mole"
  240.  
  241. command /molepyro:
  242. trigger:
  243. wait 3 ticks
  244. open chest with 1 rows named "&aMole Kit &8» &ePyro" to player
  245. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the pyro kit" to close then run "sudo %player% /molepyrogive"
  246. format slot 4 of player with book named "&f<bold>Do you wish to get the pyro kit?:" to be unstealable
  247. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the pyro kit" to close then run "sudo %player% /molekit"
  248.  
  249. command /molepyrogive:
  250. trigger:
  251. if {isMole.%player%} is true:
  252. if {HasMoleKit.%player%} is false:
  253. set {HasMoleKit.%player%} to true
  254. give player 5 blaze spawn egg
  255. give player 1 potion of:8227
  256. give player 3 TNT
  257. else:
  258. message "{@P} You already have your mole kit"
  259. else:
  260. message "{@P} You are not the mole"
  261.  
  262. command /moletank:
  263. trigger:
  264. wait 3 ticks
  265. open chest with 1 rows named "&aMole Kit &8» &eTank" to player
  266. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the tank kit" to close then run "sudo %player% /moletankgive"
  267. format slot 4 of player with book named "&f<bold>Do you wish to get the tank kit?:" to be unstealable
  268. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the tank kit" to close then run "sudo %player% /molekit"
  269.  
  270. command /moletankgive:
  271. trigger:
  272. if {isMole.%player%} is true:
  273. if {HasMoleKit.%player%} is false:
  274. set {HasMoleKit.%player%} to true
  275. set {_helmet} to a diamond helmet
  276. set the data value of {_helmet} to 358
  277. give player 1 of {_helmet}
  278. set {_chestplate} to a diamond chestplate
  279. set the data value of {_chestplate} to 523
  280. give player 1 of {_chestplate}
  281. set {_leggings} to diamond leggings
  282. set the data value of {_leggings} to 490
  283. give player 1 of {_leggings}
  284. set {_boots} to diamond boots
  285. set the data value of {_boots} to 424
  286. give player 1 of {_boots}
  287. else:
  288. message "{@P} You already have your mole kit"
  289. else:
  290. message "{@P} You are not the mole"
  291.  
  292. command /moleEnchanter:
  293. trigger:
  294. wait 3 ticks
  295. open chest with 1 rows named "&aMole Kit &8» &eEnchanter" to player
  296. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the enchanter kit" to close then run "sudo %player% /moleEnchantergive"
  297. format slot 4 of player with book named "&f<bold>Do you wish to get the enchanter kit?:" to be unstealable
  298. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the enchanter kit" to close then run "sudo %player% /molekit"
  299.  
  300. command /moleEnchantergive:
  301. trigger:
  302. if {isMole.%player%} is true:
  303. if {HasMoleKit.%player%} is false:
  304. set {HasMoleKit.%player%} to true
  305. give player 1 of enchantment table
  306. give player 64 of bottle_o'_enchanting
  307. give player 64 of lapis
  308. else:
  309. message "{@P} You already have your mole kit"
  310. else:
  311. message "{@P} You are not the mole"
  312.  
  313. command /molehealer:
  314. trigger:
  315. wait 3 ticks
  316. open chest with 1 rows named "&aMole Kit &8» &eHealer" to player
  317. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the healer kit" to close then run "sudo %player% /molehealergive"
  318. format slot 4 of player with book named "&f<bold>Do you wish to get the healer kit?:" to be unstealable
  319. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the healer kit" to close then run "sudo %player% /molekit"
  320.  
  321. command /molehealergive:
  322. trigger:
  323. if {isMole.%player%} is true:
  324. if {HasMoleKit.%player%} is false:
  325. set {HasMoleKit.%player%} to true
  326. give player 2 golden apples
  327. give player 1 of potion of:8261
  328. give player 1 of potion of:16453
  329. else:
  330. message "{@P} You already have your mole kit"
  331. else:
  332. message "{@P} You are not the mole"
  333.  
  334. command /moleprojectile:
  335. trigger:
  336. wait 3 ticks
  337. open chest with 1 rows named "&aMole Kit &8» &eProjectile" to player
  338. format slot 1 of player with green stained glass pane named "&AAccept:" with lore "&e<italics>Click to accept the projectile kit" to close then run "sudo %player% /moleprojectilegive"
  339. format slot 4 of player with book named "&f<bold>Do you wish to get the projectile kit?:" to be unstealable
  340. format slot 7 of player with red stained glass pane named "&cDeny:" with lore "&e<italics>Click to decline the projectile kit" to close then run "sudo %player% /molekit"
  341.  
  342. command /moleprojectilegive:
  343. trigger:
  344. if {isMole.%player%} is true:
  345. if {HasMoleKit.%player%} is false:
  346. set {HasMoleKit.%player%} to true
  347. give player 1 bow
  348. give player 64 arrows
  349. give player 1 fishing rod
  350. else:
  351. message "{@P} You already have your mole kit"
  352. else:
  353. message "{@P} You are not the mole"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement