Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- set {shop::test} to "TEST"
- set {shop::test::0} to 1 diamond with named "&a宝石" lore "コンパスでダイヤを探すマン"
- set {shop::test::0::A} to 1 compass
- set {shop::test::0::B} to 1 diamond
- set {shop::test::9} to 1 compass named "丸石"
- set {shop::test::9::A} to 1 cobblestone
- set {shop::test::9::B} to 1 compass
- set {shop::test::1} to 1 wooden sword named "&r木の大剣" with lore "&r1A"
- set {shop::test::1::A} to 1
- set {shop::test::1::B} to {importitem::0}
- on rightclick on villager:
- name of event-entity contain "&k&r"
- cancel event
- loop {shop::*}:
- name of event-entity contain loop-value
- set {_shopname} to loop-index
- open chest with 3 rows named {_shopname} to player
- wait 1 tick
- loop {shop::%{_shopname}%::*}:
- set {_slot} to loop-index
- set {_item} to loop-value
- set {_buy} to "buy %player% %{_shopname}% %{_slot}%"
- format slot {_slot} parsed as number of player with {_item} to run {_buy}
- command /buy <player> <text> <number>:
- trigger:
- if {shop::%arg 2%::%arg 3%::A} is item:
- arg 1 has {shop::%arg 2%::%arg 3%::A}
- remove {shop::%arg 2%::%arg 3%::A} from arg 1's inventory
- give arg-1 {shop::%arg 2%::%arg 3%::B}
- else if {shop::%arg 2%::%arg 3%::A} is number:
- {money::%arg 1%} >= {shop::%arg 2%::%arg 3%::A}
- set {money::%arg 1%} to {money::%arg 1%} - {shop::%arg 2%::%arg 3%::A}
- give arg-1 {shop::%arg 2%::%arg 3%::B}
- command /import [<text>] [<number>]:
- trigger:
- if arg-1 is "list":
- message "%{importitem::*}%"
- else:
- if arg-2 exist:
- set {importitem::%arg-2%} to player's tool
- else:
- set {importitem::*} to player's tool
- command /money:
- trigger:
- set {money::%player%} to 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement