WyEiCfNX
Język: Skript
|
Autor: Anonimowy
options: # Cena w złotówkach za zakup MVPa cenaMVP: 1000 # Permisja charakterystyczna dla MVPa permisjaMVP: permisja.mvp # Cena w złotówkach za zakup SVIPa cenaSVIP: 800 # Permisja charakterystyczna dla SVIPa permisjaSVIP: permisja.svip # Cena w złotówkach za zakup VIPa cenaVIP: 500 # Permisja charakterystyczna dla VIPa permisjaVIP: permisja.vip # Nazwa GUI od sklepu GUIname: &a&lSklep function setShopGUISlot(p: player, c: number, r: integers, rank: integer, inv: inventory, s: integer, i: item, n: text, lore1: texts, lore2: texts, lore3: texts): if {_rank} is between {_r::1} and {_r::2}: set {_item} to {_i} enchant {_item} with infinity 10 set slot {_s} of {_inv} to {_item} named {_n} with lore {_lore1::*} else if {stanKonta::zlotowki::%{_p}%} > {_c}: set slot {_s} of {_inv} to {_i} named {_n} with lore {_lore2::*} else: set slot {_s} of {_inv} to {_i} named {_n} with lore {_lore3::*} function buyShopGUIRank(p: player, c: number, i: item, t: text, cmd: text): level of infinity of {_i} is set: send "&6Już posiadasz rangę %{_t}%&6!" to {_p} stop {_c} > {stanKonta::zlotowki::%{_p}%}: send "&6Nie posiadasz wystarczająco dużo środków na koncie!" to {_p} stop remove {_c} from {stanKonta::zlotowki::%{_p}%} execute console command {_cmd} send "&aZakupiłeś rangę %{_t}%&a!" to {_p} command /zlotowki:ustaw [<offline player>] [<number>]: aliases: /zlotowki:set permission: permisja.permisja trigger: arg-1 is not set: send "&cPodaj gracza, któremu chcesz ustawić stan konta!" to sender stop arg-2 is not set: send "&cPodaj ilość pieniędzy, jaką chcesz ustawić temu graczowi!" to sender stop set {stanKonta::zlotowki::%arg-1%} to arg-2 send "&aUstawiłeś stan konta gracza &e%arg-1% &ana &6%arg-2% &azłotych!" to sender command /zlotowki:dodaj [<offline player>] [<number>]: aliases: /zlotowki:doladuj, /zlotowki:add permission: permisja.permisja trigger: arg-1 is not set: send "&cPodaj gracza, któremu chcesz doładować konto!" to sender stop arg-2 is not set: send "&cPodaj ilość pieniędzy, jaką chcesz doładować temu graczowi!" to sender stop add arg-2 to {stanKonta::zlotowki::%arg-1%} send "&aDoładowałeś &6%arg-2% &azłotych do konta gracza &e%arg-1%&a!" to sender command /zlotowki:odbierz [<offline player>] [<number>]: aliases: /zlotowki:odejmij, /zlotowki:zabierz, /zlotowki:remove permission: permisja.permisja trigger: arg-1 is not set: send "&cPodaj gracza, któremu chcesz odebrać pieniądze z konta!" to sender stop arg-2 is not set: send "&cPodaj ilość pieniędzy, jaką chcesz odebrać temu graczowi!" to sender stop if arg-2 > {stanKonta::zlotowki::%arg-1%}: set {stanKonta::zlotowki::%arg-1%} to 0 else: remove arg-2 from {stanKonta::zlotowki::%arg-1%} send "&aOdjąłeś &6%arg-2% &azłotych od stanu konta gracza &e%arg-1%&a!" to sender command /sklep: trigger: set {_g} to chest inventory with 3 rows named "{@GUIname}" set slot (integers between 0 and 26) of {_g} to white stained glass pane named " " set slot (integers between 9 and 17) of {_g} to gray stained glass pane named " " if player has permission "{@permisjaMVP}": set {_rank} to 1 else if player has permission "{@permisjaSVIP}": set {_rank} to 2 else if player has permission "{@permisjaVIP}": set {_rank} to 3 else: set {_rank} to 4 setShopGUISlot(player, {@cenaVIP}, (1 and 3), {_rank}, {_g}, 11, iron block, "&eVIP", "&aJuż posiadasz rangę VIP!", "&7Zakup VIPa za &a{@cenaVIP} &7złotych!", ("&7Nie stać cię na zakup VIPa!" and " &7Potrzebujesz &6{@cenaVIP} &azłotych!")) setShopGUISlot(player, {@cenaSVIP}, (1 and 2), {_rank}, {_g}, 13, gold block, "&6SVIP", "&aJuż posiadasz rangę SVIP!", "&7Zakup SVIPa za &a{@cenaSVIP} &7złotych!", ("&7Nie stać cię na zakup SVIPa!" and " &7Potrzebujesz &6{@cenaSVIP} &azłotych!")) setShopGUISlot(player, {@cenaMVP}, (1 and 1), {_rank}, {_g}, 15, diamond block, "&bMVP", "&aJuż posiadasz rangę MVP!", "&7Zakup MVPa za &a{@cenaMVP} &7złotych!", ("&7Nie stać cię na zakup MVPa!" and " &7Potrzebujesz &6{@cenaMVP} &azłotych!")) open {_g} to player on inventory click: name of player's current inventory is "{@GUIname}" clicked inventory is not player's inventory cancel event if clicked slot is 11: set {_i} to event-slot buyShopGUIRank(player, {@cenaVIP}, {_i}, "VIP", "lp user %player% parent set vip") else if clicked slot is 13: set {_i} to event-slot buyShopGUIRank(player, {@cenaSVIP}, {_i}, "SVIP", "lp user %player% parent set svip") else if clicked slot is 15: set {_i} to event-slot buyShopGUIRank(player, {@cenaMVP}, {_i}, "MVP", "lp user %player% parent set mvp")