y8U3IMCt
Język: Skript
|
Autor: Shooterowy
options: inv_name: "&9&lSchowek" inv_rows: 1 item_tlo: black stained glass pane item_tlo_nazwa: "&8Puste pole" slot_perly: 2 item_perly: ender pearl item_perly_nazwa: "&3Perły" slot_refile: 4 item_refile: golden apple item_refile_nazwa: "&eRefile" slot_koxy: 6 item_koxy: enchanted golden apple item_koxy_nazwa: "&6Koxy" maks_perel: 16 maks_refili: 64 maks_koxow: 16 on join: if {Schowek::%player%::perly} is not set: set {Schowek::%player%::perly} to 0 set {Schowek::%player%::refile} to 0 set {Schowek::%player%::koxy} to 0 command /schowek: trigger: open chest with {@inv_rows} row named {@inv_name} to player loop {@inv_rows}*9 times: set slot loop-number - 1 of player's current inventory to {@item_tlo} named {@item_tlo_nazwa} set slot {@slot_perly} of player's current inventory to {@item_perly} named {@item_perly_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::perly}%", "&9W ekwipunku: &c%number of ender pearls in player's inventory%", "&9Pojemność schowka: &c{@maks_perel}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7perłę.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7perły.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7perłę." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7perły." set slot {@slot_refile} of player's current inventory to {@item_refile} named {@item_refile_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::refile}%", "&9W ekwipunku: &c%number of golden apple in player's inventory%" and "&9Pojemność schowka: &c{@maks_refili}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7refila.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7refile.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7refila." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7refile." set slot {@slot_koxy} of player's current inventory to {@item_koxy} named {@item_koxy_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::koxy}%", "&9W ekwipunku: &c%number of enchanted golden apple in player's inventory%" and "&9Pojemność schowka: &c{@maks_koxow}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7koxa.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7koxy.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7koxa." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7koxy." on inventory click: if inventory name of player's current inventory is {@inv_name}: cancel event if clicked slot is {@item_perly}: if name of clicked slot is {@item_perly_nazwa}: if click type is left mouse button: if {Schowek::%player%::perly} is {@maks_perel}: send "&cSchowek pereł jest pełny." stop if player doesn't have ender pearl: send "&cNie masz żadnych pereł w ekwipunku." stop add 1 to {Schowek::%player%::perly} remove ender pearl from player send "&7Włożyłeś &c1 &7perłę do schowka." else if click type is left mouse button with shift: if {Schowek::%player%::perly} is {@maks_perel}: send "&cSchowek pereł jest pełny." stop if player doesn't have ender pearl: send "&cNie masz żadnych pereł w ekwipunku." stop if number of ender pearls in player's inventory is more than or equal to {@maks_perel}-{Schowek::%player%::perly}: set {_added} to {@maks_perel}-{Schowek::%player%::perly} else: set {_added} to number of ender pearls in player's inventory remove {_added} of ender pearls from player add {_added} to {Schowek::%player%::perly} send "&7Włożyłeś &c%{_added}% &7pereł do schowka." else if click type is right mouse button: if {Schowek::%player%::perly} is 0: send "&cSchowek pereł jest pusty." stop if player doesn't have enough space for ender pearl: send "&cNie masz miejsca w ekwipunku." stop remove 1 from {Schowek::%player%::perly} add ender pearl to player send "&7Wyjąłeś &c1 &7perłę ze schowka." else if click type is right mouse button with shift: if {Schowek::%player%::perly} is 0: send "&cSchowek pereł jest pusty." stop if player doesn't have enough space for 1 of ender pearl: send "&cNie masz miejsca w ekwipunku." stop set {_canhold} to 1 loop {Schowek::%player%::perly} times: if player has enough space for loop-number of ender pearls: set {_canhold} to loop-number else: exit loop remove {_canhold} from {Schowek::%player%::perly} add {_canhold} of ender pearls to player send "&7Wyjąłeś &c%{_canhold}% &7pereł ze schowka" set slot {@slot_perly} of player's current inventory to {@item_perly} named {@item_perly_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::perly}%", "&9W ekwipunku: &c%number of ender pearls in player's inventory%", "&9Pojemność schowka: &c{@maks_perel}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7perłę.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7perły.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7perłę." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7perły." stop stop if clicked slot is {@item_refile}: if name of clicked slot is {@item_refile_nazwa}: if click type is left mouse button: if {Schowek::%player%::refile} is {@maks_refili}: send "&cSchowek refili jest pełny." stop if player doesn't have golden apple: send "&cNie masz żadnych refili w ekwipunku." stop add 1 to {Schowek::%player%::refile} remove golden apple from player send "&7Włożyłeś &c1 &7refila do schowka." else if click type is left mouse button with shift: if {Schowek::%player%::refile} is {@maks_refili}: send "&cSchowek refili jest pełny." stop if player doesn't have golden apple: send "&cNie masz żadnych refili w ekwipunku." stop if number of golden apple in player's inventory is more than or equal to {@maks_refili}-{Schowek::%player%::refile}: set {_added} to {@maks_refili}-{Schowek::%player%::refile} else: set {_added} to number of golden apple in player's inventory remove {_added} of golden apple from player add {_added} to {Schowek::%player%::refile} send "&7Włożyłeś &c%{_added}% &7refili do schowka." else if click type is right mouse button: if {Schowek::%player%::refile} is 0: send "&cSchowek refili jest pusty." stop if player doesn't have enough space for golden apple: send "&cNie masz miejsca w ekwipunku." stop remove 1 from {Schowek::%player%::refile} add golden apple to player send "&7Wyjąłeś &c1 &7refila ze schowka." else if click type is right mouse button with shift: if {Schowek::%player%::refile} is 0: send "&cSchowek refili jest pusty." stop if player doesn't have enough space for golden apple: send "&cNie masz miejsca w ekwipunku." stop set {_canhold} to 1 loop {Schowek::%player%::refile} times: if player has enough space for loop-number of golden apple: set {_canhold} to loop-number else: exit loop remove {_canhold} from {Schowek::%player%::refile} add {_canhold} of golden apple to player send "&7Wyjąłeś &c%{_canhold}% &7refili ze schowka" set slot {@slot_refile} of player's current inventory to {@item_refile} named {@item_refile_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::refile}%", "&9W ekwipunku: &c%number of golden apple in player's inventory%" and "&9Pojemność schowka: &c{@maks_refili}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7refila.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7refile.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7refila." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7refile." stop stop if clicked slot is {@item_koxy}: if name of clicked slot is {@item_koxy_nazwa}: if click type is left mouse button: if {Schowek::%player%::koxy} is {@maks_koxow}: send "&cSchowek koxów jest pełny." stop if player doesn't have enchanted golden apple: send "&cNie masz żadnych koxów w ekwipunku." stop add 1 to {Schowek::%player%::koxy} remove enchanted golden apple from player send "&7Włożyłeś &c1 &7koxa do schowka." else if click type is left mouse button with shift: if {Schowek::%player%::koxy} is {@maks_koxow}: send "&cSchowek koxów jest pełny." stop if player doesn't have enchanted golden apple: send "&cNie masz żadnych koxów w ekwipunku." stop if number of enchanted golden apple in player's inventory is more than or equal to {@maks_koxow}-{Schowek::%player%::koxy}: set {_added} to {@maks_koxow}-{Schowek::%player%::koxy} else: set {_added} to number of enchanted golden apple in player's inventory remove {_added} of enchanted golden apple from player add {_added} to {Schowek::%player%::koxy} send "&7Włożyłeś &c%{_added}% &7koxów do schowka." else if click type is right mouse button: if {Schowek::%player%::koxy} is 0: send "&cSchowek koxów jest pusty." stop if player doesn't have enough space for enchanted golden apple: send "&cNie masz miejsca w ekwipunku." stop remove 1 from {Schowek::%player%::koxy} add enchanted golden apple to player send "&7Wyjąłeś &c1 &7koxa ze schowka." else if click type is right mouse button with shift: if {Schowek::%player%::koxy} is 0: send "&cSchowek koxów jest pusty." stop if player doesn't have enough space for enchanted golden apple: send "&cNie masz miejsca w ekwipunku." stop set {_canhold} to 1 loop {Schowek::%player%::koxy} times: if player has enough space for loop-number of enchanted golden apple: set {_canhold} to loop-number else: exit loop remove {_canhold} from {Schowek::%player%::koxy} add {_canhold} of enchanted golden apple to player send "&7Wyjąłeś &c%{_canhold}% &7koxów ze schowka" set slot {@slot_koxy} of player's current inventory to {@item_koxy} named {@item_koxy_nazwa} with lore "&9W schowku: &c%{Schowek::%player%::koxy}%", "&9W ekwipunku: &c%number of enchanted golden apple in player's inventory%" and "&9Pojemność schowka: &c{@maks_koxow}", "", "&7Kliknij &eLPM&7, żeby schować &c1 &7koxa.", "&7Kliknij &eSHIFT+LPM&7, żeby schować &cwszystkie &7koxy.", "&7Kliknij &ePPM&7, żeby wyjąć &c1 &7koxa." and "&7Kliknij &eSHIFT+PPM&7, żeby wyjąć &cwszystkie &7koxy." stop stop