CREAMPAN0408

Untitled

Feb 23rd, 2019
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. on inventory click:
  2. inventory name of player's current inventory is "&7Achievements"
  3. cancel the event
  4. if clicked item is a arrow:
  5. close player's inventory
  6. wait 1 tick
  7. command "/openprofile %player%"
  8. else if clicked item is yellow dye:
  9. set {_tag} to tag "Var" of nbt of clicked item
  10. set {_coins} to get digits of uncolored lore of clicked item parsed as integer
  11. send "&2&lCLAIMED ACHIEVEMENT REWARD FOR:%nl%&7%name of clicked item%"
  12. command "/playsound note.pling %player% ~ ~ ~ 1 2 1"
  13. set slot clicked slot of player's current inventory to light green dye with nbt "{Var:%{_tag}%}" named "%name of clicked item%" with lore "&7Reward: &e%{_coins}% coins||||&aCompleted"
  14. $ thread
  15. addCoins(player, {_coins})
  16. $ thread
  17. set sql var "achievements::%player%::%{_tag}%" to "true"
  18. $ thread
  19. delete sql var "achievements::%player%::%{_tag}%::claim"
  20.  
  21. on right click on flower pot:
  22. location at event-block is {mystery}
  23. $ thread
  24. rewardAchievement(player, "Mystery Achievement (Right click that flower pot)", "mystery")
Add Comment
Please, Sign In to add comment