Onenrico

Diamond Sell

May 20th, 2016
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1.  
  2. options:
  3. hargadiamond: 17.5
  4. betamode: "oke"
  5. hargabetamode: 1000
  6. namebeta: Rare Diamonds
  7. lorebeta: Rare Diamond yang Didapat dari Goa Rahasia
  8. on npc right click:
  9. if citizen name is "Diamond Buyer":
  10. open chest with 1 row named "Sell &bDiamond &0| Price: {@hargadiamond}" to player
  11. on inventory close:
  12. if inventory name of player's current inventory is "Sell &bDiamond &0| Price: {@hargadiamond}":
  13. loop all items in player's current inventory:
  14. set {_a} to "%loop-value%"
  15. set {_b::*} to {_a} split at " "
  16. set {_count} to number of loop-value in player's current inventory
  17. if inventory name of player's current inventory is "Sell &bDiamond &0| Price: {@hargadiamond}":
  18. if {_b::1} is set:
  19. loop 64 times:
  20. if {_b::1} is "%loop-num%":
  21. if {_b::2} is "diamonds":
  22.  
  23. set {_count} to {_b::1} parsed as number
  24. if {_b::3} is not set:
  25. if {@betamode} is "oke":
  26. set harga to {_count} * {@hargabetamode}
  27. if name of loop-value is "{@namebeta}":
  28. if lore of loop-value is "{@lorebeta}":
  29. send "&7[&b>&7]&fKamu Menjual &a%{_count}% &6%name of loop-value% &fSeharga &a$&b%{_harga}%"
  30. add 1 to {_beta}
  31. if {_beta} is not set:
  32. set {_harga} to {_count} * {@hargadiamond}
  33. add 1 to {_sudah}
  34. send "&7[&b>&7]&fKamu Menjual &a%{_count}% &6%{_b::2}% &fSeharga &a$&b%{_harga}%"
  35. add {_harga} to player's balance
  36. delete {_beta}
  37. else:
  38. add 1 to {_sudah}
  39. send "&7[&b>&7]&fKamu Tidak Dapat Menjual %loop-value-1%"
  40. give player loop-value-1
  41. else:
  42. add 1 to {_sudah}
  43. send "&7[&b>&7]&fKamu Tidak Dapat Menjual %loop-value-1%"
  44. give player loop-value-1
  45. if {_b::1} is "diamond":
  46. set {_count} to 1
  47. add 1 to {_sesi}
  48. if {_b::2} is not set:
  49. if {@betamode} is "oke":
  50. set harga to {_count} * {@hargabetamode}
  51. if name of loop-value is "{@namebeta}":
  52. if lore of loop-value is "{@lorebeta}":
  53. send "&7[&b>&7]&fKamu Menjual &a%{_count}% &6%name of loop-value% &fSeharga &a$&b%{_harga}%"
  54. add 1 to {_beta}
  55. add 1 to {_sudah}
  56. if {_beta} is not set:
  57. set {_harga} to {_count} * 17.5
  58. send "&7[&b>&7]&fKamu Menjual &a%{_count}% &6%{_b::1}% &fSeharga &a$&b%{_harga}%"
  59. add {_harga} to player's balance
  60. add 1 to {_sudah}
  61. delete {_beta}
  62. else:
  63. add 1 to {_sudah}
  64. send "&7[&b>&7]&fKamu Tidak Dapat Menjual %loop-value%"
  65. give player loop-value
  66. if {_sudah} is not set:
  67. add 1 to {_sudah}
  68. send "&7[&b>&7]&fKamu Tidak Dapat Menjual %loop-value%"
  69. give player loop-value
  70. delete {_sudah}
Advertisement
Add Comment
Please, Sign In to add comment