options: version: 1.6.1 #config starting-needed-xp: 200 max-lvl: 120 needed-xp-multiplier: 1.33 announce-new-level-every-x-levels: 10 min-level-to-use-chat: 1 #messages get-xp-message: "&a+%{_a}% xp &3%{TheValueRPG::xp::%{_p}%}%/%{TheValueRPG::wymxp::%{_p}%}% &c%{TheValueRPG::pc::%{_p}%}%%%" max-lvl-reached-message-on-xp-get: "&c&lMasz maksymalny poziom!" new-lvl-message: "&2&lAwansowałeś na &3&l%{TheValueRPG::lvl::%{_p}%}% &2&lpoziom!" announce-new-level-every-x-levels-message: "&aGracz &2%{_p}% &aosiągnął &7%{TheValueRPG::lvl::%{_p}%}% &cpoziom!" cannot-use-chat: &cMusisz osiągnąć &3%{TheValueRPG::other::minlvl}% &cpoziom żeby pisać na czacie! Aktualnie posiadasz &7%{TheValueRPG::lvl::%{_p}%} ? 0% &cpoziom. on load: set {TheValueRPG::other::minlvl} to {@min-level-to-use-chat} function addExp(a: number, p: player): if {TheValueRPG::lvl::%{_p}%} is {@max-lvl}: send action bar {@max-lvl-reached-message-on-xp-get} to {_p} stop if {TheValueRPG::wymxp::%{_p}%} is not set: set {TheValueRPG::wymxp::%{_p}%} to {@starting-needed-xp} set {_a} to ({_a} * (({TheValueRPG::xpmult} ? 100) / 100)) add {_a} to {TheValueRPG::xp::%{_p}%} set {TheValueRPG::pc::%{_p}%} to {TheValueRPG::xp::%{_p}%} / {TheValueRPG::wymxp::%{_p}%} * 100 send action bar {@get-xp-message} to {_p} if {TheValueRPG::xp::%{_p}%} is more than {TheValueRPG::wymxp::%{_p}%}: clear {TheValueRPG::xp::%{_p}%} add 1 to {TheValueRPG::lvl::%{_p}%} send {@new-lvl-message} to {_p} set {TheValueRPG::wymxp::%{_p}%} to rounded {TheValueRPG::wymxp::%{_p}%} * {@needed-xp-multiplier} clear {TheValueRPG::pc::%{_p}%} if {TheValueRPG::lvl::%{_p}%} is divisible by {@announce-new-level-every-x-levels}: send {@announce-new-level-every-x-levels-message} to all players function setXpMultiplier(i: integer): set {TheValueRPG::xpmult} to {_i} function getXpMultiplier() :: integer: return {TheValueRPG::xpmult} ? 0 function setLvl(p: player, i: integer): set {TheValueRPG::lvl::%{_p}%} to {_i} function getLvl(p: player) :: integer: return {TheValueRPG::lvl::%{_p}%} ? 0 command /lvl []: aliases: /poziom, /level trigger: send "&8[&a*&8]----------[&3&lTheValueRPG&8]----------[&a*&8]" send "&3Poziom: &7%{TheValueRPG::lvl::%arg-1%} ? 0%" send "&3Postęp: &7%{TheValueRPG::xp::%arg-1%} ? 0%&8/&7%{TheValueRPG::wymxp::%arg-1%} ? {@starting-needed-xp}% &8(&3%{TheValueRPG::pc::%arg-1%} ? 0%&3%%&8)" send "&3Otrzymywany xp: &7%{TheValueRPG::xpmult} ? 100%&7%%" send "&8[&a*&8]----------[&3&l%arg-1%&8]----------[&a*&8]" command /TheValueLvls [] [] []: permission: TheValueRPG.command permission message: &cThis server is using &7TheValueRPG &cversion &7{@version} trigger: if arg-1 is "help": send "&7Commands: " send " &3/TheValueLvls setlvl &7- Sets player's level" send " &3/TheValueLvls setmultiplier &7- Sets xp multiplier" send " &3/TheValueLvls reset &7- Resets every variable" if arg-1 is "setlvl": setLvl(arg-2 parsed as player, arg-3) if arg-3 is set if arg-1 is "setmultiplier": setXpMultiplier(arg-2 parsed as integer) if arg-2 is set if arg-1 is "reset": clear {TheValueRPG::*} on chat: if {TheValueRPG::lvl::%player%} ? 0 < {TheValueRPG::other::minlvl}: cancel event send "{@cannot-use-chat}" replace all "{LVL}" with "%{TheValueRPG::lvl::%player%} ? 0%" in chat format on join: if player has permission "TheValueRPG.notify": set {_version} to text from "https://pastebin.com/raw/DZAxeg0Q" wait 1 tick if {_version} is "{@version}": stop send "&8[&3&lTheValueRPG&8] &cNew update is available! You have &7{@version}&c, latest is &7%{_version}%" send "&7https://skript.pl/temat/35250-helioslvls-skrypt-na-poziomy-na-serwer-rpg/" on death: If attacker is player: If victim's name is "&6Slaby Zombie &8[&6Lvl 1&8]" addExp(2, attacker)