UDON_JP

Shop

Apr 28th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. command /shop:
  2. trigger:
  3. open chest with 3 rows named "Shop-main" to player
  4. format slot 12 of player with stone named "&7ブロック(買う)" to close then run [execute player command "/blocks"]
  5. format slot 13 of player with diamond named "&b鉱石(売る)" to close then run [execute player command "/ores"]
  6.  
  7. command /blocks:
  8. trigger:
  9. wait 3 ticks
  10. open chest with 6 rows named "&9ブロック" to player
  11. format slot 0 of player with 64 grass named "&7草ブロック" with lore "&7購入価格:&c2000円" to close then run [execute player command "/buyitem %player% 2000 64 grass"]
  12. format slot 1 of player with 64 dirt named "&7土" with lore "&7購入価格:&c1000円" to close then run [execute player command "/buyitem %player% 1000 64 dirt"]
  13. format slot 2 of player with 64 mycelium named "&7菌糸" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 mycelium"]
  14. format slot 3 of player with 64 coarse dirt named "&7粗い土" with lore "&7購入価格:&c2000円" to close then run [execute player command "/buyitem %player% 2000 64 coarse dirt"]
  15. format slot 4 of player with 64 podzol named "&7ポドゾル" with lore "&7購入価格:&c2000円" to close then run [execute player command "/buyitem %player% 2000 64 podzol"]
  16. format slot 5 of player with 16 ice named "&7氷" with lore "&7購入価格:&c500円" to close then run [execute player command "/buyitem %player% 500 16 ice"]
  17. format slot 6 of player with 16 packed ice named "&7氷塊" with lore "&7購入価格:&c1000円" to close then run [execute player command "/buyitem %player% 1000 16 packed ice"]
  18. format slot 7 of player with 64 oak log named "&7オークの原木" with lore "&7購入価格:&c1000円" to close then run [execute player command "/buyitem %player% 3000 64 oak log"]
  19. format slot 8 of player with 64 spruce log named "&7マツの原木" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 spruce log"]
  20. format slot 9 of player with 64 birch log named "&7シラカバの原木" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 birch log"]
  21. format slot 10 of player with 64 jungle log named "&7ジャングルの原木" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 jungle log"]
  22. format slot 11 of player with 64 acacia log named "&7アカシアの原木" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 acacia log"]
  23. format slot 12 of player with 64 dark oak log named "&7ダークオークの原木" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 dark oak log"]
  24. format slot 13 of player with 64 cobblestone named "&7丸石" with lore "&7購入価格:&c100円" to close then run [execute player command "/buyitem %player% 100 64 cobblestone"]
  25. format slot 14 of player with 64 sand named "&7砂" with lore "&7購入価格:&c2000円" to close then run [execute player command "/buyitem %player% 2000 64 sand"]
  26. format slot 15 of player with 64 white wool named "&7羊毛" with lore "&7購入価格:&c3000円" to close then run [execute player command "/buyitem %player% 3000 64 white wool"]
  27.  
  28. command /ores:
  29. trigger:
  30. wait 3 ticks
  31. open chest with 2 rows named "&9鉱石" to player
  32. format slot 0 of player with 1 diamond named "&bダイヤモンド" with lore "&7販売価格:&a250円" to close then run [execute player command "/sell %player% 250 diamond"]
  33. format slot 1 of player with 1 emerald named "&aエメラルド" with lore "&7販売価格:&a300円" to close then run [execute player command "/sell %player% 300 emerald"]
  34. format slot 2 of player with 1 gold ingot named "&6金インゴット" with lore "&7販売価格:&a75円" to close then run [execute player command "/sell %player% 75 gold ingot"]
  35. format slot 3 of player with 1 iron ingot named "&f鉄インゴット" with lore "&7販売価格:&a50円" to close then run [execute player command "/sell %player% 50 iron ingot"]
  36. format slot 4 of player with 1 redstone named "&4レッドストーン" with lore "&7販売価格:&a10円" to close then run [execute player command "/sell %player% 10 1 redstone"]
  37. format slot 5 of player with 1 lapis lazuli named "&1ラピスラズリ" with lore "&7販売価格:&a10円" to close then run [execute player command "/sell %player% 10 1 lapis lazuli"]
  38. format slot 6 of player with 1 coal named "&8石炭" with lore "&7販売価格:&a10円" to close then run [execute player command "/sell %player% 10 1 coal"]
  39. format slot 9 of player with 64 diamond named "&bダイヤモンド" with lore "&7販売価格:&a16000円" to close then run [execute player command "/sell %player% 16000 64 diamond"]
  40. format slot 10 of player with 64 emerald named "&aエメラルド" with lore "&7販売価格:&a19200円" to close then run [execute player command "/sell %player% 19200 64 emerald"]
  41. format slot 11 of player with 64 gold ingot named "&6金インゴット" with lore "&7販売価格:&a4800円" to close then run [execute player command "/sell %player% 4800 64 gold ingot"]
  42. format slot 12 of player with 64 iron ingot named "&f鉄インゴット" with lore "&7販売価格:&a3200円" to close then run [execute player command "/sell %player% 3200 64 iron ingot"]
  43. format slot 13 of player with 64 redstone named "&4レッドストーン" with lore "&7販売価格:&a640円" to close then run [execute player command "/sell %player% 640 64 redstone"]
  44. format slot 14 of player with 64 lapis lazuli named "&1ラピスラズリ" with lore "&7販売価格:&a640円" to close then run [execute player command "/sell %player% 640 64 lapis lazuli"]
  45. format slot 15 of player with 64 coal named "&8石炭" with lore "&7販売価格:&a640円" to close then run [execute player command "/sell %player% 640 64 coal"]
  46.  
  47. command /buyitem <player> <number> <item>:
  48. trigger:
  49. if arg 1's money is more than or equal to arg 2:
  50. remove arg 2 from arg 1's money
  51. give arg-3 to arg-1
  52. send "&a%arg 3%を買いました。"
  53. send "&d残金:&2%arg 1's money%"
  54. stop
  55. send "&cお金が足りません!"
  56. command /sell <player> <number> <item>:
  57. trigger:
  58. if arg 1 does not have arg 3:
  59. send "&cあなたは対象のアイテムを所持していません。"
  60. stop
  61. remove arg 3 from arg 1's inventory
  62. add arg 2 to arg 1's money
  63. send "&b%arg-3%を売りました。
Add Comment
Please, Sign In to add comment