Advertisement
fleft17

Untitled

Aug 4th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.91 KB | None | 0 0
  1. # Welcome to Moles Skript v3!
  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. V: v3
  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.  
  74. delete {Mole.Moles::*}
  75.  
  76. broadcast "{@P} Reset by &b&l%command sender%!"
  77. loop all players:
  78. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  79.  
  80.  
  81. else if arg-1 is equal to "list" or "show":
  82. if command sender does not have the permission "moles.list":
  83. message "{@P} NOPE!"
  84. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  85. stop trigger
  86.  
  87.  
  88. if {Mole.Moles::*} is not set:
  89. message "{@P} There are no moles!"
  90. else:
  91. message "{@P} %{Mole.Moles::*}%"
  92.  
  93. else if arg-1 is equal to "help":
  94. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  95. message "{@P} Mole Skript &a{@V}&r commands:"
  96. message "{@P} /moles &aset&r <amount>: sets moles"
  97. message "{@P} /moles &areset&r: removes variables, resets moles"
  98. message "{@P} /moles &alist&r: lists all moles"
  99. message "{@P} /molekit &astats&r: see stats for each kit"
  100.  
  101.  
  102. else:
  103. command sender command "/moles help"
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. on death of player:
  111. if {Moles} is true:
  112. if {Moles.IsMole::%player%} is set:
  113. delete {Mole.IsMole::%player%}
  114. delete {isMole:%player%}
  115.  
  116.  
  117. command /molekit [<text>] [<text>] [<player>]:
  118. trigger:
  119. if {molekit.%command sender%} is true:
  120. {HasMoleKit.%command sender%} is false:
  121. {isMole.%command sender%} is true:
  122. if arg-1 is not set:
  123. message "{@P} Use /molekit list to see the kits!"
  124. if arg-1 is "list":
  125. message "{@P} The mole kits are:"
  126. message "{@P} &91. &rThe Mobber"
  127. message "{@P} &92. &rThe Troll"
  128. message "{@P} &93. &rThe Potter"
  129. message "{@P} &94. &rThe Fighter"
  130. message "{@P} &95. &rThe Trapper"
  131. message "{@P} &96. &rThe Pyro"
  132. message "{@P} &97. &rThe Tank"
  133. message "{@P} &98. &rThe Horse Rider"
  134. message "{@P} &99. &rThe Enchanter"
  135. message "{@P} &910. &rThe Wolf Tamer"
  136. message "{@P} Use &9/molekit info&r to learn about each kit!"
  137. message "{@P} Use &9/molekit choose &r<&91&r - &910&r> to get your kit!"
  138.  
  139.  
  140. if arg-1 is "info" or "explain" or "learn":
  141. arg-2 is "1":
  142. message "{@P} The Mobber gets a various assortment of mob spawn eggs." to the command sender
  143. arg-2 is "2":
  144. message "{@P} The Troll gets 16 cobweb as well as 5 TnT and 2 end portal blocks." to the command sender
  145. arg-2 is "3":
  146. message "{@P} The Potter gets a weakness potion, a swiftness potions, and a poison potion." to the command sender
  147. arg-2 is "4":
  148. message "{@P} The Fighter two diamonds, 4 sticks, 3 string, 64 arrows, and a golden apple." to the command sender
  149. arg-2 is "5":
  150. message "{@P} The Trapper gets 16 TnT, 2 of each type of piston, 64 redstone, and a flint and steel." to the command sender
  151. arg-2 is "6":
  152. message "{@P} The Pyro gets 5 blaze spawn eggs, a flint and steel, a fire resist potion, and 3 TnT." to the command sender
  153. arg-2 is "7":
  154. message "{@P} The Tank gets a full set of diamond armor with 5 durability left." to the command sender
  155. arg-2 is "8":
  156. message "{@P} The Horse rider gets a horse spawn egg, a saddle, horse armor, and sugar." to the command sender
  157. arg-2 is "9":
  158. message "{@P} The Enchanter gets the ingredients to make an enchantment table and EXP bottles." to the command sender
  159. arg-2 is "10":
  160. message "{@P} The Wolf Tamer gets 10 wolf spawn eggs and a stack of bones." to the command sender
  161. arg-2 is not set:
  162. message "Please specify which kit you'd like to learn about. 1-10."
  163.  
  164. if arg-1 is "select" or "choose" or "pick":
  165.  
  166. set {_p} to arg-3
  167.  
  168. open chest with 1 row named "Mole Kits" to {_p}
  169. format slot 0 of {_p} with creeper head named "The Mobber" to run "molekit choose 1 %{_p}%"
  170. format slot 0 of {_p} with creeper head named "The Mobber" to run "molekit choose 1"
  171. format slot 0 of {_p} with creeper head named "The Mobber" to run "molekit choose 1"
  172. format slot 0 of {_p} with creeper head named "The Mobber" to run "molekit choose 1"
  173.  
  174. arg-2 is "1" or "Mobber" or "The Mobber":
  175. give {_p} 3 creeper spawn egg
  176. give {_p} 3 spider spawn egg
  177. give {_p} 3 skeleton spawn egg
  178. give {_p} 3 zombie spawn egg
  179. set {molekit.%{_p}%} to false
  180. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  181. if {Moles.Kit.1} is not set:
  182. set {Moles.Kit.1} to 0
  183. add 1 to {Moles.Kit.1}
  184.  
  185. arg-2 is "2" or "Troll" or "The Troll":
  186. give {_p} 16 cobweb
  187. give {_p} 5 TNT
  188. give {_p} 2 creeper spawn egg
  189. set {molekit.%{_p}%} to false
  190. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  191. if {Moles.Kit.2} is not set:
  192. set {Moles.Kit.2} to 0
  193. add 1 to {Moles.Kit.2}
  194.  
  195. arg-2 is "3" or "Potter" or "The Potter":
  196. give {_p} 1 unextended splash Weakness potion II item
  197. give {_p} 1 potion of:8226
  198. give {_p} 1 potion of:16420
  199. set {molekit.%{_p}%} to false
  200. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  201. if {Moles.Kit.3} is not set:
  202. set {Moles.Kit.3} to 0
  203. add 1 to {Moles.Kit.3}
  204.  
  205. arg-2 is "4" or "Fighter" or "The Fighter":
  206. give {_p} 2 diamonds
  207. give {_p} 3 string
  208. give {_p} 4 sticks
  209. give {_p} 1 golden apple
  210. give {_p} 64 arrows
  211. set {molekit.%{_p}%} to false
  212. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  213. if {Moles.Kit.4} is not set:
  214. set {Moles.Kit.4} to 0
  215. add 1 to {Moles.Kit.4}
  216.  
  217. arg-2 is "5" or "Trapper":
  218. give {_p} 16 TNT
  219. give {_p} 2 piston
  220. give {_p} 2 sticky piston
  221. give {_p} 64 redstone
  222. give {_p} 1 flint and steel
  223. set {molekit.%{_p}%} to false
  224. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  225. if {Moles.Kit.5} is not set:
  226. set {Moles.Kit.5} to 0
  227. add 1 to {Moles.Kit.5}
  228.  
  229. arg-2 is "6" or "Pyro" or "The Pyro":
  230. give {_p} 5 blaze spawn egg
  231. give {_p} 1 flint and steel
  232. give {_p} 1 potion of:8227
  233. give {_p} 3 TNT
  234. set {molekit.%{_p}%} to false
  235. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  236. if {Moles.Kit.6} is not set:
  237. set {Moles.Kit.6} to 0
  238. add 1 to {Moles.Kit.6}
  239.  
  240. arg-2 is "7" or "Tank":
  241. set {_helmet} to a diamond helmet
  242. set the data value of {_helmet} to 523
  243. give {_p} 1 of {_helmet}
  244. set {_chestplate} to a diamond chestplate
  245. set the data value of {_chestplate} to 523
  246. give {_p} 1 of {_chestplate}
  247. set {_leggings} to diamond leggings
  248. set the data value of {_leggings} to 523
  249. give {_p} 1 of {_leggings}
  250. set {_boots} to diamond boots
  251. set the data value of {_boots} to 523
  252. give {_p} 1 of {_boots}
  253. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  254. if {Moles.Kit.7} is not set:
  255. set {Moles.Kit.7} to 0
  256. add 1 to {Moles.Kit.7}
  257.  
  258. arg-2 is "8" or "Horse" or "Horseman":
  259. give {_p} 1 horse spawn egg
  260. give {_p} 1 saddle
  261. give {_p} 10 sugar
  262. give {_p} 1 gold horse armor
  263. set {molekit.%{_p}%} to false
  264. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  265. if {Moles.Kit.8} is not set:
  266. set {Moles.Kit.8} to 0
  267. add 1 to {Moles.Kit.8}
  268.  
  269. arg-2 is "9" or "Enchant" or "Enchanter" or "Enchanting":
  270. give {_p} 4 obsidian
  271. give {_p} 2 diamonds
  272. give {_p} 1 book
  273. give {_p} 10 experience bottles
  274. give {_p} 31 iron ingots
  275. set {molekit.%{_p}%} to false
  276. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  277. if {Moles.Kit.9} is not set:
  278. set {Moles.Kit.9} to 0
  279. add 1 to {Moles.Kit.9}
  280.  
  281. arg-2 is "10" or "Wolf" or "Wolves":
  282. give {_p} 10 wolf spawn eggs
  283. give {_p} 64 bones
  284. set {molekit.%{_p}%} to false
  285. execute console command "/playsound note.pling %{_p}% ~ ~ ~ 1 1 1"
  286. if {Moles.Kit.10} is not set:
  287. set {Moles.Kit.10} to 0
  288. add 1 to {Moles.Kit.10}
  289.  
  290. else:
  291. message "{@P} You're not a mole!"
  292.  
  293. if {HasMoleKit.%{_p}%} is not set:
  294. if {isMole.%{_p}%} is true:
  295. message "{@P} You've already gotten your kit!"
  296.  
  297. if command sender is op:
  298. arg-1 is "stats":
  299. loop 10 times:
  300. if {Moles.Kit.%loop-number%} is not set:
  301. message "{@P} Kit &9%loop-number%: &aNone"
  302. if {Moles.Kit.%loop-number%} is set:
  303. message "{@P} Kit &9%loop-number%: &a%{Moles.Kit.%loop-number%}%"
  304.  
  305. command /mcc <text>:
  306. usage: /mcc <message>
  307. trigger:
  308. {isMole.%command sender%} is true:
  309. set {_player} to command sender
  310. loop all players:
  311. {isMole.%loop-player%} is true:
  312. message "{@P} &e%command sender%&r: %arg%" to the loop-player
  313. else:
  314. message "{@P} You're not a mole!"
  315.  
  316.  
  317. command /mcl:
  318. usage: /mcl - broadcast location to other moles
  319. trigger:
  320. {isMole.%command sender%} is true:
  321. set {_moleLoc} to the command sender's location
  322. loop all players:
  323. {isMole.%loop-player%} is true:
  324. message "{@P} &9%command sender%'s coords are:&r %{_moleLoc}%" to the loop-player
  325.  
  326. else:
  327. message "{@P} You're not a mole!"
  328.  
  329. command /mcp:
  330. usage: /mcp - list mole players alive
  331. trigger:
  332. {isMole.%command sender%} is true:
  333. loop all players:
  334. if {isMole.%loop-player%} is true:
  335. message "{@P} %loop-player% "
  336. else:
  337. message "{@P} You're not a mole!"
  338.  
  339.  
  340.  
  341.  
  342. on death of player:
  343. if {Mole} is true:
  344. execute console command "/team leave %player%"
  345.  
  346.  
  347. on join:
  348. if {Moles} is true:
  349. if {isMole.%player%} is true:
  350. message "{@P} You're a mole!"
  351.  
  352. if {HasMoleKit.%player%} is false:
  353. message "{@P} Hey! Use your /molekit!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement