Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. command /rewards [<text>] [<text>]:
  2. permission: rewards.use
  3. permission message: {@nopermission}
  4. trigger:
  5. if arg 1 is not set:
  6. message "&c/rewards get parkour | maze"
  7. if arg 1 is set:
  8. if arg 1 is "get":
  9. if arg 2 is not set:
  10. make player execute command "/rewards"
  11. stop
  12. if arg 2 is set:
  13. if arg 2 is "parkour":
  14. give player beacon named "&aParkour Reward"
  15. give player flint named "&cReward remover"
  16. message "&aItems received."
  17. if arg 2 is "maze":
  18. give player beacon named "&aMaze Reward"
  19. give player flint named "&cReward remover"
  20. message "&aItems received."
  21.  
  22.  
  23. on place:
  24. if event-block is beacon:
  25. if name of player's tool is "&aParkour Reward":
  26. set {{@databasePrefix}serverinfo.parkourreward.location.%location of event-block%} to true
  27. message "&aReward set."
  28. stop
  29. if event-block is beacon:
  30. if name of player's tool is "&aMaze Reward":
  31. set {{@databasePrefix}serverinfo.Mazereward.location.%location of event-block%} to true
  32. message "&aReward set."
  33. stop
  34.  
  35.  
  36. on click:
  37. if {{@databasePrefix}serverinfo.parkourreward.location.%location of event-block%} is set:
  38. if {{@databasePrefix}playerinfo.%player's uuid%.reward.%location of event-block%}:
  39. message "&cYou already claimed this reward."
  40. stop
  41. give player 5 diamonds
  42. add 500 to player's balance
  43. broadcast "&e%player% &bcompleted a parkour"
  44. set {{@databasePrefix}playerinfo.%player's uuid%.reward.%location of event-block%} to now
  45. if {{@databasePrefix}serverinfo.parkourreward.location.%location of event-block%} is set:
  46. if {{@databasePrefix}playerinfo.%player's uuid%.reward.%location of event-block%}:
  47. message "&cYou already claimed this reward."
  48. stop
  49. add 1000 to player's balance
  50. broadcast "&e%player% &bcompleted a maze"
  51. set {{@databasePrefix}playerinfo.%player's uuid%.reward.%location of event-block%} to now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement