Advertisement
nabe0929

Untitled

Jun 26th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. on rightclick on witch:
  2. uncolored name of entity is "まとめて買取"
  3. set {_item} to player's tool
  4. set {_result} to 0
  5. set {_line} to 0
  6. set {_true} to true
  7. while {_true} is set:
  8. add 1 to {_line}
  9. set {_lore} to {_line}th line of lore of {_item}
  10. if {_lore} is not set:
  11. exit 2 sections
  12. add {_lore} to {_lores::*}
  13. delete {_lore}
  14. loop {_lores::*} :
  15. if uncolored loop-value contains "売値: ":
  16. set {_value} to (subtext of uncolored loop-value from 5 to length of loop-value) parsed as integer
  17. set {_amount} to amount of tool of player
  18. add {_value} * {_amount} to {_result}
  19. while {_true} is set:
  20. set {_count} to 0
  21. loop all items of player:
  22. if loop-item is {_item}:
  23. add 1 to {_count}
  24. remove loop-item from player
  25. if {_count} is 0:
  26. exit 2 sections
  27. execute console command "/money give %player% %{_result}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement