Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on rightclick on witch:
- uncolored name of entity is "まとめて買取"
- set {_item} to player's tool
- set {_result} to 0
- set {_line} to 0
- set {_true} to true
- while {_true} is set:
- add 1 to {_line}
- set {_lore} to {_line}th line of lore of {_item}
- if {_lore} is not set:
- exit 2 sections
- add {_lore} to {_lores::*}
- delete {_lore}
- loop {_lores::*} :
- if uncolored loop-value contains "売値: ":
- set {_value} to (subtext of uncolored loop-value from 5 to length of loop-value) parsed as integer
- set {_amount} to amount of tool of player
- add {_value} * {_amount} to {_result}
- while {_true} is set:
- set {_count} to 0
- loop all items of player:
- if loop-item is {_item}:
- add 1 to {_count}
- remove loop-item from player
- if {_count} is 0:
- exit 2 sections
- execute console command "/money give %player% %{_result}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement