Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1.  
  2. command /menu <player> <text>:
  3. trigger:
  4. make arg-1 execute "/%arg-2%"
  5.  
  6. on rightclick on sign:
  7. if line 1 of the clicked block is "&e&l[&6&lShop&e&l]":
  8. if line 2 of the clicked block is "&b&lDiamant":
  9. open chest with 1 rows named "&e&l[&6&lShop&e&l] &b&lDiamant" to the player
  10. wait 1 tick
  11. format slot 1 of player with diamond named "&b16 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 1"
  12. format slot 3 of player with diamond named "&b32 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 2"
  13. format slot 5 of player with diamond named "&b64 Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 3"
  14. format slot 7 of player with diamond named "&bAlle Diamanten &7| Verkaufen" to close then run "menu %player% verkaufen 4"
  15.  
  16. command /verkaufen [<integer>]:
  17. trigger:
  18. if arg 1 is not set:
  19. message "&7Bitte wähle eine WarenID!"
  20. if arg 1 is 1:
  21. if player's inventory has 16 diamonds:
  22. remove 16 diamonds from player's inventory
  23. message "test"
  24. add 48 to {lumis.%player%}
  25. stop
  26. else:
  27. message "Test2"
  28. stop
  29. if arg 1 is 2:
  30. if player's inventory has 32 diamonds:
  31. remove 32 diamonds from player's inventory
  32. message "test"
  33. add 96 to {lumis.%player%}
  34. stop
  35. else:
  36. message "Test2"
  37. stop
  38. if arg 1 is 3:
  39. if player's inventory has 64 diamonds:
  40. remove 64 diamonds from player's inventory
  41. message "test"
  42. add 192 to {lumis.%player%}
  43. stop
  44. else:
  45. message "Test2"
  46. stop
  47. if arg 1 is 4:
  48. if player's inventory has diamonds:
  49. set {_diamonds.%player%} to amount of diamonds in player's inventory
  50. remove all diamonds from player's inventory
  51. add {_diamonds.%player%}*3 to {lumis.%player%}
  52. delete {_diamonds.%player%}
  53. message "&e[&6Shop&e] &7Du hast &3Alle &bDiamanten &7verkauft!"
  54. stop
  55. else:
  56. message "&e[&6Shop&e] &7Du hast keine &bDiamanten &7zum verkaufen!"
  57. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement