Zeldaboy111

Skript #125

Mar 14th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.67 KB | None | 0 0
  1. #Functies:
  2. # baanGui, baanCheckAdd
  3.  
  4. options:
  5. {mn::baan::%loop-player%::houthakker::level} = {mn::baan::%{_p}%::houthakker::level}
  6. {mn::baan::%loop-player%::miner::level} = {mn::baan::%{_p}%::miner::level}
  7. {mn::baan::%loop-player%::bouwer::level} = {mn::baan::%{_p}%::bouwer::level}
  8.  
  9. function baanGui(p: player, page: string):
  10. if {_page} is "1":
  11.  
  12. open chest with 6 rows named "&3&lBaan" to {_p}
  13.  
  14. if {mn::baan::%{_p}%::houthakker} is true:
  15. format slot 10 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to be unstealable
  16.  
  17. else:
  18. make a gui slot 10 of {_p} with a wooden axe named "&2Houthakker" with lore "&aUnlocked" to run function baanGui({_p}, "houthakker")
  19.  
  20. if {mn::baan::%{_p}%::miner} is true:
  21. format slot 12 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aGekozen" to be unstealable
  22.  
  23. else:
  24. make a gui slot 12 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aUnlocked" to run function baanGui({_p}, "miner")
  25.  
  26.  
  27.  
  28. if {mn::baan::%{_p}%::bouwer} is true:
  29. format slot 14 of {_p} with brick block named "&2Bouwer" with lore "&aGekozen" to be unstealable
  30.  
  31. else:
  32. make gui slot 14 of {_p} with brick block named "&2Bouwer" with lore "&aUnlocked" to run function baanGui({_p}, "bouwer")
  33.  
  34. if {mn::baan::%{_p}%::farmer} is true:
  35. format slot 16 of {_p} with a wooden hoe named "&2Farmer" with lore "&aGekozen" to be unstealable
  36.  
  37. else:
  38. make gui slot 16 of {_p} with a wooden hoe named "&2Farmer" with lore "&aUnlocked" to run function baanGui({_p}, "farmer")
  39.  
  40. if {mn::baan::%{_p}%::soldaat} is true:
  41. format slot 28 of {_p} with a iron sword named "&2Soldaat" with lore "&aGekozen" to be unstealable
  42.  
  43. else:
  44. make gui slot 28 of {_p} with a iron sword named "&2Soldaat" with lore "&aUnlocked" to run function baanGui({_p}, "soldaat")
  45.  
  46. if {mn::baan::%{_p}%::smid} is true:
  47. format slot 30 of {_p} with an anvil named "&2Smid" with lore "&aGekozen" to be unstealable
  48.  
  49. else:
  50. make gui slot 30 of {_p} with an anvil named "&2Smid" with lore "&aUnlocked" to run function baanGui({_p}, "smid")
  51.  
  52. if {mn::baan::%{_p}%::enchanter} is true:
  53. format slot 32 of {_p} with an enchantment table named "&2Enchanter" with lore "&aGekozen" to be unstealable
  54.  
  55. else:
  56. format slot 32 of {_p} with an enchantment table named "&2Enchanter" with lore "&4Locked" to be unstealable
  57.  
  58. if {mn::baan::%{_p}%::ontdekkingsreiziger} is true:
  59. format slot 34 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aGekozen" to be unstealable
  60.  
  61. else:
  62. format slot 34 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&4Locked" to be unstealable
  63. format slot 49 of {_p} with a barrier named "&4Sluit het menu" to close
  64.  
  65.  
  66. if {_page} is "houthakker":
  67. open chest with 5 rows named "&3Houthakker" to {_p}
  68.  
  69. if {mn::baan::%{_p}%::houthakker} is true:
  70. format slot 13 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to be unstealable
  71. else:
  72. wait 3 ticks
  73. make gui slot 13 of {_p} with a wooden axe named "&2Houthakker" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "houthakker")
  74.  
  75. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::houthakker::level}%" to be unstealable
  76.  
  77.  
  78. if {_page} is "miner":
  79. open chest with 5 rows named "&3Miner" to {_p}
  80.  
  81. if {mn::baan::%{_p}%::miner} is true:
  82. format slot 13 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aGekozen" to be unstealable
  83. else:
  84. wait 3 ticks
  85. make gui slot 13 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "miner")
  86.  
  87. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::miner::level}%" to be unstealable
  88.  
  89. if {_page} is "bouwer":
  90. open chest with 5 rows named "&3Bouwer" to {_p}
  91.  
  92. if {mn::baan::%{_p}%::bouwer} is true:
  93. format slot 13 of {_p} with a brick block named "&2Bouwer" with lore "&aGekozen" to be unstealable
  94. else:
  95. wait 3 ticks
  96. make gui slot 13 of {_p} with a brick block named "&2Bouwer" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "bouwer")
  97.  
  98. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::bouwer::level}%" to be unstealable
  99.  
  100. if {_page} is "farmer":
  101. open chest with 5 rows named "&3Farmer" to {_p}
  102.  
  103. if {mn::baan::%{_p}%::farmer} is true:
  104. format slot 13 of {_p} with a wooden hoe named "&2Farmer" with lore "&aGekozen" to be unstealable
  105. else:
  106. wait 3 ticks
  107. make gui slot 13 of {_p} with a wooden hoe named "&2Farmer" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "farmer")
  108.  
  109. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::farmer::level}%" to be unstealable
  110.  
  111. if {_page} is "soldaat":
  112. open chest with 5 rows named "&3Soldaat" to {_p}
  113.  
  114. if {mn::baan::%{_p}%::soldaat} is true:
  115. format slot 13 of {_p} with a iron sword named "&2Soldaat" with lore "&aGekozen" to be unstealable
  116. else:
  117. wait 3 ticks
  118. make gui slot 13 of {_p} with a iron sword named "&2Soldaat" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "soldaat")
  119.  
  120. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::soldaat::level}%" to be unstealable
  121.  
  122. if {_page} is "smid":
  123. open chest with 5 rows named "&3Smid" to {_p}
  124.  
  125. if {mn::baan::%{_p}%::smid} is true:
  126. format slot 13 of {_p} with a anvil named "&2Smid" with lore "&aGekozen" to be unstealable
  127. else:
  128. wait 3 ticks
  129. make gui slot 13 of {_p} with a anvil named "&2Smid" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "smid")
  130.  
  131. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::smid::level}%" to be unstealable
  132.  
  133. if {_page} is "enchanter":
  134. open chest with 5 rows named "&3Enchanter" to {_p}
  135.  
  136. if {mn::baan::%{_p}%::enchanter} is true:
  137. format slot 13 of {_p} with a enchantment table named "&2Enchanter" with lore "&aGekozen" to be unstealable
  138. else:
  139. wait 3 ticks
  140. format slot 13 of {_p} with a enchantment table named "&2Enchanter" with lore "&4Locked" to be unstealable
  141.  
  142. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::enchanter::level}%" to be unstealable
  143.  
  144. if {_page} is "ontdekkingsreiziger":
  145. open chest with 5 rows named "&3Ontdekkingsreiziger" to {_p}
  146.  
  147. if {mn::baan::%{_p}%::ontdekkingsreiziger} is true:
  148. format slot 13 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aGekozen" to be unstealable
  149. else:
  150. wait 3 ticks
  151. format slot 13 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&4Locked" to be unstealable
  152.  
  153. format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::ontdekkingsreiziger::level}%" to be unstealable
  154.  
  155.  
  156.  
  157. every 1 tick:
  158. loop all players:
  159. if {mn::baan::%loop-player%::houthakker::level} is not set:
  160. set {mn::baan::%loop-player%::houthakker::level} to 1
  161.  
  162. if {mn::baan::%loop-player%::miner::level} is not set:
  163. set {mn::baan::%loop-player%::miner::level} to 1
  164.  
  165. if {mn::baan::%loop-player%::bouwer::level} is not set:
  166. set {mn::baan::%loop-player%::bouwer::level} to 1
  167.  
  168. if {mn::baan::%loop-player%::farmer::level} is not set:
  169. set {mn::baan::%loop-player%::farmer::level} to 1
  170.  
  171. if {mn::baan::%loop-player%::soldaat::level} is not set:
  172. set {mn::baan::%loop-player%::soldaat::level} to 1
  173.  
  174. if {mn::baan::%loop-player%::smid::level} is not set:
  175. set {mn::baan::%loop-player%::smid::level} to 1
  176.  
  177. if {mn::baan::%loop-player%::enchanter::level} is not set:
  178. set {mn::baan::%loop-player%::enchanter::level} to 1
  179.  
  180. if {mn::baan::%loop-player%::ontdekkingsreiziger::level} is not set:
  181. set {mn::baan::%loop-player%::ontdekkingsreiziger::level} to 1
  182.  
  183. function baanCheckAdd(p: player, baan: string):
  184. if {mn::baan::maxbanen::%{_p}%} is not set:
  185. set {mn::baan::maxbanen::%{_p}%} to 1
  186.  
  187. if {mn::baan::banen::%{_p}%} is not set:
  188. set {mn::baan::banen::%{_p}%} to 0
  189.  
  190. if {mn::baan::maxbanen::%{_p}%} != {mn::baan::banen::%{_p}%}:
  191. #1 0
  192. send "x" to {_p}
  193.  
  194. else:
  195. baanMessage({_p}, "mn.maxb", "Je hebt al het maximaal aantal banen dat je kan hebben.")
  196.  
  197.  
  198. function baanMessage(p: player, type: string, message: string):
  199. if {_type} contains "mn.":
  200. set {_prefix} to "&0[&b&lMineNation&0]&6"
  201. replace all "mn." in {_type} with ""
  202.  
  203. send "%{_type}%" to console
  204. if {_type} is "maxb":
  205. replace all "&6" in {_prefix} with "&4"
  206. send "gedaan" to console
  207.  
  208. send "%{_prefix}% %{_message}%" to {_p}
  209.  
  210.  
  211. command /test:
  212. trigger:
  213. baanMessage(player, "mn.maxb", "Je hebt al het maximaal aantal banen dat je kan hebben.")
Advertisement
Add Comment
Please, Sign In to add comment