Advertisement
OMan100

Untitled

Jan 31st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. options:
  2. prefix: &8[&6Playtime&8]
  3. command /playtime [<text>] [<offline player>]:
  4. trigger:
  5. if arg 1 is set:
  6. if player has permission "*":
  7. if arg 1 is "view":
  8. if arg 2 is set:
  9. if {seconds::%uuid of arg-2%} is set:
  10. message "{@prefix} &b%arg-2%&7's playtime is &e%{days::%uuid of arg-2%}% &7days &e%{hours::%uuid of arg-2%}% &7hours &e%{minutes::%uuid of arg-2%}% &7minutes and &e%{seconds::%uuid of arg-2%}% &7seconds"
  11. else:
  12. message "{@prefix} &b%arg-2% &chas no playtime"
  13. else:
  14. message "&7Correct Usage: &c/playtime view <player>"
  15. else if arg 1 is "rewards":
  16. open chest inventory with 6 rows named "&8Playtime Rewards" to sender
  17. loop integers from 0 to 53:
  18. set slot loop-value of current inventory to black glass named " "
  19. set slot 4 of current inventory to player's skull named "&b%player%&7's Playtime Points: &8%{playtime::%uuid of player%}%"
  20. set slot 10 of current inventory to name tag named "&8[&aJoined&8] &bSuffix" with lore "&7Price: &810 Playtime Points"
  21. set slot 19 of current inventory to name tag named "&8[&6Active&8] &bSuffix" with lore "&7Price: &8100 Playtime Points"
  22. set slot 28 of current inventory to name tag named "&8[&7Old&8] &bSuffix" with lore "&7Price: &8500 Playtime Points"
  23. set slot 37 of current inventory to name tag named "&8[&cNo Life&8] &bSuffix" with lore "&7Price: &81000 Playtime Points"
  24. set slot 11 of current inventory to end portal frame named "&r&lCommon Loot Bag" with lore "&7Price: &825 Playtime Points"
  25. set slot 20 of current inventory to end portal frame named "&b&lRare Loot Bag" with lore "&7Price: &850 Playtime"
  26. set slot 29 of current inventory to end portal frame named "&d&lEpic Loot Bag" with lore "&7Price: &8100 Playtime Points"
  27. set slot 38 of current inventory to end portal frame named "&6&lLegendary Loot Bag" with lore "&7Price: &8500 Playtime Points"
  28. set slot 12 of current inventory to emerald named "&a&l50 Credits" with lore "&7Price: &850 Playtime Points"
  29. set slot 21 of current inventory to emerald named "&a&l150 Credits" with lore "&7Price: &8100 Playtime Points"
  30. set slot 30 of current inventory to emerald named "&a&l500 Credits" with lore "&7Price: &8400 Playtime Points"
  31. set slot 39 of current inventory to emerald named "&a&l1000 Credits" with lore "&7Price: &8750 Playtime Points"
  32. set slot 13 of current inventory to nether star named "&d&l2 Hour Global x2 XP Booster" with lore "&7Price: &87300 Playtime Points"
  33. set slot 22 of current inventory to nether star named "&d&l4 Hour Global x2 XP Booster" with lore "&7Price: &87550 Playtime Points"
  34. set slot 31 of current inventory to nether star named "&d&l2 Hour Global x4 XP Booster" with lore "&7Price: &8750 Playtime Points"
  35. set slot 40 of current inventory to nether star named "&d&l4 Hour Global x4 XP Booster" with lore "&7Price: &81400 Playtime Points"
  36. set slot 14 of current inventory to diamond hoe named "&b&lMagic Hoe" with lore "&7Price: &82000 Playtime Points"
  37. else:
  38. message "{@prefix} &7Your playtime is &e%{days::%uuid of player%}% &7days &e%{hours::%uuid of player%}% &7hours &e%{minutes::%uuid of player%}% &7minutes and &e%{seconds::%uuid of player%}% &7seconds"
  39.  
  40. on inventory click:
  41. if name of clicked inventory is "&8Playtime Rewards":
  42. cancel event
  43. set {_price} to uncolored line 1 of lore of event-slot
  44. replace all "Price: " in {_price} with ""
  45. replace all " Playtime Points" in {_price} with ""
  46. set {_price} to {_price} parsed as integer
  47. if player's balance >= {_price}:
  48. if name of event-slot contains "&bSuffix":
  49. remove {_price} from {playtime::%uuid of player%}
  50. set {_suffix} to name of event-slot
  51. replace all " &bSuffix" in {_suffix} with ""
  52. make console execute command "/suffixes add %player% %{_suffix}%"
  53. message "{@prefix} &aSuccessfully purchased the suffix %{_suffix}% &afor &8%{_price}% &aPlaytime Points"
  54. else if uncolored name of event-slot contains "Loot Bag":
  55. remove {_price} from {playtime::%uuid of player%}
  56. set {_name} to name of event-slot
  57. give player 1 end portal frame named "%{_name}%"
  58. else if uncolored name of event-slot contains "Credits":
  59. remove {_price} from {playtime::%uuid of player%}
  60. set {_name} to uncolored name of event-slot
  61. replace all " Credits" in {_name} with ""
  62. set {_name} to {_name} parsed as integer
  63. make console execute command "/credits add %player% %{_name}%"
  64. else if uncolored name of event-slot contains "Magic Hoe":
  65. remove {_price} from {playtime::%uuid of player%}
  66. make console execute command "/magich %player%"
  67. else:
  68. send "{@prefix} &cYou do not have enough playtime points to do this"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement