options: minzarobekdrwal: 2 #TU USTAWIASZ MINIMUM ZAROBKU DLA DRWALA maxzarobekdrwal: 5 #TU USTAWIASZ MAKSIMUM ZAROBKU DLA DRWALA szansazarobekdrwal: 50 #SZANSA NA ZAROBEK DLA DRWALA szansazarobekgornik: 50 #SZANSA NA ZAROBEK DLA GORNIKA minzarobekgornik: 2 #TU USTAWIASZ MINIMUM ZAROBKU DLA GORNIKA maxzarobekgornik: 5 #TU USTAWIASZ MAKSIMUM ZAROBKU DLA GORNIKA szansazarobeklowca: 50 #SZANSA NA ZAROBEK DLA LOWCY minzarobeklowca: 2 #TU USTAWIASZ MINIMUM ZAROBKU DLA LOWCY maxzarobeklowca: 4 #TU USTAWIASZ MAKSIMUM ZAROBKU DLA LOWCY #-------------------------------------------------# # PROSZE O NIE KASOWANIE TEJ LINIJKI # #-------------------------------------------------# on script load: send "&2]&a-----------&2[ &6&lPrace &2]&a-----------&2[" to console send "&a&lAutor:" to console send " &6ยป &cxGeorgeee: https://skript.pl/profil/7282-sirgeorge/" to console send "&2]&a------------------------------------&2[" to console #-------------------------------------------------# # PROSZE O NIE KASOWANIE TEJ LINIJKI # #-------------------------------------------------# command /prace: trigger: wait 1 tick open chest with 1 row named "&aDostepne prace" to player wait 2 ticks if {praca.%player%} is not set: format slot 3 of player with diamond axe named "&eDrwal" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga drwal"] format slot 4 of player with diamond pickaxe named "&eGornik" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga gornik"] format slot 5 of player with bow named "&eLowca" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga lowca"] if {praca.%player%} is "Drwal": format slot 3 of player with diamond axe named "&eDrwal" with lore "&c&lZATRUDNIONY/A" to close then run [execute player command "/asglnasga drwal"] format slot 4 of player with diamond pickaxe named "&eGornik" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga gornik"] format slot 5 of player with bow named "&eLowca" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga lowca"] if {praca.%player%} is "Gornik": format slot 3 of player with diamond axe named "&eDrwal" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga drwal"] format slot 4 of player with diamond pickaxe named "&eGornik" with lore "&c&lZATRUDNIONY/A" to close then run [execute player command "/asglnasga gornik"] format slot 5 of player with bow named "&eLowca" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga lowca"] if {praca.%player%} is "Lowca": format slot 3 of player with diamond axe named "&eDrwal" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga drwal"] format slot 4 of player with diamond pickaxe named "&eGornik" with lore "&a&lNIEZATRUDNIONY/A" to close then run [execute player command "/asglnasga gornik"] format slot 5 of player with bow named "&eLowca" with lore "&c&lZATRUDNIONY/A" to close then run [execute player command "/asglnasga lowca"] command /asglnasga []: trigger: if arg 1 is "drwal": if {praca.%player%} is not set: set {praca.%player%} to "Drwal" send "&aZatrudniles/as sie jako Drwal!" stop if {praca.%player%} is "Drwal": delete {praca.%player%} send "&cZwolniles/as sie z pracy jako Drwal!" stop else: send "&cPracujesz juz jako &a%{praca.%player%}%&c!%nl%&cZwolnij sie z poprzedniej pracy!" stop if arg 1 is "gornik": if {praca.%player%} is not set: set {praca.%player%} to "Gornik" send "&aZatrudniles/as sie jako Gornik!" stop if {praca.%player%} is "Gornik": delete {praca.%player%} send "&cZwolniles/as sie z pracy jako Gornik!" stop else: send "&cPracujesz juz jako &a%{praca.%player%}%&c!%nl%&cZwolnij sie z poprzedniej pracy!" stop if arg 1 is "lowca": if {praca.%player%} is not set: set {praca.%player%} to "Lowca" send "&aZatrudniles/as sie jako Lowca!" stop if {praca.%player%} is "Lowca": delete {praca.%player%} send "&cZwolniles/as sie z pracy jako Lowca!" stop else: send "&cPracujesz juz jako &a%{praca.%player%}%&c!%nl%&cZwolnij sie z poprzedniej pracy!" stop on break: if {praca.%player%} is "Drwal": if event-block is oak wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if event-block is birch wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if event-block is spruce wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if event-block is dark oak wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if event-block is jungle wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if event-block is acacia wood: chance of {@szansazarobekdrwal}%: set {_a} to a random integer between {@minzarobekdrwal} and {@maxzarobekdrwal} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop if {praca.%player%} is "Gornik": if event-block is stone or cobblestone or any ore: chance of {@szansazarobekgornik}%: set {_a} to a random integer between {@minzarobekgornik} and {@maxzarobekgornik} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to player send "&aZarobiles/as %{_a}% sztabek zlota!" to player stop on death: if victim is a entity: if attacker is a player: if {praca.%attacker%} is "Lowca": chance of {@szansazarobeklowca}%: set {_a} to a random integer between {@minzarobeklowca} and {@maxzarobeklowca} set {_item} to "%{_a}% gold ingot" parsed as item type give {_item} to attacker send "&aZarobiles/as %{_a}% sztabek zlota!" to attacker stop #-------------------------------------------------# # ZABEZPIECZENIE # #-------------------------------------------------# on quit: delete {praca.%player%}