command /resetdzialka []: trigger: if arg 1 is set: if {dzialka.%arg 1%} is true: set line 1 of the block at {lokalizacjadzialki.%arg 1%} to "[&2Dzialka&0]" set line 2 of the block at {lokalizacjadzialki.%arg 1%} to "&aWOLNA" set line 3 of the block at {lokalizacjadzialki.%arg 1%} to "%{nazwaregionudzialka.%arg 1%}%" set line 4 of the block at {lokalizacjadzialki.%arg 1%} to " " execute console command "region removeowner %{nazwaregionudzialka.%arg 1%}% %arg 1% -w world" send "&cTwoja dzialka zostala sprzedana, przez Administratora" to arg 1 send "&aZresetowales graczowi &f%arg 1% &adzialke!" delete {dzialka.%arg 1%} delete {lokalizacjadzialki.%arg 1%} delete {nazwaregionudzialka.%arg 1%} stop else: send "&cGracz nie posiada dzialki!" stop else: send "&cPodaj nick gracza!" stop on sign change: if line 1 is "dzialka": if player has permission "stworz.dzialke": if line 2 is not empty: set line 1 to "[&2Dzialka&0]" set line 3 to "&aWOLNA" stop else: send "&cPodaj nazwe dzialki!" set event-block to air stop else: send "&cNie posiadasz uprawnien!" set event-block to air stop on right click: if clicked block is sign: if line 1 of clicked block is "[&2Dzialka&0]": if line 2 of clicked block is "Wlasciciel": if line 3 of clicked block is "%player%": wait 1 tick open chest with 1 row named "&0ZARZADZANIE DZIALKA" to player wait 2 ticks format slot 4 of player with 1 bedrock named "&a&lSprzedaj dzialke" to close then run [execute player command "/sprzedajdziasgljasng"] stop if line 1 of clicked block is "[&2Dzialka&0]": if line 3 of clicked block is "&aWOLNA": if player has 100 gold ingot: if {dzialka.%player%} is not true: remove 100 gold ingot from player set {nazwaregionudzialka.%player%} to line 2 set {dzialka.%player%} to true execute console command "region addowner %{nazwaregionudzialka.%player%}% %player% -w world" set {lokalizacjadzialki.%player%} to location of event-block set line 2 to "Wlasciciel" set line 3 to "%player%" set line 4 to " " send "&aZakupiles/as dzialke!" stop else: send "&cPosiadasz juz dzialke!" stop else: send "&cNie posiadasz 100 sztabek zlota, aby zakupic te dzialke!" stop else: send "&cTa Dzialka jest juz zajeta" stop command /sprzedajdziasgljasng: trigger: if {dzialka.%player%} is true: set line 1 of the block at {lokalizacjadzialki.%player%} to "[&2Dzialka&0]" set line 3 of the block at {lokalizacjadzialki.%player%} to "&aWOLNA" set line 2 of the block at {lokalizacjadzialki.%player%} to "%{nazwaregionudzialka.%player%}%" set line 4 of the block at {lokalizacjadzialki.%player%} to " " execute console command "region removeowner %{nazwaregionudzialka.%player%}% %player% -w world" send "&aTwoja dzialka zostala sprzedana!" delete {dzialka.%player%} delete {lokalizacjadzialki.%player%} delete {nazwaregionudzialka.%player%} stop