Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- send "&7[&6Achievements&7]&f loaded &asuccessfuly." to console
- delete {achlist::*}
- add "ShipI" to {achlist::*}
- set {desc.ShipI} to "ShipI opis"
- add "ShipII" to {achlist::*}
- set {desc.ShipII} to "ShipII opis"
- add "ShipIII" to {achlist::*}
- set {desc.ShipIII} to "ShipIII opis"
- function AchReset(p: player):
- delete {ach::*}
- loop {achlist::*}:
- set {ach::%{_p}%::%loop-value%} to false
- function AchCheck(p: player):
- send "&c&l>>>>>>>>>> &7[&6ACHIEVEMENTS&7] &c&l<<<<<<<<<<" to {_p}
- loop {achlist::*}:
- if {ach::%{_p}%::%loop-value%} is false:
- json("%{_p}%", "&f%loop-value% &c✖ ||ttp:&b%{desc.%loop-value%}%")
- else if {ach::%{_p}%::%loop-value%} is true:
- json("%{_p}%", "&7%loop-value% &a✔ ||ttp:&b%{desc.%loop-value%}%")
- send "&c&l>>>>>>>>>> &7[&6ACHIEVEMENTS&7] &c&l<<<<<<<<<<" to {_p}
- on first join:
- AchReset(player)
- command /achievements [<text>] [<text>]:
- trigger:
- if arg-1 is "reset":
- AchReset(player)
- send "&7[&6IslePvPbuildings&7] &cYour achievements have been reset"
- if arg-1 is "list":
- AchCheck(player)
- if arg-1 is "unlock":
- if arg-2 is set:
- loop {achlist::*}:
- if loop-value is arg-2:
- set {ach::%player%::%loop-value%} to true
- send "&7[&6IslePvPbuildings&7] &aAchievement unlocked"
- #json("%player%", "&7TestMessage. ||ttp:&bTestDesc.")
- #Required: json.sk
- #https://www.spigotmc.org/resources/json-sk.8851/
- command /achievement:
- trigger:
- open chest with 6 rows named "&4&4&l ACHIEVEMENTS" to player
- wait 3 ticks
- set {loop.i.%player%} to 0
- format slot 53 of player with arrow named "&6NEXT" to run [execute player command "/say test"]
- format slot 45 of player with red wool named "&4EXIT" to run [execute player command "/say test"]
- loop {achlist::*}:
- if {ach::%player%::%loop-value%} is false:
- format slot {loop.i.%player%} of player with red stained glass pane named "&f%loop-value% &c✖" to send "%{desc.%loop-value%}%"
- else if {ach::%player%::%loop-value%} is true:
- format slot {loop.i.%player%} of player with green stained glass pane named "&7%loop-value% &a✔" to send "%{desc.%loop-value%}%"
- set {loop.i.%player%} to {loop.i.%player%}+1
- set {loop.i.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement