Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &8[&6Playtime&8]
- command /playtime [<text>] [<offline player>]:
- trigger:
- if arg 1 is set:
- if player has permission "*":
- if arg 1 is "view":
- if arg 2 is set:
- if {seconds::%uuid of arg-2%} is set:
- 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"
- else:
- message "{@prefix} &b%arg-2% &chas no playtime"
- else:
- message "&7Correct Usage: &c/playtime view <player>"
- else if arg 1 is "rewards":
- open chest inventory with 6 rows named "&8Playtime Rewards" to sender
- loop integers from 0 to 53:
- set slot loop-value of current inventory to black glass named " "
- set slot 4 of current inventory to player's skull named "&b%player%&7's Playtime Points: &8%{playtime::%uuid of player%}%"
- set slot 10 of current inventory to name tag named "&8[&aJoined&8] &bSuffix" with lore "&7Price: &810 Playtime Points"
- set slot 19 of current inventory to name tag named "&8[&6Active&8] &bSuffix" with lore "&7Price: &8100 Playtime Points"
- set slot 28 of current inventory to name tag named "&8[&7Old&8] &bSuffix" with lore "&7Price: &8500 Playtime Points"
- set slot 37 of current inventory to name tag named "&8[&cNo Life&8] &bSuffix" with lore "&7Price: &81000 Playtime Points"
- set slot 11 of current inventory to end portal frame named "&r&lCommon Loot Bag" with lore "&7Price: &825 Playtime Points"
- set slot 20 of current inventory to end portal frame named "&b&lRare Loot Bag" with lore "&7Price: &850 Playtime"
- set slot 29 of current inventory to end portal frame named "&d&lEpic Loot Bag" with lore "&7Price: &8100 Playtime Points"
- set slot 38 of current inventory to end portal frame named "&6&lLegendary Loot Bag" with lore "&7Price: &8500 Playtime Points"
- set slot 12 of current inventory to emerald named "&a&l50 Credits" with lore "&7Price: &850 Playtime Points"
- set slot 21 of current inventory to emerald named "&a&l150 Credits" with lore "&7Price: &8100 Playtime Points"
- set slot 30 of current inventory to emerald named "&a&l500 Credits" with lore "&7Price: &8400 Playtime Points"
- set slot 39 of current inventory to emerald named "&a&l1000 Credits" with lore "&7Price: &8750 Playtime Points"
- set slot 13 of current inventory to nether star named "&d&l2 Hour Global x2 XP Booster" with lore "&7Price: &87300 Playtime Points"
- set slot 22 of current inventory to nether star named "&d&l4 Hour Global x2 XP Booster" with lore "&7Price: &87550 Playtime Points"
- set slot 31 of current inventory to nether star named "&d&l2 Hour Global x4 XP Booster" with lore "&7Price: &8750 Playtime Points"
- set slot 40 of current inventory to nether star named "&d&l4 Hour Global x4 XP Booster" with lore "&7Price: &81400 Playtime Points"
- set slot 14 of current inventory to diamond hoe named "&b&lMagic Hoe" with lore "&7Price: &82000 Playtime Points"
- else:
- 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"
- on inventory click:
- if name of clicked inventory is "&8Playtime Rewards":
- cancel event
- set {_price} to uncolored line 1 of lore of event-slot
- replace all "Price: " in {_price} with ""
- replace all " Playtime Points" in {_price} with ""
- set {_price} to {_price} parsed as integer
- if player's balance >= {_price}:
- if name of event-slot contains "&bSuffix":
- remove {_price} from {playtime::%uuid of player%}
- set {_suffix} to name of event-slot
- replace all " &bSuffix" in {_suffix} with ""
- make console execute command "/suffixes add %player% %{_suffix}%"
- message "{@prefix} &aSuccessfully purchased the suffix %{_suffix}% &afor &8%{_price}% &aPlaytime Points"
- else if uncolored name of event-slot contains "Loot Bag":
- remove {_price} from {playtime::%uuid of player%}
- set {_name} to name of event-slot
- give player 1 end portal frame named "%{_name}%"
- else if uncolored name of event-slot contains "Credits":
- remove {_price} from {playtime::%uuid of player%}
- set {_name} to uncolored name of event-slot
- replace all " Credits" in {_name} with ""
- set {_name} to {_name} parsed as integer
- make console execute command "/credits add %player% %{_name}%"
- else if uncolored name of event-slot contains "Magic Hoe":
- remove {_price} from {playtime::%uuid of player%}
- make console execute command "/magich %player%"
- else:
- send "{@prefix} &cYou do not have enough playtime points to do this"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement