Advertisement
Zeldaboy111

Skript Tutorial #13 Rewards

Sep 24th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.70 KB | None | 0 0
  1. options:
  2. {cparticleCT::%arg 3%} = {cparticleCT::%player%}
  3. {cparticleCT::%arg 3%} = {cparticleCT::%loop-player%}
  4.  
  5. {cParticleName::%arg 3%} = {cParticleName::%loop-player%}
  6.  
  7. {cparticlecn::%arg 2%} = {cparticlecn::%loop-player%}
  8.  
  9. {cfireworkspark::%arg 1%} = {cfireworkspark::%loop-player%}
  10. {cwolfhearts::%arg 1%} = {cwolfhearts::%loop-player%}
  11.  
  12. {chead::type::%arg 2%} = {chead::type::%player%}
  13.  
  14. {vote::time::%player%} = {vote::time::%loop-player%}
  15.  
  16. on enable:
  17. set {VoteKey} to "VK"
  18.  
  19.  
  20. on join:
  21. execute console command "mvtp %player% lobby"
  22. set hunger to 10
  23. set player's health to 10
  24. player is in world "lobby":
  25. clear the player's inventory
  26. set slot 4 of player to a chest named "&6Cosmetics" with lore "&7Open een cosmetic GUI"
  27. if {cparticleCT::%player%} is not set:
  28. set {cparticleCT::%player%} to 0
  29. if {cadminchange::%player%} is not set:
  30. set {cadminchange::%player%} to false
  31. if {vote::time::%player%} is not set:
  32. set {vote::time::%player%} to 0
  33. set helmet slot of player to {chead::type::%player%}
  34. if {rewards::%player%} is not set:
  35. set {rewards::%player%} to 0
  36.  
  37. on break:
  38. if player is in "lobby":
  39. if {cadminchangeb::%player%} is false:
  40. send "&6<Lobby> &4Je mag geen blokken breken in de lobby."
  41. cancel event
  42.  
  43. on leftclick:
  44. if player is holding a chest named "&6Cosmetics" with lore "&7Open een cosmetic GUI":
  45. execute console command "/cosmeticmain open %player%"
  46. cancel event
  47.  
  48. on rightclick:
  49. player is holding a chest named "&6Cosmetics" with lore "&7Open een cosmetic GUI":
  50. execute console command "/cosmeticmain open %player%"
  51. cancel event
  52.  
  53. command /cosmeticmain open <offline player>:
  54. executable by: console
  55. trigger:
  56. open chest with 1 rows named "&6Cosmetics" to arg 1
  57. format slot 0 of arg 1 with orange dye named "&5Particles" to close then run [execute console command "cosmeticp open %arg 1%"]
  58. format slot 2 of arg 1 with Skull of ("Tom25W" parsed as an offline player) named "&eHeads" to close then run [execute console command "cosmetich1 open %arg 1%"]
  59. format slot 4 of arg 1 with leather chestplate dyed lime named "&aSuits" to close then run [execute console command "cosmeticsuit open %arg 1%"]
  60. #========================================================================================================================
  61. command /cosmeticp open <offline player>:
  62. executable by: console
  63. trigger:
  64. wait 3 tick
  65. open chest with 1 rows named "&5Particles" to arg 1
  66. format slot 0 of arg 1 with leather boots dyed white named "&f&lFirework Sparks" with lore "&710 secondes vuurwerk particles" to close then run [execute console command "cparticle FireworkSpark fireworks_spark %arg 1%"]
  67. format slot 1 of arg 1 with bone named "&4&lWolf Hearts" with lore "&710 secondes wolven hartjes particles" to close then run [execute console command "cparticle WolfHearts wolfheart %arg 1%"]
  68.  
  69. command /cparticle <text> <text> <offline player>:
  70. executable by: console
  71. trigger:
  72. if {cparticlect::%arg 3%} is 0:
  73. set {cParticleMessage::%arg 3%} to arg 1
  74. set {cParticleName::%arg 3%} to arg 2
  75. set {cparticleCT::%arg 3%} to 10
  76. send "&5<Cosmetics> &dDe particle: &5%{cParticleMessage::%arg 3%}% &dis aangezet." to arg 3
  77. wait 10 seconds
  78. delete {cParticleName::%arg 3%}
  79. send "&5<Cosmetics> &dDe particle: &5%{cParticleMessage::%arg 3%}% &dis uitgezet." to arg 3
  80. stop
  81. else:
  82. send "&5<Cosmetics> &dJe hebt nog een cooldown van: &5%{cparticleCT::%arg 3%}% &dseconden omdat je de particle: &5%{cParticleMessage::%arg 3%}% &dhebt aangezet." to arg 3
  83. stop
  84.  
  85. every 1 second:
  86. loop all players:
  87. if {cparticleCT::%loop-player%} is not 0:
  88. remove 1 from {cparticleCT::%loop-player%}
  89. stop
  90.  
  91. every 5 ticks:
  92. loop all players:
  93. if {cParticleName::%loop-player%} is set:
  94. #show 25 "%{cParticleName::%loop-player%}%" particles at location of loop-player for loop-player offset by 0.5, 1, 0.5
  95. stop
  96. #=================================================================
  97.  
  98. command /cosmetich open <offline player>:
  99. executable by: console
  100. trigger:
  101. wait 3 tick
  102. send "&5<Cosmetics> &4Je zit al op de eerste pagina" to arg 1
  103.  
  104. command /cosmetich1 open <offline player>:
  105. executable by: console
  106. trigger:
  107. wait 3 tick
  108. open chest with 6 rows named "&5Heads Items" to arg 1
  109.  
  110. #Tweede rij
  111. #Verander slot slot 10 naar een ander slot (na of voor de kist)
  112. format slot 9 of arg 1 with Skull of ("MHF_PigZombie" parsed as an offline player) named "&eZombiePigman" to close then run [execute console command "chead ZombiePigman MHF_PigZombie %arg 1%"]
  113. format slot 10 of arg 1 with Skull of ("Tom25W" parsed as an offline player) named "&eGoldenChest" to close then run [execute console command "/chead GoldenChest Tom25W %arg 1%"]
  114.  
  115.  
  116.  
  117.  
  118. #Onderste rij
  119. format slot 48 of arg 1 with arrow named "&cVorige pagina" to close then run [execute console command "cosmetich open %arg 1%"]
  120. format slot 49 of arg 1 with barrier named "&4Sluit het menu" to close
  121. format slot 50 of arg 1 with arrow named "&cVolgende pagina" to close then run [execute console command "cosmetich2 open %arg 1%"]
  122. format slot 53 of arg 1 with barrier named "&cVerwijder je head" to close then run [execute console command "chead remove %arg 1%"]
  123.  
  124. command /cosmetich2 open <offline player>:
  125. executable by: console
  126. trigger:
  127. wait 3 tick
  128. send "&5<Cosmetics> &4Er is nog geen 2de pagina" to arg 1
  129.  
  130.  
  131. command /chead <text> <text> <offline player>:
  132. executable by: console
  133. trigger:
  134. if arg 2 is "remove":
  135. set helmet slot of arg 3 to air
  136. send "&5<Cosmetics> &dJe head is verwijderd" to arg 3
  137. stop
  138.  
  139. else:
  140. set helmet slot of arg 3 to Skull of ("%arg 2%" parsed as an offline player)
  141. send "&5<Heads> &dVeel plezier met je &5%arg 1% &dhead!" to arg 3
  142.  
  143. #================================================================
  144.  
  145. command /cosmeticsuit open <offline player>:
  146. executable by: console
  147. trigger:
  148. wait 3 ticks
  149. open chest with 6 rows named "&aSuits" to arg 1
  150.  
  151. format slot 9 of arg 1 with leather chestplate dyed blue named "&2Blue chestplate" to close then run [execute console command "csuits BlueChestplate leather_chestplate blue %arg 1%"]
  152. format slot 10 of arg 1 with leather chestplate dyed red named "&2Red chestplate" to close then run [execute console command "csuits RedChestplate leather_chestplate red %arg 1%"]
  153. format slot 11 of arg 1 with leather chestplate dyed yellow named "&2Yellow chestplate" to close then run [execute console command "csuits YellowChestplate leather_chestplate yellow %arg 1%"]
  154.  
  155. format slot 48 of arg 1 with arrow named "&cVorige pagina" to close then run [execute console command "cosmetich open %arg 1%"]
  156. format slot 49 of arg 1 with barrier named "&4Sluit het menu" to close
  157. format slot 50 of arg 1 with arrow named "&cVolgende pagina" to close then run [execute console command "cosmetich2 open %arg 1%"]
  158. format slot 53 of arg 1 with barrier named "&cVerwijder je chestplate" to close then run [execute console command "csuits remove %arg 1%"]
  159.  
  160. command /csuits <text> [<item>] [<color>] <offline player>:
  161. executable by: console
  162. trigger:
  163. if arg 1 is "remove":
  164. set chestplate slot of arg 4 to air
  165. send "&5<Suits> &dJe chestplate is removed" to arg 4
  166. else:
  167. equip arg 4 with arg 2 dyed arg 3
  168. send "&5<Suits> &dVeel plezier met je &5%arg 1%&d!" to arg 4
  169. stop
  170.  
  171.  
  172. #================================================================
  173.  
  174. command /cadmin [<text>] [<text>]:
  175. trigger:
  176. if player has permission "adminchange":
  177. if arg 1 is "invc" OR "invchange" OR "ic":
  178. if arg 2 is "true" OR "on" OR "aan":
  179. send "&3<AdminCommands> &bJe kan je inventory nu veranderen"
  180. set {cadminchangei::%player%} to true
  181. stop
  182. if arg 2 is "false" OR "off" OR "uit":
  183. send "&3<AdminCommands> &bJe kan je inventory nu niet meer veranderen"
  184. set {cadminchangei::%player%} to false
  185. stop
  186. else:
  187. send "&3<AdminCommands> &4Doe /cadmin &cinvc/invchange/ic true/on/aan &4om inventorychange aan te zetten"
  188. send "&3<AdminCommands> &4Doe /cadmin &cinvc/invchange/ic false/off/uit &4om inventorychange uit te zetten"
  189. stop
  190. if arg 1 is "breakblocks" OR "breakb" OR "bb":
  191. if arg 2 is "true" OR "on" OR "aan":
  192. send "&3<AdminCommands> &bJe kan nu blokken breken in de lobby"
  193. set {cadminchangeb::%player%} to true
  194. stop
  195. if arg 2 is "false" OR "off" OR "uit":
  196. send "&3<AdminCommands> &bJe kan nu geen blokken meer breken in de lobby"
  197. set {cadminchangeb::%player%} to false
  198. stop
  199. else:
  200. send "&3<AdminCommands> &4Doe /cadmin &cbreakblocks/breakb/bb true/on/aan &4om blokken in de lobby te kunnen breken"
  201. send "&3<AdminCommands> &4Doe /cadmin &cbreakblocks/breakb/bb false/off/uit &4om geen blokken in de lobby te kunnen breken"
  202. stop
  203. if arg 1 is not set:
  204. send "&3<AdminCommands> &4Doe /cadmin &cinvc/invchange/ic true/on/aan &4om inventorychange aan te zetten"
  205. send "&3<AdminCommands> &4Doe /cadmin &cinvc/invchange/ic false/off/uit &4om inventorychange uit te zetten"
  206.  
  207. send ""
  208.  
  209. send "&3<AdminCommands> &4Doe /cadmin &cbreakblocks/breakb/bb true/on/aan &4om blokken in de lobby te kunnen breken"
  210. send "&3<AdminCommands> &4Doe /cadmin &cbreakblocks/breakb/bb false/off/uit &4om geen blokken in de lobby te kunnen breken"
  211. stop
  212. else:
  213. send "&3<AdminCommands> &4Je hebt onvoldoende permissies hiervoor"
  214. stop
  215.  
  216. on inventory click:
  217. if player is in world "lobby":
  218. if {cadminchangei::%player%} is false:
  219. cancel event
  220. on drop:
  221. if player is in world "lobby":
  222. if {cadminchangei::%player%} is false:
  223. cancel event
  224.  
  225. #=================================================
  226. #Speciaal item
  227. #Keys/iets anders
  228.  
  229. command /vote:
  230. trigger:
  231. if {vote::time::%player%} is 0:
  232. send "&9<Vote> &3Hier is je vote key"
  233. give player 1 tripwire hook named "&9VoteKey" with lore "&kl"
  234. set {vote::time::%player%} to 10
  235. else:
  236. send "&9<Vote> &3Je kan pas voten over: &b%{vote::time::%player%}% &3seconden."
  237.  
  238.  
  239. every 1 seconds:
  240. loop all players:
  241. if {vote::time::%loop-player%} is not 0:
  242. remove 1 from {vote::time::%loop-player%}
  243.  
  244. on rightclick:
  245. player is in world "lobby":
  246. loop all blocks:
  247.  
  248. if clicked block is a chest named {VoteKey}:
  249.  
  250. if player is holding a tripwire hook named "&9VoteKey" with lore "&kl":
  251. remove 1 tripwire hook named "&9VoteKey" with lore "&kl" from player
  252. cancel event
  253. execute console command "cvoteopen %player%"
  254. add 1 to {rewards::%player%}
  255. send "&4Je hebt nu een reward"
  256. stop
  257. else:
  258. send "&9<Vote> &4Je hebt geen &cVoteKey"
  259. cancel event
  260. stop
  261.  
  262. #command /cvoteopen <offline player>:
  263. #trigger:
  264.  
  265.  
  266. on rightclick:
  267. player is in world "lobby":
  268. if clicked block is a end portal frame:
  269.  
  270. if {rewards::%player%} is 0:
  271. execute console command "rewards open %player%"
  272. stop
  273. if {rewards::%player%} is more than 0:
  274. if {rewards::%player%} is less than 9:
  275. execute console command "rewards1 open %player%"
  276. stop
  277. if {rewards::%player%} is more than 8:
  278. if {rewards::%player%} is less than 18:
  279. execute console command "rewards2 open %player%"
  280. stop
  281.  
  282.  
  283. #set {_loc} to clicked block
  284. #set {_loc} to the location 2 meter north of event-block
  285. #send "%{_loc}%"
  286. #set location of "%{_loc}%" to stone
  287. #send "%{_loc}%"
  288. #stop
  289. #line 1 of {loc} is "Test":
  290. # set {loc} to air
  291. # send "x"
  292. # stop
  293.  
  294. #set {clickedblock} to clicked block
  295. #set {_locn} to the location 2 meter north of clicked block
  296. #set {loc} to the location 2 meter north of {clickedblock}
  297. #if line 1 of {loc} is "Test":
  298. # send "x"
  299. #set {_loc} to location 2 meter east of clicked block
  300. #set {_loc} to location 2 meter south of clicked block
  301. #set {_loc} to location 2 meter west of clicked block
  302.  
  303.  
  304. #clicked block is a chest named {VoteKey}:
  305.  
  306.  
  307. command /rewards open <offline player>:
  308. executable by: console
  309. trigger:
  310. wait 3 tick
  311. open chest with 3 rows named "&5Rewards" to arg 1
  312.  
  313. format slot 0 of arg 1 with a barrier named "&cJe hebt geen rewards" to close then run [execute console command "rewards open %arg 1%"]
  314. stop
  315.  
  316.  
  317. command /rewards1 open <offline player>:
  318. executable by: console
  319. trigger:
  320. wait 3 tick
  321. open chest with 3 rows named "&5Rewards" to arg 1
  322.  
  323. format slot 0 of arg 1 with a wool named "&cJe hebt geen rewards" to close then run [execute console command ""]
  324. stop
  325.  
  326. command /rewards2 open <offline player>:
  327. executable by: console
  328. trigger:
  329. wait 3 tick
  330. open chest with 3 rows named "&5Rewards" to arg 1
  331.  
  332. format slot 0 of arg 1 with a wool named "&cJe hebt geen rewards" to close then run [execute console command ""]
  333. stop
  334.  
  335. command /rreset:
  336. trigger:
  337. set {rewards::%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement