Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Functies:
- # baanGui, baanCheckAdd
- options:
- {mn::baan::%loop-player%::houthakker::level} = {mn::baan::%{_p}%::houthakker::level}
- {mn::baan::%loop-player%::miner::level} = {mn::baan::%{_p}%::miner::level}
- {mn::baan::%loop-player%::bouwer::level} = {mn::baan::%{_p}%::bouwer::level}
- {mn::baan::%loop-player%::totlevel} = {mn::baan::%{_p}%::totlevel}
- {mn::baan::%loop-player%::totlevel} = {mn::baan::%player%::totlevel}
- function baanGui(p: player, page: string):
- if {_page} is "1":
- open chest with 6 rows named "&3&lBaan" to {_p}
- if {mn::baan::%{_p}%::houthakker} is true:
- make gui slot 10 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to run function baanGui({_p}, "houthakker")
- else:
- make a gui slot 10 of {_p} with a wooden axe named "&2Houthakker" with lore "&aUnlocked" to run function baanGui({_p}, "houthakker")
- if {mn::baan::%{_p}%::miner} is true:
- make gui slot 12 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aGekozen" to run function baanGui({_p}, "miner")
- else:
- make a gui slot 12 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aUnlocked" to run function baanGui({_p}, "miner")
- if {mn::baan::%{_p}%::bouwer} is true:
- make gui slot 14 of {_p} with brick block named "&2Bouwer" with lore "&aGekozen" to run function baanGui({_p}, "bouwer")
- else:
- make gui slot 14 of {_p} with brick block named "&2Bouwer" with lore "&aUnlocked" to run function baanGui({_p}, "bouwer")
- if {mn::baan::%{_p}%::farmer} is true:
- make gui slot 16 of {_p} with a wooden hoe named "&2Farmer" with lore "&aGekozen" to run function baanGui({_p}, "farmer")
- else:
- make gui slot 16 of {_p} with a wooden hoe named "&2Farmer" with lore "&aUnlocked" to run function baanGui({_p}, "farmer")
- if {mn::baan::%{_p}%::soldaat} is true:
- make gui slot 28 of {_p} with a iron sword named "&2Soldaat" with lore "&aGekozen" to run function baanGui({_p}, "soldaat")
- else:
- make gui slot 28 of {_p} with a iron sword named "&2Soldaat" with lore "&aUnlocked" to run function baanGui({_p}, "soldaat")
- if {mn::baan::%{_p}%::smid} is true:
- make gui slot 30 of {_p} with an anvil named "&2Smid" with lore "&aGekozen" to run function baanGui({_p}, "smid")
- else:
- make gui slot 30 of {_p} with an anvil named "&2Smid" with lore "&aUnlocked" to run function baanGui({_p}, "smid")
- if {mn::baan::%{_p}%::enchanter} is true:
- make gui slot 32 of {_p} with an enchantment table named "&2Enchanter" with lore "&aGekozen" to run function baanGui({_p}, "enchanter")
- else:
- if {mn::baan::%{_p}%::totlevel} is more than 40:
- make gui slot 14 of {_p} with a compass named "&2Enchanter" with lore "&aUnlocked" to run function baanGui({_p}, "enchanter")
- else:
- format slot 32 of {_p} with an enchantment table named "&4Enchanter" with lore "&4Locked" to be unstealable
- if {mn::baan::%{_p}%::ontdekkingsreiziger} is true:
- make gui slot 34 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aGekozen" to run function baanGui({_p}, "ontdekkingsreiziger")
- else:
- if {mn::baan::%{_p}%::totlevel} is more than 60:
- make gui slot 14 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aUnlocked" to run function baanGui({_p}, "ontdekkingsreiziger")
- else:
- format slot 34 of {_p} with a compass named "&4Ontdekkingsreiziger" with lore "&4Locked" to be unstealable
- format slot 49 of {_p} with a barrier named "&4Sluit het menu" to close
- if {_page} is "houthakker":
- open chest with 5 rows named "&3Houthakker" to {_p}
- if {mn::baan::%{_p}%::houthakker} is true:
- make gui slot 13 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to run function baanCheckAdd({_p}, "houthakker")
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a wooden axe named "&2Houthakker" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "houthakker")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::houthakker::level}%" to be unstealable
- if {_page} is "miner":
- open chest with 5 rows named "&3Miner" to {_p}
- if {mn::baan::%{_p}%::miner} is true:
- format slot 13 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "miner")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::miner::level}%" to be unstealable
- if {_page} is "bouwer":
- open chest with 5 rows named "&3Bouwer" to {_p}
- if {mn::baan::%{_p}%::bouwer} is true:
- format slot 13 of {_p} with a brick block named "&2Bouwer" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a brick block named "&2Bouwer" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "bouwer")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::bouwer::level}%" to be unstealable
- if {_page} is "farmer":
- open chest with 5 rows named "&3Farmer" to {_p}
- if {mn::baan::%{_p}%::farmer} is true:
- format slot 13 of {_p} with a wooden hoe named "&2Farmer" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a wooden hoe named "&2Farmer" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "farmer")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::farmer::level}%" to be unstealable
- if {_page} is "soldaat":
- open chest with 5 rows named "&3Soldaat" to {_p}
- if {mn::baan::%{_p}%::soldaat} is true:
- format slot 13 of {_p} with a iron sword named "&2Soldaat" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a iron sword named "&2Soldaat" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "soldaat")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::soldaat::level}%" to be unstealable
- if {_page} is "smid":
- open chest with 5 rows named "&3Smid" to {_p}
- if {mn::baan::%{_p}%::smid} is true:
- format slot 13 of {_p} with a anvil named "&2Smid" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- make gui slot 13 of {_p} with a anvil named "&2Smid" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "smid")
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::smid::level}%" to be unstealable
- if {_page} is "enchanter":
- open chest with 5 rows named "&3Enchanter" to {_p}
- if {mn::baan::%{_p}%::enchanter} is true:
- format slot 13 of {_p} with a enchantment table named "&2Enchanter" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- if {mn::baan::%{_p}%::totlevel} is more than 40:
- make gui slot 14 of {_p} with a compass named "&2Enchanter" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "enchanter")
- else:
- format slot 13 of {_p} with a enchantment table named "&4Enchanter" with lore "&4Locked" to be unstealable
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::enchanter::level}%" to be unstealable
- if {_page} is "ontdekkingsreiziger":
- open chest with 5 rows named "&3Ontdekkingsreiziger" to {_p}
- if {mn::baan::%{_p}%::ontdekkingsreiziger} is true:
- format slot 13 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aGekozen" to be unstealable
- else:
- wait 3 ticks
- if {mn::baan::%{_p}%::totlevel} is more than 60:
- make gui slot 14 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aUnlocked" to run function baanCheckAdd({_p}, "ontdekkingsreiziger")
- else:
- format slot 13 of {_p} with a compass named "&4Ontdekkingsreiziger" with lore "&4Locked" to be unstealable
- format slot 28 of {_p} with a exp bottle named "&2Level:" with lore "&a%{mn::baan::%{_p}%::ontdekkingsreiziger::level}%" to be unstealable
- every 1 tick:
- loop all players:
- if {mn::baan::%loop-player%::houthakker::level} is not set:
- set {mn::baan::%loop-player%::houthakker::level} to 0
- if {mn::baan::%loop-player%::miner::level} is not set:
- set {mn::baan::%loop-player%::miner::level} to 0
- if {mn::baan::%loop-player%::bouwer::level} is not set:
- set {mn::baan::%loop-player%::bouwer::level} to 0
- if {mn::baan::%loop-player%::farmer::level} is not set:
- set {mn::baan::%loop-player%::farmer::level} to 0
- if {mn::baan::%loop-player%::soldaat::level} is not set:
- set {mn::baan::%loop-player%::soldaat::level} to 0
- if {mn::baan::%loop-player%::smid::level} is not set:
- set {mn::baan::%loop-player%::smid::level} to 0
- if {mn::baan::%loop-player%::enchanter::level} is not set:
- set {mn::baan::%loop-player%::enchanter::level} to 0
- if {mn::baan::%loop-player%::ontdekkingsreiziger::level} is not set:
- set {mn::baan::%loop-player%::ontdekkingsreiziger::level} to 0
- delete {mn::baan::%loop-player%::totlevel}
- set {mn::baan::%loop-player%::totlevel} to "%{mn::baan::%loop-player%::houthakker::level} + {mn::baan::%loop-player%::miner::level} + {mn::baan::%loop-player%::bouwer::level} + {mn::baan::%loop-player%::farmer::level} + {mn::baan::%loop-player%::soldaat::level} + {mn::baan::%loop-player%::smid::level} + {mn::baan::%loop-player%::enchanter::level} + {mn::baan::%loop-player%::ontdekkingsreiziger::level}%"
- #send "%{mn::baan::%loop-player%::houthakker::level}% %{mn::baan::%loop-player%::miner::level}% %{mn::baan::%loop-player%::bouwer::level}% %{mn::baan::%loop-player%::farmer::level}% %{mn::baan::%loop-player%::soldaat::level}% %{mn::baan::%loop-player%::smid::level}% %{mn::baan::%loop-player%::enchanter::level}% %{mn::baan::%loop-player%::ontdekkingsreiziger::level}%" to console
- function baanCheckAdd(p: player, baan: string):
- if {mn::baan::maxbanen::%{_p}%} is not set:
- set {mn::baan::maxbanen::%{_p}%} to 1
- if {mn::baan::banen::%{_p}%} is not set:
- set {mn::baan::banen::%{_p}%} to 0
- if {mn::baan::maxbanen::%{_p}%} != {mn::baan::banen::%{_p}%}:
- open chest with 3 rows named "&3&lWil je deze baan echt kiezen?" to {_p}
- make gui slot 11 of {_p} with a green stained clay named "&2&lJa" to close then run function addBaan({_p}, {_baan})
- make gui slot 16 of {_p} with a red stained clay named "&4&lNee" to run function baanGui({_p}, {_baan})
- else:
- open chest with 3 rows named "&3&lWil je deze baan echt niet meer hebben?" to {_p}
- make gui slot 11 of {_p} with a green stained clay named "&2&lJa" to close then run function removeBaan({_p}, {_baan})
- make gui slot 16 of {_p} with a red stained clay named "&4&lNee" to run function baanGui({_p}, {_baan})
- #addBaan({_p}, {_baan})
- function addBaan(p: player, baan: string):
- if {mn::baan::maxbanen::%{_p}%} != {mn::baan::banen::%{_p}%}:
- set {mn::baan::%{_p}%::%{_baan}%} to true
- add 1 to {mn::baan::banen::%{_p}%}
- set {mn::baan::%{_p}%::%{_baan}%::level} to 1
- baanMessage({_p}, "mn.succes", "Succesvol de baan: %{_baan}% gekozen.")
- else:
- baanMessage({_p}, "mn.maxb", "Je hebt al het maximaal aantal banen dat je kan hebben.")
- baanGui({_p}, {_baan})
- function removeBaan(p: player, baan: string):
- if {mn::baan::maxbanen::%{_p}%} != {mn::baan::banen::%{_p}%}:
- delete {mn::baan::%{_p}%::%{_baan}%}
- remove 1 from {mn::baan::banen::%{_p}%}
- delete {mn::baan::%{_p}%::%{_baan}%::level}
- baanMessage({_p}, "mn.succes", "Succesvol de baan: %{_baan}% opgezegd.")
- else:
- baanMessage({_p}, "mn.maxb", "De baan: %{_baan}% is niet opgezegd.")
- baanGui({_p}, {_baan})
- function baanMessage(p: player, type: string, message: string):
- if {_type} contains "mn.":
- set {_prefix} to "&0[&b&lMineNation&0]&6"
- replace all "mn." in {_type} with ""
- send "%{_type}%" to console
- if {_type} is "maxb":
- replace all "&6" in {_prefix} with "&4"
- if {_type} is "succes":
- replace all "&6" in {_prefix} with "&2"
- send "%{_prefix}% %{_message}%" to {_p}
- command /test:
- trigger:
- baanMessage(player, "mn.error", "Je hebt al het maximaal aantal banen dat je kan hebben.")
Advertisement
Add Comment
Please, Sign In to add comment