Advertisement
AdamLam

Untitled

Jan 18th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. on script load:
  2. send "&7[&6Achievements&7]&f loaded &asuccessfuly." to console
  3. delete {achlist::*}
  4. add "ShipI" to {achlist::*}
  5. set {desc.ShipI} to "ShipI opis"
  6. add "ShipII" to {achlist::*}
  7. set {desc.ShipII} to "ShipII opis"
  8. add "ShipIII" to {achlist::*}
  9. set {desc.ShipIII} to "ShipIII opis"
  10.  
  11. function AchReset(p: player):
  12. delete {ach::*}
  13. loop {achlist::*}:
  14. set {ach::%{_p}%::%loop-value%} to false
  15.  
  16.  
  17. function AchCheck(p: player):
  18. send "&c&l>>>>>>>>>> &7[&6ACHIEVEMENTS&7] &c&l<<<<<<<<<<" to {_p}
  19. loop {achlist::*}:
  20. if {ach::%{_p}%::%loop-value%} is false:
  21. json("%{_p}%", "&f%loop-value% &c✖ ||ttp:&b%{desc.%loop-value%}%")
  22. else if {ach::%{_p}%::%loop-value%} is true:
  23. json("%{_p}%", "&7%loop-value% &a✔ ||ttp:&b%{desc.%loop-value%}%")
  24. send "&c&l>>>>>>>>>> &7[&6ACHIEVEMENTS&7] &c&l<<<<<<<<<<" to {_p}
  25.  
  26.  
  27. on first join:
  28. AchReset(player)
  29.  
  30. command /achievements [<text>] [<text>]:
  31. trigger:
  32. if arg-1 is "reset":
  33. AchReset(player)
  34. send "&7[&6IslePvPbuildings&7] &cYour achievements have been reset"
  35. if arg-1 is "list":
  36. AchCheck(player)
  37. if arg-1 is "unlock":
  38. if arg-2 is set:
  39. loop {achlist::*}:
  40. if loop-value is arg-2:
  41. set {ach::%player%::%loop-value%} to true
  42. send "&7[&6IslePvPbuildings&7] &aAchievement unlocked"
  43.  
  44. #json("%player%", "&7TestMessage. ||ttp:&bTestDesc.")
  45. #Required: json.sk
  46. #https://www.spigotmc.org/resources/json-sk.8851/
  47.  
  48.  
  49. command /achievement:
  50. trigger:
  51. open chest with 6 rows named "&4&4&l ACHIEVEMENTS" to player
  52. wait 3 ticks
  53. set {loop.i.%player%} to 0
  54. format slot 53 of player with arrow named "&6NEXT" to run [execute player command "/say test"]
  55. format slot 45 of player with red wool named "&4EXIT" to run [execute player command "/say test"]
  56. loop {achlist::*}:
  57. if {ach::%player%::%loop-value%} is false:
  58. format slot {loop.i.%player%} of player with red stained glass pane named "&f%loop-value% &c✖" to send "%{desc.%loop-value%}%"
  59. else if {ach::%player%::%loop-value%} is true:
  60. format slot {loop.i.%player%} of player with green stained glass pane named "&7%loop-value% &a✔" to send "%{desc.%loop-value%}%"
  61. set {loop.i.%player%} to {loop.i.%player%}+1
  62. set {loop.i.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement