Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on inventory click:
- inventory name of player's current inventory is "&7Achievements"
- cancel the event
- if clicked item is a arrow:
- close player's inventory
- wait 1 tick
- command "/openprofile %player%"
- else if clicked item is yellow dye:
- set {_tag} to tag "Var" of nbt of clicked item
- set {_coins} to get digits of uncolored lore of clicked item parsed as integer
- send "&2&lCLAIMED ACHIEVEMENT REWARD FOR:%nl%&7%name of clicked item%"
- command "/playsound note.pling %player% ~ ~ ~ 1 2 1"
- 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"
- $ thread
- addCoins(player, {_coins})
- $ thread
- set sql var "achievements::%player%::%{_tag}%" to "true"
- $ thread
- delete sql var "achievements::%player%::%{_tag}%::claim"
- on right click on flower pot:
- location at event-block is {mystery}
- $ thread
- rewardAchievement(player, "Mystery Achievement (Right click that flower pot)", "mystery")
Add Comment
Please, Sign In to add comment