Advertisement
fleft17

Untitled

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