knugi

Untitled

Jun 10th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. command /bazar:
  2. trigger:
  3. set {_x} to chest with 1 rows named "&aMenu Sklep"
  4. set slot 3 of {_x} to 35:5 named "&aKupowanie Przedmiotow"
  5. set slot 5 of {_x} to 35:14 named "&cSprzedawanie Przedmiotow"
  6. open {_x} to player
  7. on inventory click:
  8. if inventory name of player's current inventory is "&aMenu Sklep":
  9. set {_slot} to clicked slot
  10. if {_slot} is smaller than 0:
  11. stop
  12. cancel event
  13. if {_slot} is 3:
  14. set {_x} to chest with 2 rows named "&aKupowanie Przedmiotow"
  15. set slot 0 of {_x} to 384 named "&aButeli Expa" with lore "&aIlosc&8: &664||&aKoszt&8: &61500 &a$"
  16. set slot 1 of {_x} to 368 named "&aPerelki" with lore "&aIlosc&8: &63||&aKoszt&8: &6600 &a$"
  17. set slot 2 of {_x} to 322 named "&aRefile" with lore "&aIlosc&8: &62||&aKoszt&8: &6750 &a$"
  18. set slot 3 of {_x} to 322:1 named "&eKox" with lore "&aIlosc&8: &61||&aKoszt&8: &62500 &a$"
  19. close player's inventory
  20. wait 2 tick
  21. open {_x} to player
  22. stop
  23. if {_slot} is 5:
  24. set {_x} to chest with 6 rows named "&cSprzedawanie Przedmiotow"
  25. set slot 0 of {_x} to 371 named "&a Samorodek" with lore "&cZa sprzedasz otrzymasz&8:||&65 &a$"
  26. set slot 1 of {_x} to 336 named "&a Cegla" with lore "&cZa sprzedasz otrzymasz&8:||&610 &a$"
  27. set slot 2 of {_x} to 265 named "&a Zelazo" with lore "&cZa sprzedasz otrzymasz&8:||&6100 &a$"
  28. set slot 3 of {_x} to 266 named "&a Zloto" with lore "&cZa sprzedasz otrzymasz&8:||&6250 &a$"
  29. set slot 4 of {_x} to 264 named "&a Diament" with lore "&cZa sprzedasz otrzymasz&8:||&e2000 &a$"
  30. close player's inventory
  31. wait 2 tick
  32. open {_x} to player
  33. stop
  34. stop
  35. if inventory name of player's current inventory is "&aKupowanie Przedmiotow":
  36. set {_slot} to clicked slot
  37. if {_slot} is smaller than 0:
  38. stop
  39. cancel event
  40. set {_item} to type of player's current inventory's slot {_slot}
  41. set {_ilosc} and {_koszt} to uncoloured lore of player's current inventory's slot {_slot}
  42.  
  43. set {_koszt} to subtext of {_koszt} between index index of "||" in {_koszt} + 2 and index length of {_koszt} - 2
  44. replace all "Koszt: " in {_koszt} with ""
  45. set {_koszt} to {_koszt} parsed as number
  46. if player's balance is larger than or equal to {_koszt}:
  47. set {_ilosc} to subtext of {_ilosc} between index 0 and index of "||" in {_ilosc} - 1
  48. replace all "ilosc: " with "" in {_ilosc}
  49. remove {_koszt} from player's balance
  50. set {_item} to "%{_ilosc}% %{_item}%" parsed as item
  51. give {_item} to player
  52. send "Kupiles %name of player's current inventory's slot {_slot}%"
  53. stop
  54. send "Nie masz tyle pieniedzy."
  55. stop
  56. if inventory name of player's current inventory is "&cSprzedawanie Przedmiotow":
  57. set {_slot} to clicked slot
  58. if {_slot} is smaller than 0:
  59. stop
  60. cancel event
  61. set {_item} to "%type of player's current inventory's slot {_slot}%" parsed as material
  62. set {_x::*} to all items in player's inventory
  63. loop {_x::*}:
  64. if "%loop-value%" contains "%{_item}%":
  65. set {_x} to true
  66. exit loop
  67. clear {_x::*}
  68. if {_x} is set:
  69. delete {_x::*}
  70. remove {_item} from player
  71. set {_cena} to uncoloured lore of player's current inventory's slot {_slot}
  72. set {_cena} to subtext of {_cena} between index index of "||" in {_cena} + 2 and length of {_cena} - 2
  73. set {_cena} to {_cena} parsed as number
  74. add {_cena} to player's balance
  75. send "Sprzedales %name of player's current inventory's slot {_slot}%"
  76. stop
  77. send "Nie masz tego przedmiotu."
  78. stop
  79. command /hmoney [<text>]:
  80. permission: H.Sklep.essentials
  81. permission message: &4[&cSKLEPHACKED&4] &8>> &6Niemasz dostepu do tej komendy!
  82. trigger:
  83. if arg 1 is not set:
  84. send "&4[&cSKLEPHACKED&4] &8>> &6Poprawne uzycie &a/hmoney [ILOSC PIENIEDZY]"
  85. else:
  86. execute console command "eco give %player% %arg 1%"
  87. send "&4[&cSKLEPHACKED&4] &8>> &6Pomyslnie dodano %arg 1% Punktow!"
Advertisement
Add Comment
Please, Sign In to add comment