#AxShop Addon - Dodatki do skryptu na Sklep # --------------------------------------------- # # --------------- { AdminShop } --------------- # # --------------------------------------------- # #Skrypt polega na dodawaniu / ustawianiu / zabieraniu pieniedzy danemu graczowi command /adminshop [] [] []: permission: AxShop.adminshop or AxShop.* permission message: &c[AxShop] &7Nie posiadasz uprawnien! executable by: console and player trigger: if arg 1 is "add" or "remove" or "set": if arg 1 is "add": add arg 3 to {AxShop::player::%arg 2%} send "&7Poprawnie dodano &a%arg 3% &7Do konta gracza &a%arg 2%" if arg 1 is "remove": remove arg 3 from {AxShop::player::%arg 2%} send "&7Poprawnie zaprano &a%arg 3% &7Z konta gracza &a%arg 2%" if arg 1 is "set": set {AxShop::player::%arg 2%} to arg 3 send "&7Poprawnie ustawiono stan konta gracza &a%arg 2% &7na sume &a%arg 3%" send "&7Twoj nowy stan konta: &a%arg 3%" to arg 2 parsed as player stop send "&7/adminshop &c " # --------------------------------------------- # # ---------------- { SellAll } ---------------- # # --------------------------------------------- # #Skrypt polega na sprzedawaniu wszystkich możliwych itemów z inventory command /sellall []: permission: AxShop.sellall or AxShop.* permission message: &c[AxShop] &7Nie posiadasz uprawnien! trigger: loop (yaml nodes "Items" from file "AxShop/Sell.yml"): while player has AxShopReturnItem(player, "items::Sell::%loop-value%.Item"): remove AxShopReturnItem(player, "items::Sell::%loop-value%.Item") from player add {AxShop::config::items::Sell::%loop-value%.Price} to {AxShop::player::%player%} add {AxShop::config::items::Sell::%loop-value%.Price} to {_all} add 1 to {_itemall} set {_msg} to {AxShop::config::config::SellAll-Message} replace all "{COINS}" with "%{_all}%" in {_msg} replace all "{ITEMS}" with "%{_itemall}%" in {_msg} replace all "{COIN}" with "%{AxShop::player::%player%}%" in {_msg} replace all "{PLAYER}" with name of player in {_msg} send colored {_msg}