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}
- 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:
- format slot 10 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to be unstealable
- 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:
- format slot 12 of {_p} with a wooden pickaxe named "&2Miner" with lore "&aGekozen" to be unstealable
- 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:
- format slot 14 of {_p} with brick block named "&2Bouwer" with lore "&aGekozen" to be unstealable
- 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:
- format slot 16 of {_p} with a wooden hoe named "&2Farmer" with lore "&aGekozen" to be unstealable
- 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:
- format slot 28 of {_p} with a iron sword named "&2Soldaat" with lore "&aGekozen" to be unstealable
- 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:
- format slot 30 of {_p} with an anvil named "&2Smid" with lore "&aGekozen" to be unstealable
- 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:
- format slot 32 of {_p} with an enchantment table named "&2Enchanter" with lore "&aGekozen" to be unstealable
- else:
- format slot 32 of {_p} with an enchantment table named "&2Enchanter" with lore "&4Locked" to be unstealable
- if {mn::baan::%{_p}%::ontdekkingsreiziger} is true:
- format slot 34 of {_p} with a compass named "&2Ontdekkingsreiziger" with lore "&aGekozen" to be unstealable
- else:
- format slot 34 of {_p} with a compass named "&2Ontdekkingsreiziger" 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:
- format slot 13 of {_p} with a wooden axe named "&2Houthakker" with lore "&aGekozen" to be unstealable
- 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
- format slot 13 of {_p} with a enchantment table named "&2Enchanter" 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
- format slot 13 of {_p} with a compass named "&2Ontdekkingsreiziger" 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 1
- if {mn::baan::%loop-player%::miner::level} is not set:
- set {mn::baan::%loop-player%::miner::level} to 1
- if {mn::baan::%loop-player%::bouwer::level} is not set:
- set {mn::baan::%loop-player%::bouwer::level} to 1
- if {mn::baan::%loop-player%::farmer::level} is not set:
- set {mn::baan::%loop-player%::farmer::level} to 1
- if {mn::baan::%loop-player%::soldaat::level} is not set:
- set {mn::baan::%loop-player%::soldaat::level} to 1
- if {mn::baan::%loop-player%::smid::level} is not set:
- set {mn::baan::%loop-player%::smid::level} to 1
- if {mn::baan::%loop-player%::enchanter::level} is not set:
- set {mn::baan::%loop-player%::enchanter::level} to 1
- if {mn::baan::%loop-player%::ontdekkingsreiziger::level} is not set:
- set {mn::baan::%loop-player%::ontdekkingsreiziger::level} to 1
- 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}%}:
- #1 0
- send "x" to {_p}
- else:
- baanMessage({_p}, "mn.maxb", "Je hebt al het maximaal aantal banen dat je kan hebben.")
- 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"
- send "gedaan" to console
- send "%{_prefix}% %{_message}%" to {_p}
- command /test:
- trigger:
- baanMessage(player, "mn.maxb", "Je hebt al het maximaal aantal banen dat je kan hebben.")
Advertisement
Add Comment
Please, Sign In to add comment