options: # Nazwa NPC u ktorego bedzie otwierane Drzewko Umiejetnosci npc: Sensei # Item w wolnym slocie. Jezeli nie chcesz ustawiac wpisz "air" freeSlot: black glass pane named "&r" # Wiadomosc przy zdobywaniu pkt pktMessage: &aOtrzymujesz 1 pkt! Mozesz go wydac na ulepszenie swojego drzewka umiejetnosci! # Code function addPoint(p: player): add 1 to {Player.wolnepkt::%{_p}%} send "{@pktMessage}" to {_p} on join: if {Player.wolnepkt::%player%} is not set: set {Player.wolnepkt::%player%} to 0 if {Player.sila::%player%} is not set: set {Player.sila::%player%} to 0 if {Player.zycie::%player%} is not set: set {Player.zycie::%player%} to 0 if {Player.obrona::%player%} is not set: set {Player.obrona::%player%} to 0 on right click on player: if name of clicked entity is "{@npc}": open chest with 3 rows named "&4&lWolne Pkt: &a&l%{Player.wolnepkt::%player%}%" to player set slot 0 of player's current inventory to {@freeSlot} loop 26 times: set slot loop-number of player's current inventory to {@freeSlot} if {Player.wolnepkt::%player%} is more than 0: if {Player.sila::%player%} is less than 105: set {_sila} to "||&aKliknij aby dodac pkt" set {_sila.status} to "&a%{Player.sila::%player%}%&8/&c105" else: set {_sila} to "" set {_sila.status} to "&6&lMAX" if {Player.zycie::%player%} is less than 105: set {_zycie} to "||&aKliknij aby dodac pkt" set {_zycie.status} to "&a%{Player.zycie::%player%}%&8/&c105" else: set {_zycie} to "" set {_zycie.status} to "&6&lMAX" if {Player.obrona::%player%} is less than 105: set {_obrona} to "||&aKliknij aby dodac pkt" set {_obrona.status} to "&a%{Player.obrona::%player%}%&8/&c105" else: set {_obrona} to "" set {_obrona.status} to "&6&lMAX" else: if {Player.sila::%player%} is less than 105: set {_sila} to "||&cNie masz wolnych pkt!" set {_sila.status} to "&a%{Player.sila::%player%}%&8/&c105" else: set {_sila} to "" set {_sila.status} to "&6&lMAX" if {Player.zycie::%player%} is less than 105: set {_zycie} to "||&cNie masz wolnych pkt!" set {_zycie.status} to "&a%{Player.zycie::%player%}%&8/&c105" else: set {_zycie} to "" set {_zycie.status} to "&6&lMAX" if {Player.obrona::%player%} is less than 105: set {_obrona} to "||&cNie masz wolnych pkt!" set {_obrona.status} to "&a%{Player.obrona::%player%}%&8/&c105" else: set {_obrona} to "" set {_obrona.status} to "&6&lMAX" set {_all} to ({Player.sila::%player%}+{Player.zycie::%player%}+{Player.obrona::%player%}) if {_all} is more than 0: set {_reset} to "||||&aKliknij aby zresetowac!" set slot 10 of player's current inventory to iron sword named "&8« &c&lSILA &8»" with lore "||&8» &7Aktualny status: %{_sila.status}%%{_sila}%" set slot 11 of player's current inventory to apple named "&8« &d&lZYCIE &8»" with lore "||&8» &7Aktualny status: %{_zycie.status}%%{_zycie}%" set slot 12 of player's current inventory to iron chestplate named "&8« &b&lOBRONA &8»" with lore "||&8» &7Aktualny status: %{_obrona.status}%%{_obrona}%" if {_reset} is set: set slot 16 of player's current inventory to redstone block named "&8« &4&lRESET PKT &8»" with lore "||&8» &7Koszt: &c100'000$%{_reset}%" on inventory click: if inventory name of player's current inventory contains "&4&lWolne Pkt:": cancel event if clicked slot is 10 or 11 or 12: if {Player.wolnepkt::%player%} is more than 0: close player's inventory if clicked slot is 10: remove 1 from {Player.wolnepkt::%player%} add 1 to {Player.sila::%player%} send "&aPomyslnie dodano pkt!" if clicked slot is 11: remove 1 from {Player.wolnepkt::%player%} add 1 to {Player.zycie::%player%} set max health of player to 10+({Player.zycie::%player%}/2) send "&aPomyslnie dodano pkt!" if clicked slot is 12: remove 1 from {Player.wolnepkt::%player%} add 1 to {Player.obrona::%player%} send "&aPomyslnie dodano pkt!" else: close player's inventory send "&cNie masz wolnych pkt aby dodac do tej statystyki!" else if clicked slot is 16: close player's inventory set {_all} to ({Player.sila::%player%}+{Player.zycie::%player%}+{Player.obrona::%player%}) if {_all} is more than 0: if money of player is more than 100000: add {_all} to {Player.wolnepkt::%player%} set {Player.sila::%player%} to 0 set {Player.zycie::%player%} to 0 set {Player.obrona::%player%} to 0 remove 100000 from player's money else: send "&cNie stac cie na to!" on damage: if attacker is a player: if {Player.sila::%attacker%} is more than 0: set {_add} to {Player.sila::%attacker%}/100 add {_add} to damage if victim is a player: if {Player.obrona::%victim%} is more than 0: set {_chance} to ({Player.obrona::%victim%}*0.25) chance of {_chance}%: cancel event send "&aZablokowales cios!" to victim send "&aGracz &c%victim% &azablokowal twoj cios!" to attacker