Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. on load:
  2. set {shop::test} to "TEST"
  3. set {shop::test::0} to 1 diamond with named "&a宝石" lore "コンパスでダイヤを探すマン"
  4. set {shop::test::0::A} to 1 compass
  5. set {shop::test::0::B} to 1 diamond
  6. set {shop::test::9} to 1 compass named "丸石"
  7. set {shop::test::9::A} to 1 cobblestone
  8. set {shop::test::9::B} to 1 compass
  9. set {shop::test::1} to 1 wooden sword named "&r木の大剣" with lore "&r1A"
  10. set {shop::test::1::A} to 1
  11. set {shop::test::1::B} to {importitem::0}
  12.  
  13. on rightclick on villager:
  14. name of event-entity contain "&k&r"
  15. cancel event
  16. loop {shop::*}:
  17. name of event-entity contain loop-value
  18. set {_shopname} to loop-index
  19. open chest with 3 rows named {_shopname} to player
  20. wait 1 tick
  21. loop {shop::%{_shopname}%::*}:
  22. set {_slot} to loop-index
  23. set {_item} to loop-value
  24. set {_buy} to "buy %player% %{_shopname}% %{_slot}%"
  25. format slot {_slot} parsed as number of player with {_item} to run {_buy}
  26.  
  27. command /buy <player> <text> <number>:
  28. trigger:
  29. if {shop::%arg 2%::%arg 3%::A} is item:
  30. arg 1 has {shop::%arg 2%::%arg 3%::A}
  31. remove {shop::%arg 2%::%arg 3%::A} from arg 1's inventory
  32. give arg-1 {shop::%arg 2%::%arg 3%::B}
  33. else if {shop::%arg 2%::%arg 3%::A} is number:
  34. {money::%arg 1%} >= {shop::%arg 2%::%arg 3%::A}
  35. set {money::%arg 1%} to {money::%arg 1%} - {shop::%arg 2%::%arg 3%::A}
  36. give arg-1 {shop::%arg 2%::%arg 3%::B}
  37.  
  38. command /import [<text>] [<number>]:
  39. trigger:
  40. if arg-1 is "list":
  41. message "%{importitem::*}%"
  42. else:
  43. if arg-2 exist:
  44. set {importitem::%arg-2%} to player's tool
  45. else:
  46. set {importitem::*} to player's tool
  47.  
  48. command /money:
  49. trigger:
  50. set {money::%player%} to 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement