Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /bazar:
- trigger:
- set {_x} to chest with 1 rows named "&aMenu Sklep"
- set slot 3 of {_x} to 35:5 named "&aKupowanie Przedmiotow"
- set slot 5 of {_x} to 35:14 named "&cSprzedawanie Przedmiotow"
- open {_x} to player
- on inventory click:
- if inventory name of player's current inventory is "&aMenu Sklep":
- set {_slot} to clicked slot
- if {_slot} is smaller than 0:
- stop
- cancel event
- if {_slot} is 3:
- set {_x} to chest with 2 rows named "&aKupowanie Przedmiotow"
- set slot 0 of {_x} to 384 named "&aButeli Expa" with lore "&aIlosc&8: &664||&aKoszt&8: &61500 &a$"
- set slot 1 of {_x} to 368 named "&aPerelki" with lore "&aIlosc&8: &63||&aKoszt&8: &6600 &a$"
- set slot 2 of {_x} to 322 named "&aRefile" with lore "&aIlosc&8: &62||&aKoszt&8: &6750 &a$"
- set slot 3 of {_x} to 322:1 named "&eKox" with lore "&aIlosc&8: &61||&aKoszt&8: &62500 &a$"
- close player's inventory
- wait 2 tick
- open {_x} to player
- stop
- if {_slot} is 5:
- set {_x} to chest with 6 rows named "&cSprzedawanie Przedmiotow"
- set slot 0 of {_x} to 371 named "&a Samorodek" with lore "&cZa sprzedasz otrzymasz&8:||&65 &a$"
- set slot 1 of {_x} to 336 named "&a Cegla" with lore "&cZa sprzedasz otrzymasz&8:||&610 &a$"
- set slot 2 of {_x} to 265 named "&a Zelazo" with lore "&cZa sprzedasz otrzymasz&8:||&6100 &a$"
- set slot 3 of {_x} to 266 named "&a Zloto" with lore "&cZa sprzedasz otrzymasz&8:||&6250 &a$"
- set slot 4 of {_x} to 264 named "&a Diament" with lore "&cZa sprzedasz otrzymasz&8:||&e2000 &a$"
- close player's inventory
- wait 2 tick
- open {_x} to player
- stop
- stop
- if inventory name of player's current inventory is "&aKupowanie Przedmiotow":
- set {_slot} to clicked slot
- if {_slot} is smaller than 0:
- stop
- cancel event
- set {_item} to type of player's current inventory's slot {_slot}
- set {_ilosc} and {_koszt} to uncoloured lore of player's current inventory's slot {_slot}
- set {_koszt} to subtext of {_koszt} between index index of "||" in {_koszt} + 2 and index length of {_koszt} - 2
- replace all "Koszt: " in {_koszt} with ""
- set {_koszt} to {_koszt} parsed as number
- if player's balance is larger than or equal to {_koszt}:
- set {_ilosc} to subtext of {_ilosc} between index 0 and index of "||" in {_ilosc} - 1
- replace all "ilosc: " with "" in {_ilosc}
- remove {_koszt} from player's balance
- set {_item} to "%{_ilosc}% %{_item}%" parsed as item
- give {_item} to player
- send "Kupiles %name of player's current inventory's slot {_slot}%"
- stop
- send "Nie masz tyle pieniedzy."
- stop
- if inventory name of player's current inventory is "&cSprzedawanie Przedmiotow":
- set {_slot} to clicked slot
- if {_slot} is smaller than 0:
- stop
- cancel event
- set {_item} to "%type of player's current inventory's slot {_slot}%" parsed as material
- set {_x::*} to all items in player's inventory
- loop {_x::*}:
- if "%loop-value%" contains "%{_item}%":
- set {_x} to true
- exit loop
- clear {_x::*}
- if {_x} is set:
- delete {_x::*}
- remove {_item} from player
- set {_cena} to uncoloured lore of player's current inventory's slot {_slot}
- set {_cena} to subtext of {_cena} between index index of "||" in {_cena} + 2 and length of {_cena} - 2
- set {_cena} to {_cena} parsed as number
- add {_cena} to player's balance
- send "Sprzedales %name of player's current inventory's slot {_slot}%"
- stop
- send "Nie masz tego przedmiotu."
- stop
- command /hmoney [<text>]:
- permission: H.Sklep.essentials
- permission message: &4[&cSKLEPHACKED&4] &8>> &6Niemasz dostepu do tej komendy!
- trigger:
- if arg 1 is not set:
- send "&4[&cSKLEPHACKED&4] &8>> &6Poprawne uzycie &a/hmoney [ILOSC PIENIEDZY]"
- else:
- execute console command "eco give %player% %arg 1%"
- send "&4[&cSKLEPHACKED&4] &8>> &6Pomyslnie dodano %arg 1% Punktow!"
Advertisement
Add Comment
Please, Sign In to add comment