Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. on right click:
  2. if lore of player's tool contains "[Trade]":
  3. open "FURNACE" named "&aRandom Trade" to player
  4. format slot 1 of player with a green stained glass pane named "&aXác nhận" with lore "&a- sau khi bấm xác nhận||&a- Số lượng item hiện phía trên||&a- Sẽ bị lấy khỏi rương đồ của bạn" to be unstealable
  5. format slot 2 of player with a red stained glass pane named "&cItem sẽ xuất hiện ở đây" to be unstealable
  6. on inventory click:
  7. if inventory type of player's current inventory is "Furnace":
  8. if name of player's current inventory is "&aRandom Trade":
  9. cancel event
  10. if inventory type of player's current inventory is "Furnace":
  11. if name of clicked item is "&aXác nhận":
  12. set {_i} to slot 0 of player's current inventory
  13. set {_a} to amount of slot 0 of player's current inventory
  14. set {_n} to name of slot 0 of player's current inventory
  15. set {_l} to lore of slot 0 of player's current inventory
  16. if {_i} is diamond:
  17. set {_int} to 5
  18. chance of 80+{_a}%:
  19. set {_int} to 6
  20. chance of 70+{_a}%:
  21. set {_int} to 7
  22. chance of 50+{_a}%:
  23. set {_int} to 8
  24. chance of 30+{_a}%:
  25. set {_int} to 9
  26. chance of 10+{_a}%:
  27. set {_int} to 10
  28. message "%{_int}%"
  29. set {_int} to {_int} parsed as number
  30. set {_a} to {_a} parsed as integer
  31. remove {_a} {_i} with lore "%{_l}%" from the player
  32. set slot 2 of player's current inventory to a Diamond Chestplate of Protection {_int} with lore "[Thành Phẩm]"
  33. set slot 0 of player's current inventory to air
  34. if lore of clicked item contains "[Thành Phẩm]":
  35. give a diamond chestplate of protection {_int} to the player
  36. close player's inventory
  37. if lore of clicked item contains "&a[Nguyên Liệu]":
  38. if inventory type of player's current inventory is "Furnace":
  39. if name of player's current inventory is "&aRandom Trade":
  40. cancel event
  41. set {_i} to clicked item
  42. set {_a} to amount of clicked item
  43. set {_n} to name of clicked item
  44. set {_l} to lore of clicked item
  45. format slot 0 of player with {_a} of {_i} named "%{_n}%" with lore "%{_l}%" to be unstealable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement