Advertisement
fleft17

Untitled

Jul 15th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.12 KB | None | 0 0
  1. # Welcome to Moles Skript v2! In this version of the Mole Skript, there are 4 new kits to choose from when you're the mole: (later)
  2.  
  3.  
  4.  
  5. options:
  6. P: &8[&bMoles&8]&r
  7.  
  8.  
  9.  
  10.  
  11. command /moles [<text>] [<integer>]:
  12. permission: skript.op
  13. trigger:
  14. if arg-1 is not set:
  15. message "{@P} /moles help"
  16.  
  17. else if arg-1 is equal to "set":
  18. if command sender does not have the permission "moles.set":
  19. message "{@P} NOPE!"
  20. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  21. stop trigger
  22.  
  23. set {Mole} to true
  24.  
  25. delete {Mole.IsMole::*}
  26. delete {Mole.MoleOfTeam::*}
  27. delete {Mole.Moles::*}
  28.  
  29. loop all players:
  30. set {isMole.%loop-player%} to false
  31.  
  32. if arg-2 is not set:
  33. set {_MoleAmount} to 1
  34.  
  35. if arg-2 is set:
  36. set {_MoleAmount} to arg-2
  37.  
  38. loop {Teams::*}:
  39. set {_potMoles::*} to {Team.%loop-value%::*}
  40. loop {_MoleAmount} times:
  41. set {_Mole} to (random element out of {_potMoles::*})
  42. remove {_Mole} from {_potMoles::*}
  43. broadcast "%{_Mole}%"
  44. set {Mole.IsMole::%{_Mole}%} to loop-value
  45. set {Mole.MoleOfTeam::%loop-value%} to {_Mole}
  46. add {_Mole} to {Mole.Moles::*}
  47. set {_MolePlayer} to ("%{_Mole}%" parsed as offlineplayer)
  48. if {_MolePlayer} is online:
  49. message "&eYou are a mole! Use /molekit" to {_MolePlayer}
  50. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  51. set {molekit.%{_MolePlayer}%} to true
  52. set {isMole.%{_MolePlayer}%} to true
  53. set {HasMoleKit.%{_MolePlayer}%} to false
  54.  
  55. broadcast "{@P} Set %{_MoleAmount}% Mole per team by &b%command sender%&r!"
  56. delete {_potMoles::*}
  57.  
  58. else if arg-1 is equal to "delete" or "reset":
  59. if command sender does not have the permission "moles.delete":
  60. message "{@P} NOPE!"
  61. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  62. stop trigger
  63.  
  64. set {Mole} to false
  65.  
  66. delete {Moles.IsMole::*}
  67. delete {Moles.MolesOfTeam::*}
  68. delete {Mole.Moles::*}
  69.  
  70. loop all players:
  71. delete {isMole.%loop-player%}
  72. delete {HasMoleKit.%loop-player%}
  73. broadcast "{@P} Reset by &b%command sender%!"
  74. loop all players:
  75. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  76.  
  77.  
  78. else if arg-1 is equal to "list" or "show":
  79. if command sender does not have the permission "moles.list":
  80. message "{@P} NOPE!"
  81. execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
  82. stop trigger
  83.  
  84.  
  85. if {Mole.Moles::*} is not set:
  86. message "{@P} There are no moles!"
  87. else:
  88. message "{@P} %{Mole.Moles::*}%"
  89.  
  90. else if arg-1 is equal to "help":
  91. execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
  92. message "{@P} Mole Skript v%{Moles.version}% commands:"
  93. message "{@P} /moles set: sets moles"
  94. message "{@P} /moles reset: removes variables, resets moles"
  95.  
  96.  
  97.  
  98. else:
  99. message "{@P} /moles help"
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. on death of player:
  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 gets a diamond sword, a bow, 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. give player 31 iron ingots
  238. set {molekit.%command sender%} to false
  239. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  240.  
  241. arg-2 is "10" or "Wolf" or "Wolves":
  242. give player 10 wolf spawn eggs
  243. give player 64 bones
  244. set {molekit.%command sender%} to false
  245. execute console command "/playsound note.pling %command sender% ~ ~ ~ 1 1 1"
  246.  
  247. else:
  248. message "{@P} You're not a mole!"
  249.  
  250. if {HasMoleKit.%command sender%} is not set:
  251. if {isMole.%command sender%} is true:
  252. message "{@P} You've already gotten your kit!"
  253.  
  254.  
  255. command /mcc <text>:
  256. usage: /mcc <message>
  257. trigger:
  258. {isMole.%command sender%} is true:
  259. set {_player} to command sender
  260. loop all players:
  261. {isMole.%loop-player%} is true:
  262. message "{@P} &e%command sender%&r: %arg%" to the loop-player
  263. else:
  264. message "{@P} You're not a mole!"
  265.  
  266.  
  267. command /mcl:
  268. usage: /mcl - broadcast location to other moles
  269. trigger:
  270. {isMole.%command sender%} is true:
  271. set {_moleLoc} to the command sender's location
  272. loop all players:
  273. {isMole.%loop-player%} is true:
  274. message "{@P} &e%command sender%&r says: %{_moleLoc}%" to the loop-player
  275.  
  276. else:
  277. message "{@P} You're not a mole!"
  278.  
  279. command /mcp:
  280. usage: /mcp - list mole players alive
  281. trigger:
  282. {isMole.%command sender%} is true:
  283. loop all players:
  284. if {isMole.%loop-player%} is true:
  285. message "{@P} %loop-player% "
  286. else:
  287. message "{@P} You're not a mole!"
  288.  
  289.  
  290.  
  291.  
  292. on death of player:
  293. {Mole} is true:
  294. execute console command "/team leave %player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement