Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /menu <player> <text>:
- trigger:
- make arg-1 execute "/%arg-2%"
- on rightclick on sign:
- if line 1 of the clicked block is "&e&l[&6&lShop&e&l]":
- if line 2 of the clicked block is "&b&lDiamant":
- open chest with 1 rows named "&e&l[&6&lShop&e&l] &b&lDiamant" to the player
- wait 1 tick
- format slot 1 of player with diamond named "&b16 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 1"
- format slot 3 of player with diamond named "&b32 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 2"
- format slot 5 of player with diamond named "&b64 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 3"
- format slot 7 of player with diamond named "&bAlle Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 4"
- command /verkaufen [<integer>]:
- trigger:
- if arg 1 is not set:
- message "&7Bitte wähle eine WarenID!"
- if arg 1 is 1:
- if player's inventory has 16 diamonds:
- remove 16 diamonds from player's inventory
- message "test"
- add 48 to {lumis.%player%}
- stop
- else:
- message "Test2"
- stop
- if arg 1 is 2:
- if player's inventory has 32 diamonds:
- remove 32 diamonds from player's inventory
- message "test"
- add 96 to {lumis.%player%}
- stop
- else:
- message "Test2"
- stop
- if arg 1 is 3:
- if player's inventory has 64 diamonds:
- remove 64 diamonds from player's inventory
- message "test"
- add 192 to {lumis.%player%}
- stop
- else:
- message "Test2"
- stop
- if arg 1 is 4:
- if player's inventory has diamonds:
- set {_diamonds.%player%} to amount of diamonds in player's inventory
- remove all diamonds from player's inventory
- add {_diamonds.%player%}*3 to {lumis.%player%}
- delete {_diamonds.%player%}
- message "&e[&6Shop&e] &7Du hast &3Alle &bDiamanten &7verkauft!"
- stop
- else:
- message "&e[&6Shop&e] &7Du hast keine &bDiamanten &7zum verkaufen!"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement