#$ Version: 2.0 $# command /portfel [] [] []: aliases: saldo trigger: if arg 1 is not set: send "&eTwoje saldo wynosi &6%{balance::%player%}%" if arg 2 is set: if arg 3 is set: if arg 1 is "add": if player has permission "portfel.add" or "portfel.*": add arg 3 to {balance::%arg-2%} send "&aDodano %arg-3% zł do konta gracza %arg-2%." else if arg 1 is "remove": if player has permission "portfel.remove" or "portfel.*": remove arg 3 from {balance::%arg-2%} send "&9Usunięto %arg-3% zł z konta gracza %arg-2%." else if arg 1 is "reset": if player has permission "portfel.reset" or "portfel.*": set {balance::%arg-2%} to 0 send "&cSaldo gracza %arg-2% zostało zresetowane." else if arg 1 is "eshop": if {EShop} is true: if executor is console: add arg 3 to {balance::%arg-2%} broadcast "&a%arg-2% właśnie doładował portfel o %arg-3% zł w sklepie internetowym." else: send "Tylko sklep internetowy może używać tej komendy." else if arg 1 is "reload": if executor is console: loadConfig(console) else if executor is player: loadConfig(player) on first join: set {balance::%player%} to 0 on load: set {_mainPath} to "plugins/Portfel" if {AxUpdate::AxUpdate} is not set: skutil download file from "https://code.skript.pl/0uFoPX6y/raw" to file "plugins/Skript/scripts/AxAutoUpdate.sk" execute console command "/sk reload AxAutoUpdate.sk" set {AxUpdate::Portfel::link} to "https://code.skript.pl/DZ1Nticy/raw" set {AxUpdate::Portfel::status} to true set {AxUpdate::Portfel::name} to "Portfel" set {AxUpdate::Portfel} to script send "Portfel by FixeQ" to console if skutil file "{_mainPath}/config.yml" exists: loadConfig(console) else: create file "{_mainPath}/config.yml" set yml value "TAB" from file "{_mainPath}/config.yml" to "true" set yml value "PlaceholderAPI" from file "{_mainPath}/config.yml" to "false" set yml value "ItemShop" from file "{_mainPath}/config.yml" to "false" loadConfig() on tab complete of "/portfel": if {TAB} is true: set tab completions for position 1 to "add", "remove" and "reset" on placeholderapi placeholder request for "portfel": if {PlaceholderPortfel} is true: set the result to "{balance::%player%}" function loadConfig(exe: text): send "&7[&ePortfel&7] &3Przeładowywanie configu&7..." to {_exe} set {TAB} to yml value "TAB" from file "{_mainPath}/config.yml" set {PlaceholderPortfel} to yml value "PlaceholderAPI" from file "{_mainPath}/config.yml" set {EShop} to yml value "ItemShop" from file "{_mainPath}/config.yml" send "&7[&ePortfel&7] &aPomyślnie przeładowano config&4!" to {_exe}