AKELTV 3 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 (edytowane) -----------[=======================================================]----------- Nazwa: A-Case Typ: Autorski [100%] Version: 0.1 Alpha Autor: AKEL Pozwolenia: Brak Download: https://code.skript.pl/9SychSYr Download: https://code.skript.pl/9SychSYr Download: https://code.skript.pl/9SychSYr Inne skrypty, które bede dodawał: A-Crafting A-Drop A-Kits A-Alerts A-Stats A-Admins A-LiveBC A-Itemy A-Kills A-Enderchest A-Schowek A-Disco A-BackUP Co posiada Skrypt A-Case: - Skrzynki takie jak PremiumCase - Skrzynki W Gui - Pelna Konfiguracja - Skrzynki otwiera sie, klikajac na stojaca na ziemi skrzynie kluczem - Wylaczanie/Wlaczanie danych skrzyn - Ladne gui - Duzo opcji - Innowacyjny system dropu - BoyFarmery, SandFarmerry oraz KopaczeFosy Skrypt bedzie odnawiany. SS'y SKRYPTU: [Nie kodu] - https://imgur.com/a/djBnpvK - ERRORY - https://imgur.com/a/3r8x0cV - Skrzynia INFO KOMENDY - https://imgur.com/a/0rqNa1b - Skrzynka ON/OFF - https://imgur.com/a/WVvQEV1 - Klucz INFO KOMENDY - https://imgur.com/a/7c2s75F - Lista Kluczy/Skrzyn - https://imgur.com/a/5wi6EoN - Nazwa Klucza - https://imgur.com/a/yYhjA5p - Gui Nr. 1 [Bez Klucza Mozna Je Otworzyc] - https://imgur.com/a/8YO9Ptj - Gui Nr. 2 [Potrzebny Klucz, nalezy kliknac w skrzynie DragonChest] - https://imgur.com/a/nCsLmQo - Nagrody + System Losowania Komendy: /dajklucz [nazwa] [gracz/all] [{ilosc] - Daje Klucz Graczowi/Graczom /dajskrzynia - Daje skrzynie /dajklucz lista klucze - Lista Kluczy /dajklucz lista skrzynie - Lista Skrzyn /dajskrzynia on [Nazwa] - Wlacza Skrzynie /dajskrzynia off [Nazwa] - Wylacza Skrzynie /acase pomoc - Pokazuje pomoc -----------[=======================================================]----------- Edytowane 2 czerwca 2018 przez AKELTV Dodanie DL Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/ Udostępnij na innych stronach Więcej opcji udostępniania...
pandax 131 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 (edytowane) jesteśmy w 2018, tymczasem @AKELTV jest w 3018 i autorskie skrypty to mało spotykane typy. Skrypt powinien być w innej kategorii, ale pomijając ten fakt płatny skrypt na premium case'y to jakieś nieporozumienie. Edytowane 2 czerwca 2018 przez pandax Vindow i kerpson 2 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181790 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 2 minuty temu, pandax napisał: jesteśmy w 2018, tymczasem @AKELTV jest w 3018 i autorskie skrypty to mało spotykane typy. Skrypt nie powinien być w innej kategorii, ale płatny skrypt na premium case'y to jakieś nieporozumienie. Nie jest to zwykły skrypt na premium case'y kolego Posiada on gui. Jest on wzorowany na pluginach z JustPvP na skrzynki klikalne na spawnie. Posiada to samo zastowanie co tam, tylko, że w skrypcie i każdy może w dosyć latwy sposób go obsluzyc oraz skonfigurować. Co do tego, że jest płatny. To powiem tyle. Nie chce aby skrypt, który pisałem dużo czasu miało dużo osób. Kod całego skryptu dam może dzisiaj, ale gdzieś o 21:30. Udoskonalam go. A jeżeli coś ci się nie podoba, to po prostu nie komentuj. Pozdro. Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181792 Udostępnij na innych stronach Więcej opcji udostępniania...
pandax 131 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 1 minutę temu, AKELTV napisał: Nie jest to zwykły skrypt na premium case'y kolego Posiada on gui. Jest on wzorowany na pluginach z JustPvP na skrzynki klikalne na spawnie. Posiada to samo zastowanie co tam, tylko, że w skrypcie i każdy może w dosyć latwy sposób go obsluzyc oraz skonfigurować. Co do tego, że jest płatny. To powiem tyle. Nie chce aby skrypt, który pisałem dużo czasu miało dużo osób. Kod całego skryptu dam może dzisiaj, ale gdzieś o 21:30. Udoskonalam go. A jeżeli coś ci się nie podoba, to po prostu nie komentuj. Pozdro. Widać, że autor nie pogodzi się nawet z opinią, a nie krytyką. Skrypt ma 1000 linijek? no, probably not Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181795 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 Teraz, pandax napisał: Widać, że autor nie pogodzi się nawet z opinią, a nie krytyką. Skrypt ma 1000 linijek? no, probably not Nie chodzi o to, że nie godzę się z opinią. Po prostu odpowiadam na twój komentarz. A co do linijek, to posiada ich 291 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181797 Udostępnij na innych stronach Więcej opcji udostępniania...
pandax 131 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 2 minuty temu, AKELTV napisał: Nie chodzi o to, że nie godzę się z opinią. Po prostu odpowiadam na twój komentarz. A co do linijek, to posiada ich 291 Cytat Udoskonalam go. A jeżeli coś ci się nie podoba, to po prostu nie komentuj. Pozdro. Ewidentnie widać, że chcesz pominąć mnie w temacie. 291 linijek to mało, w dodatku z opisu wynika, że to ZWYKŁY skrypt na premium case'y. Daj kod, może mnie przekonasz Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181798 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 (edytowane) Już daje. Parę komend typu: /acase pomoc Jeszcze nie działa ale prosze. Daję już do edita Download ;). Dodane Edytowane 2 czerwca 2018 przez AKELTV Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181799 Udostępnij na innych stronach Więcej opcji udostępniania...
JJ4KUB 59 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 (edytowane) Dupy nie urywa :V skrypt łatwy do napisania i jeszcze autor myśli że to jakieś dzieło Takich skryptów jak i pluginów jest dużo a ty jeszcze chcesz za skrypt z 291 linijkami pieniądze śmieszne jest to , coraz bardziej świat schodzi na psy przez takie osoby jak ty...... pewnie gui robione z format slot .... same pewnie format sloty zajmują 200 linijek ... Ogólna ocena: 5/10 #EDIT 1 - Zobaczyłem że skrypt się da bardzo skrócić nawet do 100 linijek #EDIT 2 - Format slot się buguje Pewnie jeszcze jakis moderator znając życie da warna bo napisałem komentarz ..... Edytowane 2 czerwca 2018 przez JJ4KUB Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181801 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 Cytat Teraz, JJ4KUB napisał: Dupy nie urywa :V skrypt łatwy do napisania i jeszcze autor myśli że to jakieś dzieło Takich skryptów jak i pluginów jest dużo a ty jeszcze chcesz za skrypt z 291 linijkami pieniądze śmieszne jest to , coraz bardziej świat schodzi na psy przez takie osoby jak ty...... pewnie gui robione z format slot .... same pewnie format sloty zajmują 200 linijek ... Ogólna ocena: 5/10 Pewnie jeszcze jakis moderator znając życie da warna bo napisałem komentarz ..... Witaj. Formatsloty zajmuja akurat najmniej miejsca. 291 Linijek skryptu. Za pieniadze? Z 10 min temu, dodalem download versji beta 0.1 do editu. Pobierz, zobacz. Potem komentuj. Pozdro. Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181803 Udostępnij na innych stronach Więcej opcji udostępniania...
JJ4KUB 59 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 @AKELTV Zobacz posta którego przed chwilą zedytowałem. Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181804 Udostępnij na innych stronach Więcej opcji udostępniania...
pandax 131 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 Okej, użyj funkcji, zastosuj się do prawidłowego pisania GUI i będzie spoko skrypt Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181805 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 1 minutę temu, JJ4KUB napisał: @AKELTV Zobacz posta którego przed chwilą zedytowałem. Może i da się skrócić to prawda. Ale to 1 wersja tego skryptu. Format sloty, nie zawsze się buguja. Zależy od maszyny i tego jak kto je zrobi w skrypcie Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181806 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 1 minutę temu, pandax napisał: Okej, użyj funkcji, zastosuj się do prawidłowego pisania GUI i będzie spoko skrypt Dziekuje. W nastepnych wersjach postaram sie go poprawic Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181807 Udostępnij na innych stronach Więcej opcji udostępniania...
JJ4KUB 59 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 @AKELTV Po co robisz 2 tematy z tego samego ? Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181808 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 2 czerwca 2018 Autor Udostępnij Opublikowano 2 czerwca 2018 Teraz, JJ4KUB napisał: @AKELTV Po co robisz 2 tematy z tego samego ? To moj 1 post i nie wiem jakim cudem sie zduplikowal. Nastepnym razem nie popelnie tego bledu. Dzieki za pokazanie bledu. JJ4KUB 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181809 Udostępnij na innych stronach Więcej opcji udostępniania...
JJ4KUB 59 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 Teraz, AKELTV napisał: To moj 1 post i nie wiem jakim cudem sie zduplikowal. Nastepnym razem nie popelnie tego bledu. Dzieki za pokazanie bledu. Ucz się ucz a może będzie z ciebie dobry skrypter Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181810 Udostępnij na innych stronach Więcej opcji udostępniania...
kerpson 551 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 Tragedia. Format slot... Te zmienne sa tragiczne. Kod prosty. Brak petli. 3/10 pandax 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181825 Udostępnij na innych stronach Więcej opcji udostępniania...
knugi 794 Opublikowano 2 czerwca 2018 Udostępnij Opublikowano 2 czerwca 2018 Yyyyy? Knugi left the game. A teraz na poważnie. on rightclick on 120: cancel event if {skrzynia1wlaczoneklucze} is not set: if player's tool is 131 named "&7> &eEnderDragon KLUCZ &7<": open chest with 6 rows named "&e&lEnderDragon Chest" to player send "&a&lOtwieranie Skrzynki: &bEnderDragon Chest" rozjechany tab. options: kluczskrzynia1: &8>> &aKLUCZ DO SKRZYNI: &cDragon Chest &8<< skrzynia1: DragonChest skrzynia1nazwa: &8DragonChest klucz1nazwaogolna: EnderDragon skrzynia1nazwaogolna: EnderDragon skrzynia1lore: &8Postaw permisjaklucz: klucz.lhc gracz: %player% liczba1: 1 errorwiadomosc-arg1: &4&lBLAD: &cTen Klucz Nie Istnieje! errorwiadomosc-arg2: &4&lBLAD: &cTen gracz nie istnieje lub nie jest online! errorwiadomosc-arg3: &4&lBLAD: &cZbyt duza, lub zbyt mala ilosc kluczy! Do tego lepsza jest konfiguracja YAML. Nie jest rekomendowane (przez twórcę dodatku) używanie tego efektu. Cytat This element is deprecated and it is severely recommended that you do not use it. A replacement is Set Slot in Bensku's fork of Skript - dev24 or using another addons GUI system (TuSKe's GUI Manager) Link: Adnotacja Po za tym te send "&0" mnie rozwala, lepiej zrobić pętle. A teraz przedstawiam ci troszkę lepsze premium casy Spoiler #Otwiera się GUI na 6 linijek. #Na ostatniej (6 linijka 1 lost) graczowi ma pisać ile ma dostępnych skrzynek. #Powiedzmy, że ma 11. #2 slot pusty. #3 slot: Otworz 1 skrzynke, 4 slot: Otworz 2 skrzynki, 5 slot: Otworz 3 skrzynki, 6 slot: Otworz 4 skrzynki. #Maksymalnie może otworzyć 4 skrzynki, żeby była wolna 5 linijka cała. 5 linijka ma być cała z czerwonego glass pane. #Rozdane skrzynki przez admina graczom mają trafiać od razu pod 1 slot 6 linijki. Tylko tam ma pisać ile ma tych skrzynek, jeśli ma 0, to nie może otworzyć. #Jeśli ma np. 2 a chce 3 otworzyć to ma też pisać że ma za mało skrzynek aby otworzyć 3 na raz. Animację zrób taką jaka będzie najwygodniejsza i najbardziej możliwa. #Skrzynki rozdane przez admina albo zakupione w sklepie (/sklep) mają trafiać pod 6 linijkę 1 slotu. Tylko tam gracz może ujrzeć swoje MineCast-Case. Żadne odbieranie ect. #TO BYM CHCIAŁ. JAK SIĘ NIE DA TO LUZIK :) options: guiName: &c&lMINECAST-CASE on join: if {case::%player%::amount} is not set: set {case::%player%::amount} to 0 on quit: if {case::%player%::started} is set: add {case::%player%::started.ile} to {case::%player%::amount} clear {case::%player%::started} clear {case::%player%::started.ile} on script load: import "org.bukkit.event.inventory.InventoryCloseEvent" clear {case.items::*} add 16 ender pearl named "&f&l» &3PERLY" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &616" to {case.items::*} add 8 ender pearl named "&f&l» &3PERLY" with lore " &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &68" to {case.items::*} add 64 emerald named "&f&l» &3SZMARAGD" with lore " &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &664" to {case.items::*} add 32 emerald named "&f&l» &3SZMARAGD" with lore " &8&l» &7Szansa: &650%%|| &8&l» &7Ilosc: &632" to {case.items::*} add 64 17 named "&f&l» &3DREWNO" with lore " &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &664" to {case.items::*} add 64 tnt named "&f&l» &3TNT" with lore " &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &664" to {case.items::*} add beacon named "&f&l» &2&lB&a&lE&6&lA&e&lC&4&lO&c&lN" with lore " &8&l» &7Szansa: &63%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of sharpness 5 and fire aspect 2 and unbreaking 3 named "&f&l» &3MIECZ 5/3/3" with lore "|| &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of knockback 2 named "&f&l» &3MIECZ ODRZUT 2" with lore "|| &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &61" to {case.items::*} add bow of punch 3 and infinity 1 named "&f&l» &3LUK 3/1" with lore "|| &8&l» &7Szansa: &610%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond helmet of protection 4 and unbreaking 3 named "&f&l» &3HELM 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond chestplate of protection 4 and unbreaking 3 named "&f&l» &3ZBROJA 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond leggings of protection 4 and unbreaking 3 named "&f&l» &3SPODNIE 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond boots of protection 4 and unbreaking 3 named "&f&l» &3BUTY 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 3 383:50 named "&f&l» &3JAJO CREEPERA" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3TURBODROP" with lore "|| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3SVIP" with lore "|| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond pickaxe of efficiency 5 and unbreaking 3 and fortune 3 named "&f&l» &3KILOF 5/3/3" with lore "|| &8&l» &7Szansa: &625%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond pickaxe of efficiency 6 and unbreaking 3 named "&f&l» &3KILOF 6/3" with lore "&cKILOF SZYBKOSCI|||| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond helmet of protection 7 and unbreaking 5 named "&f&l» &c&lHelm Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond chestplate of protection 7 and unbreaking 5 named "&f&l» &c&lZbroja Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond leggings of protection 7 and unbreaking 5 named "&f&l» &c&lSpodnie Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond boots of protection 7 and unbreaking 5 named "&f&l» &c&lButy Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of sharpness 7 and fire aspect 5 and unbreaking 3 named "&f&l» &c&lMiecz Gnoma &37/5/3" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8233 named "&f&l» &3SILA II" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8265 named "&f&l» &3SILA I" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8226 named "&f&l» &3SZYBKOSC II" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8258 named "&f&l» &3SZYBKOSC I" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8259 named "&f&l» &3ODP. NA OGIEN" with lore " &8&l» &7Szansa: &610%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3200 PLN" with lore "|| &8&l» &7Szansa: &64%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3500 PLN" with lore "|| &8&l» &7Szansa: &63%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &31500 PLN" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} loop all players: if "%inventory name of loop-player's current inventory%" is "{@guiName}": if {case::%loop-player%::started} is set: add {case::%loop-player%::started.ile} to {case::%loop-player%::amount} clear {case::%loop-player%::started} clear {case::%loop-player%::started.ile} close loop-player's inventory send "&f&l» &cPlugin zostal przeladowany. Twoje losowanie zostalo zatrzymane." to loop-player function getChance(i: item type) :: integer: set {_lore::*} to lore of {_i} split by "||" loop {_lore::*}: if "%loop-value%" contains "szansa": set {_i} to loop-index exit loop if {_i} is not set: return 0 set {_text} to "%uncoloured {_lore::%{_i}%}%" set {_ret} to subtext of {_text} between index last index of " " in {_text} + 1 and index length of {_text} - 1 set {_ret} to {_ret} parsed as integer return {_ret} function setDefaultGUI(p: player): if inventory name of {_p}'s current inventory is not "{@guiName}": wait 1 tick set {_p}'s current inventory's slot 53 to 342 named "&f&l» &2Przedmioty" set {_p}'s current inventory's slot 45 to chest named "&f&l» &7Masz aktualnie: &c%{case::%{_p}%::amount}% &3MineCast-Case" set {_p}'s current inventory's slot 47 to chest named "&f&l» &7Otworz &6x1" with lore " &8&l» &7Otworz jedna skrzynke." set {_p}'s current inventory's slot 48 to chest named "&f&l» &7Otworz &6x2" with lore " &8&l» &7Otworz dwie skrzynki." set {_p}'s current inventory's slot 49 to chest named "&f&l» &7Otworz &6x3" with lore " &8&l» &7Otworz trzy skrzynki." set {_p}'s current inventory's slot 50 to chest named "&f&l» &7Otworz &6x4" with lore " &8&l» &7Otworz cztery skrzynki." set {_i} to 0 loop 36 times: set {_p}'s current inventory's slot {_i} to air add 1 to {_i} loop 9 times: set {_p}'s current inventory's slot {_i} to red glass named "&7" add 1 to {_i} function toRightItems(t: item types) :: item types: set {_size} to size of {_t::*} loop {_t::*}: if loop-index parsed as integer is {_size}: set {_ret::1} to {_t::%{_size}%} else: set {_ret::%loop-index parsed as integer + 1%} to {_t::%loop-index%} return {_ret::*} function getDelay(act: integer, max: integer) :: timespan: set {_per} to {_act}/{_max}*100 set {_wait} to "%{_per}/20% tick" parsed as timespan send "act:%{_act}% max:%{_max}% per:%{_per}%" to "knugi" parsed as player return {_wait} function anyTool(i: item type) :: boolean: if {_i} is any sword or any pickaxe or any helmet or any chestplate or any leggings or any boots or bow: return true return false function startCase(i: integer, p: player): setDefaultGUI({_p}) loop {_i} times: loop 9 times: add random element out of {case.items::*} to {_lista::%loop-number-1%::*} loop {_i} times: set {_max} to random integer between 2 and 4 loop {_max} times: set {_lista::%loop-number-1%::*} to toRightItems({_lista::%loop-number-1%::*}) set {_a} to ((loop-number-1) - 1)*9 loop {_lista::%loop-number-1%::*}: if inventory name of {_p}'s current inventory is "{@guiName}": set {_p}'s current inventory's slot {_a} to loop-value-3 wait 1 tick add 1 to {_a} loop {_i} times: loop 100 times: if {_case::%loop-number-1%} is set: exit loop set {_slot} to ((loop-number-1)-1)*9 loop 9 times: set {_item} to {_p}'s current inventory's slot {_slot} set {_chance} to getChance({_item}) chance of {_chance}%: set {_case::%loop-number-1%} to {_slot} add 1 to {_slot} loop 36 times: if (loop-number)-1 is not {_case::1} or {_case::2} or {_case::3} or {_case::4}: set {_p}'s current inventory's slot loop-number - 1 to gray glass named "&7" wait 0.5 tick loop {_case::*}: set {_item} to {_p}'s current inventory's slot "%loop-value%" parsed as integer if getChance({_item}) is 1 or 2: broadcast "&2&l» &7Gracz &6%{_p}% &7otworzyl &3MineCast-Case &7i wydropil:" broadcast "%name of {_item}%" if {_item} is paper: if uncoloured name of {_item} contains "voucher turbodrop": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &cTURBODROP|| &8&l» &7Na czas: &c1 &7godziny||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher svip": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj range: &cSVIP|| &8&l» &7Na czas: &c1 &7edycji||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 200": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c200 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 500": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c500 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 1500": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c1500 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if anyTool({_item}): if "%name of {_item}%" contains "gnom": set {_item} to {_item} named "%name of {_item}%" with lore "" else if "%lore of {_item}%" contains "szybkosci": set {_item} to subtext of "%{_item}%" between index 0 and index index of " named" in "%{_item}%" - 1 set {_item} to {_item} parsed as item type with lore "&cKILOF SZYBKOSCI" else: set {_item} to subtext of "%{_item}%" between index 0 and index index of " named" in "%{_item}%" - 1 set {_item} to {_item} parsed as item type else: set {_item} to "%{_item}%:%data of {_item}%" parsed as item type if {_p} has enough space for {_item}: give {_item} to {_p} else: drop {_item} at {_p} clear {case::%{_p}%::started} clear {case::%{_p}%::started.ile} on place chest: if player's tool is chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl": cancel event set {_amountInv} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's inventory set {_amountEc} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's enderchest if {_amountInv} + {_amountEc} > 0: remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's inventory remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's enderchest add {_amountEc} + {_amountInv} to {case::%player%::amount} execute player command "case" function clickedStart(i: integer, p: player) :: boolean: if {case::%{_p}%::amount} is larger than or equal to {_i}: set {_cb} to "%{_i}*64% cobblestone" parsed as item types if {_p} has enough space for {_cb}: set {case::%{_p}%::started} to true set {case::%{_p}%::started.ile} to {_i} remove {_i} from {case::%{_p}%::amount} set {_p}'s current inventory's slot 45 to chest named "&7Masz aktualnie: &3%{case::%{_p}%::amount}% &cMineCast-Case" add {_i} to {case::%{_p}%} startCase({_i}, {_p}) return true return false on "org.bukkit.event.inventory.InventoryCloseEvent": set {_nameInv} to event.getInventory().getName() if {_nameInv} is "{@guiName}": if {case::%event.getPlayer()%::started} is not set: stop set {case::%event.getPlayer()%::gui} to event.getPlayer().getOpenInventory().getTopInventory() wait 2 tick open {case::%event.getPlayer()%::gui} to event.getPlayer() clear {case::%event.getPlayer()%::gui} on inventory click: if inventory name of player's current inventory is "{@guiName}": if slot is smaller than 0: stop cancel event if slot is 53: if player's current inventory's slot 53 is "342" parsed as item type: if {case::%player%::started} is not set: loop 54 times: set player's current inventory's slot loop-number - 1 to air loop {case.items::*}: set player's current inventory's slot loop-index parsed as integer - 1 to loop-value set player's current inventory's slot 53 to iron door named "&f&l» &6Wroc" set {case::%player%::items} to true stop if player's current inventory's slot 53 is iron door: if {case::%player%::items} is set: clear {case::%player%::items} loop 54 times: set player's current inventory's slot loop-number - 1 to air setDefaultGUI(player) stop send "&c* &7Nieznany blad." stop if {case::%player%::started} is not set: set {_item} to barrier named "&f&l» &9&lBlad." with lore "&f&l» &7Nie posiadasz tyle skrzyn lub miejsca w ekwipunku." if slot is 47: if clickedStart(1, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 48: if clickedStart(2, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 49: if clickedStart(3, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 50: if clickedStart(4, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop #Commands command /case: trigger: open chest with 6 rows named "{@guiName}" to player set {_amountInv} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's inventory set {_amountEc} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's enderchest if {_amountInv} + {_amountEc} > 0: remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's inventory remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's enderchest add {_amountEc} + {_amountInv} to {case::%player%::amount} chance of 50%: send "&f&l» &7Informacja:" send "&f&l» &7Nie zamykaj okienka podczas losowania przedmiotow, poniewaz gdy losowanie zostanie zatrzymane - bedziesz musial wylaczyc minecraft'a." wait 2 tick setDefaultGUI(player) command /casedaj [<text>] [<integer=1>]: trigger: if sender is console: set {_pex} to true if sender has permission "minecast.case": set {_pex} to true if {_pex} is true: if arg 1 is not set: send "&a/casedaj <all/nick> <ilosc=1>" stop if arg 1 is "all": loop all players: add arg 2 to {case::%loop-player%::amount} send "&8&l» &7Dostales: &cX%arg 2% MineCast-Case &7od: &6%player%&7. %nl%&8&l» &7Otworzysz za pomoca komendy: &c/case" to loop-player stop set {_arg} to "%arg 1%" parsed as offlineplayer if {_arg} is online: add arg 2 to {case::%{_arg}%::amount} send "&8&l» &7Dostales: &cX%arg 2% MineCast-Case &7od: &6%player%&7. %nl%&8&l» &7Otworzysz za pomoca komendy: &c/case" to {_arg} send "&8&l» &7Dales: &cX%arg 2% MineCast-Case &7dla: &6%{_arg}%&7." to player stop send "&8&l» &7Nie ma takiego gracza na serwerze: %{_arg}%" stop Wymagany Skript 2.2 SkQuery, Skript-Mirror v0.9 pandax 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181834 Udostępnij na innych stronach Więcej opcji udostępniania...
AKELTV 3 Opublikowano 3 czerwca 2018 Autor Udostępnij Opublikowano 3 czerwca 2018 15 godzin temu, knugi napisał: Yyyyy? Knugi left the game. A teraz na poważnie. on rightclick on 120: cancel event if {skrzynia1wlaczoneklucze} is not set: if player's tool is 131 named "&7> &eEnderDragon KLUCZ &7<": open chest with 6 rows named "&e&lEnderDragon Chest" to player send "&a&lOtwieranie Skrzynki: &bEnderDragon Chest" rozjechany tab. options: kluczskrzynia1: &8>> &aKLUCZ DO SKRZYNI: &cDragon Chest &8<< skrzynia1: DragonChest skrzynia1nazwa: &8DragonChest klucz1nazwaogolna: EnderDragon skrzynia1nazwaogolna: EnderDragon skrzynia1lore: &8Postaw permisjaklucz: klucz.lhc gracz: %player% liczba1: 1 errorwiadomosc-arg1: &4&lBLAD: &cTen Klucz Nie Istnieje! errorwiadomosc-arg2: &4&lBLAD: &cTen gracz nie istnieje lub nie jest online! errorwiadomosc-arg3: &4&lBLAD: &cZbyt duza, lub zbyt mala ilosc kluczy! Do tego lepsza jest konfiguracja YAML. Nie jest rekomendowane (przez twórcę dodatku) używanie tego efektu. Link: Adnotacja Po za tym te send "&0" mnie rozwala, lepiej zrobić pętle. A teraz przedstawiam ci troszkę lepsze premium casy Pokaż ukrytą zawartość #Otwiera się GUI na 6 linijek. #Na ostatniej (6 linijka 1 lost) graczowi ma pisać ile ma dostępnych skrzynek. #Powiedzmy, że ma 11. #2 slot pusty. #3 slot: Otworz 1 skrzynke, 4 slot: Otworz 2 skrzynki, 5 slot: Otworz 3 skrzynki, 6 slot: Otworz 4 skrzynki. #Maksymalnie może otworzyć 4 skrzynki, żeby była wolna 5 linijka cała. 5 linijka ma być cała z czerwonego glass pane. #Rozdane skrzynki przez admina graczom mają trafiać od razu pod 1 slot 6 linijki. Tylko tam ma pisać ile ma tych skrzynek, jeśli ma 0, to nie może otworzyć. #Jeśli ma np. 2 a chce 3 otworzyć to ma też pisać że ma za mało skrzynek aby otworzyć 3 na raz. Animację zrób taką jaka będzie najwygodniejsza i najbardziej możliwa. #Skrzynki rozdane przez admina albo zakupione w sklepie (/sklep) mają trafiać pod 6 linijkę 1 slotu. Tylko tam gracz może ujrzeć swoje MineCast-Case. Żadne odbieranie ect. #TO BYM CHCIAŁ. JAK SIĘ NIE DA TO LUZIK :) options: guiName: &c&lMINECAST-CASE on join: if {case::%player%::amount} is not set: set {case::%player%::amount} to 0 on quit: if {case::%player%::started} is set: add {case::%player%::started.ile} to {case::%player%::amount} clear {case::%player%::started} clear {case::%player%::started.ile} on script load: import "org.bukkit.event.inventory.InventoryCloseEvent" clear {case.items::*} add 16 ender pearl named "&f&l» &3PERLY" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &616" to {case.items::*} add 8 ender pearl named "&f&l» &3PERLY" with lore " &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &68" to {case.items::*} add 64 emerald named "&f&l» &3SZMARAGD" with lore " &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &664" to {case.items::*} add 32 emerald named "&f&l» &3SZMARAGD" with lore " &8&l» &7Szansa: &650%%|| &8&l» &7Ilosc: &632" to {case.items::*} add 64 17 named "&f&l» &3DREWNO" with lore " &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &664" to {case.items::*} add 64 tnt named "&f&l» &3TNT" with lore " &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &664" to {case.items::*} add beacon named "&f&l» &2&lB&a&lE&6&lA&e&lC&4&lO&c&lN" with lore " &8&l» &7Szansa: &63%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of sharpness 5 and fire aspect 2 and unbreaking 3 named "&f&l» &3MIECZ 5/3/3" with lore "|| &8&l» &7Szansa: &630%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of knockback 2 named "&f&l» &3MIECZ ODRZUT 2" with lore "|| &8&l» &7Szansa: &620%%|| &8&l» &7Ilosc: &61" to {case.items::*} add bow of punch 3 and infinity 1 named "&f&l» &3LUK 3/1" with lore "|| &8&l» &7Szansa: &610%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond helmet of protection 4 and unbreaking 3 named "&f&l» &3HELM 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond chestplate of protection 4 and unbreaking 3 named "&f&l» &3ZBROJA 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond leggings of protection 4 and unbreaking 3 named "&f&l» &3SPODNIE 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond boots of protection 4 and unbreaking 3 named "&f&l» &3BUTY 4/3" with lore "|| &8&l» &7Szansa: &640%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 3 383:50 named "&f&l» &3JAJO CREEPERA" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3TURBODROP" with lore "|| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3SVIP" with lore "|| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond pickaxe of efficiency 5 and unbreaking 3 and fortune 3 named "&f&l» &3KILOF 5/3/3" with lore "|| &8&l» &7Szansa: &625%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond pickaxe of efficiency 6 and unbreaking 3 named "&f&l» &3KILOF 6/3" with lore "&cKILOF SZYBKOSCI|||| &8&l» &7Szansa: &62%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond helmet of protection 7 and unbreaking 5 named "&f&l» &c&lHelm Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond chestplate of protection 7 and unbreaking 5 named "&f&l» &c&lZbroja Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond leggings of protection 7 and unbreaking 5 named "&f&l» &c&lSpodnie Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond boots of protection 7 and unbreaking 5 named "&f&l» &c&lButy Gnoma &37/5" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add diamond sword of sharpness 7 and fire aspect 5 and unbreaking 3 named "&f&l» &c&lMiecz Gnoma &37/5/3" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8233 named "&f&l» &3SILA II" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8265 named "&f&l» &3SILA I" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8226 named "&f&l» &3SZYBKOSC II" with lore " &8&l» &7Szansa: &65%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8258 named "&f&l» &3SZYBKOSC I" with lore " &8&l» &7Szansa: &615%%|| &8&l» &7Ilosc: &61" to {case.items::*} add 1 373:8259 named "&f&l» &3ODP. NA OGIEN" with lore " &8&l» &7Szansa: &610%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3200 PLN" with lore "|| &8&l» &7Szansa: &64%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &3500 PLN" with lore "|| &8&l» &7Szansa: &63%%|| &8&l» &7Ilosc: &61" to {case.items::*} add paper of unbreaking 10 named "&f&l» &2VOUCHER &31500 PLN" with lore "|| &8&l» &7Szansa: &61%%|| &8&l» &7Ilosc: &61" to {case.items::*} loop all players: if "%inventory name of loop-player's current inventory%" is "{@guiName}": if {case::%loop-player%::started} is set: add {case::%loop-player%::started.ile} to {case::%loop-player%::amount} clear {case::%loop-player%::started} clear {case::%loop-player%::started.ile} close loop-player's inventory send "&f&l» &cPlugin zostal przeladowany. Twoje losowanie zostalo zatrzymane." to loop-player function getChance(i: item type) :: integer: set {_lore::*} to lore of {_i} split by "||" loop {_lore::*}: if "%loop-value%" contains "szansa": set {_i} to loop-index exit loop if {_i} is not set: return 0 set {_text} to "%uncoloured {_lore::%{_i}%}%" set {_ret} to subtext of {_text} between index last index of " " in {_text} + 1 and index length of {_text} - 1 set {_ret} to {_ret} parsed as integer return {_ret} function setDefaultGUI(p: player): if inventory name of {_p}'s current inventory is not "{@guiName}": wait 1 tick set {_p}'s current inventory's slot 53 to 342 named "&f&l» &2Przedmioty" set {_p}'s current inventory's slot 45 to chest named "&f&l» &7Masz aktualnie: &c%{case::%{_p}%::amount}% &3MineCast-Case" set {_p}'s current inventory's slot 47 to chest named "&f&l» &7Otworz &6x1" with lore " &8&l» &7Otworz jedna skrzynke." set {_p}'s current inventory's slot 48 to chest named "&f&l» &7Otworz &6x2" with lore " &8&l» &7Otworz dwie skrzynki." set {_p}'s current inventory's slot 49 to chest named "&f&l» &7Otworz &6x3" with lore " &8&l» &7Otworz trzy skrzynki." set {_p}'s current inventory's slot 50 to chest named "&f&l» &7Otworz &6x4" with lore " &8&l» &7Otworz cztery skrzynki." set {_i} to 0 loop 36 times: set {_p}'s current inventory's slot {_i} to air add 1 to {_i} loop 9 times: set {_p}'s current inventory's slot {_i} to red glass named "&7" add 1 to {_i} function toRightItems(t: item types) :: item types: set {_size} to size of {_t::*} loop {_t::*}: if loop-index parsed as integer is {_size}: set {_ret::1} to {_t::%{_size}%} else: set {_ret::%loop-index parsed as integer + 1%} to {_t::%loop-index%} return {_ret::*} function getDelay(act: integer, max: integer) :: timespan: set {_per} to {_act}/{_max}*100 set {_wait} to "%{_per}/20% tick" parsed as timespan send "act:%{_act}% max:%{_max}% per:%{_per}%" to "knugi" parsed as player return {_wait} function anyTool(i: item type) :: boolean: if {_i} is any sword or any pickaxe or any helmet or any chestplate or any leggings or any boots or bow: return true return false function startCase(i: integer, p: player): setDefaultGUI({_p}) loop {_i} times: loop 9 times: add random element out of {case.items::*} to {_lista::%loop-number-1%::*} loop {_i} times: set {_max} to random integer between 2 and 4 loop {_max} times: set {_lista::%loop-number-1%::*} to toRightItems({_lista::%loop-number-1%::*}) set {_a} to ((loop-number-1) - 1)*9 loop {_lista::%loop-number-1%::*}: if inventory name of {_p}'s current inventory is "{@guiName}": set {_p}'s current inventory's slot {_a} to loop-value-3 wait 1 tick add 1 to {_a} loop {_i} times: loop 100 times: if {_case::%loop-number-1%} is set: exit loop set {_slot} to ((loop-number-1)-1)*9 loop 9 times: set {_item} to {_p}'s current inventory's slot {_slot} set {_chance} to getChance({_item}) chance of {_chance}%: set {_case::%loop-number-1%} to {_slot} add 1 to {_slot} loop 36 times: if (loop-number)-1 is not {_case::1} or {_case::2} or {_case::3} or {_case::4}: set {_p}'s current inventory's slot loop-number - 1 to gray glass named "&7" wait 0.5 tick loop {_case::*}: set {_item} to {_p}'s current inventory's slot "%loop-value%" parsed as integer if getChance({_item}) is 1 or 2: broadcast "&2&l» &7Gracz &6%{_p}% &7otworzyl &3MineCast-Case &7i wydropil:" broadcast "%name of {_item}%" if {_item} is paper: if uncoloured name of {_item} contains "voucher turbodrop": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &cTURBODROP|| &8&l» &7Na czas: &c1 &7godziny||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher svip": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj range: &cSVIP|| &8&l» &7Na czas: &c1 &7edycji||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 200": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c200 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 500": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c500 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if uncoloured name of {_item} contains "voucher 1500": set {_item} to paper of unbreaking 10 named "&f&l» &2VOUCHER" with lore " &8&l» &7Aktywuj: &c1500 PLN|| &8&l» &7Wymien na: &c/sklep||||&8&l» &7Kliknij PPM, aby aktywowac!" if anyTool({_item}): if "%name of {_item}%" contains "gnom": set {_item} to {_item} named "%name of {_item}%" with lore "" else if "%lore of {_item}%" contains "szybkosci": set {_item} to subtext of "%{_item}%" between index 0 and index index of " named" in "%{_item}%" - 1 set {_item} to {_item} parsed as item type with lore "&cKILOF SZYBKOSCI" else: set {_item} to subtext of "%{_item}%" between index 0 and index index of " named" in "%{_item}%" - 1 set {_item} to {_item} parsed as item type else: set {_item} to "%{_item}%:%data of {_item}%" parsed as item type if {_p} has enough space for {_item}: give {_item} to {_p} else: drop {_item} at {_p} clear {case::%{_p}%::started} clear {case::%{_p}%::started.ile} on place chest: if player's tool is chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl": cancel event set {_amountInv} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's inventory set {_amountEc} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's enderchest if {_amountInv} + {_amountEc} > 0: remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's inventory remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's enderchest add {_amountEc} + {_amountInv} to {case::%player%::amount} execute player command "case" function clickedStart(i: integer, p: player) :: boolean: if {case::%{_p}%::amount} is larger than or equal to {_i}: set {_cb} to "%{_i}*64% cobblestone" parsed as item types if {_p} has enough space for {_cb}: set {case::%{_p}%::started} to true set {case::%{_p}%::started.ile} to {_i} remove {_i} from {case::%{_p}%::amount} set {_p}'s current inventory's slot 45 to chest named "&7Masz aktualnie: &3%{case::%{_p}%::amount}% &cMineCast-Case" add {_i} to {case::%{_p}%} startCase({_i}, {_p}) return true return false on "org.bukkit.event.inventory.InventoryCloseEvent": set {_nameInv} to event.getInventory().getName() if {_nameInv} is "{@guiName}": if {case::%event.getPlayer()%::started} is not set: stop set {case::%event.getPlayer()%::gui} to event.getPlayer().getOpenInventory().getTopInventory() wait 2 tick open {case::%event.getPlayer()%::gui} to event.getPlayer() clear {case::%event.getPlayer()%::gui} on inventory click: if inventory name of player's current inventory is "{@guiName}": if slot is smaller than 0: stop cancel event if slot is 53: if player's current inventory's slot 53 is "342" parsed as item type: if {case::%player%::started} is not set: loop 54 times: set player's current inventory's slot loop-number - 1 to air loop {case.items::*}: set player's current inventory's slot loop-index parsed as integer - 1 to loop-value set player's current inventory's slot 53 to iron door named "&f&l» &6Wroc" set {case::%player%::items} to true stop if player's current inventory's slot 53 is iron door: if {case::%player%::items} is set: clear {case::%player%::items} loop 54 times: set player's current inventory's slot loop-number - 1 to air setDefaultGUI(player) stop send "&c* &7Nieznany blad." stop if {case::%player%::started} is not set: set {_item} to barrier named "&f&l» &9&lBlad." with lore "&f&l» &7Nie posiadasz tyle skrzyn lub miejsca w ekwipunku." if slot is 47: if clickedStart(1, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 48: if clickedStart(2, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 49: if clickedStart(3, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop if slot is 50: if clickedStart(4, player) is false: set player's current inventory's slot slot to {_item} wait 2 second setDefaultGUI(player) stop #Commands command /case: trigger: open chest with 6 rows named "{@guiName}" to player set {_amountInv} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's inventory set {_amountEc} to amount of chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" in player's enderchest if {_amountInv} + {_amountEc} > 0: remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's inventory remove all chest named "&f&l» &3MineCast-Case" with lore " &8&l» &7Aby otworzyc postaw na ziemi!|| &8&l» &7Dropy sprawdzisz pod: &c/premiumcase|| &8&l» &7Zakup &6skrzynek &7na: &cwww.minecast.pl" from player's enderchest add {_amountEc} + {_amountInv} to {case::%player%::amount} chance of 50%: send "&f&l» &7Informacja:" send "&f&l» &7Nie zamykaj okienka podczas losowania przedmiotow, poniewaz gdy losowanie zostanie zatrzymane - bedziesz musial wylaczyc minecraft'a." wait 2 tick setDefaultGUI(player) command /casedaj [<text>] [<integer=1>]: trigger: if sender is console: set {_pex} to true if sender has permission "minecast.case": set {_pex} to true if {_pex} is true: if arg 1 is not set: send "&a/casedaj <all/nick> <ilosc=1>" stop if arg 1 is "all": loop all players: add arg 2 to {case::%loop-player%::amount} send "&8&l» &7Dostales: &cX%arg 2% MineCast-Case &7od: &6%player%&7. %nl%&8&l» &7Otworzysz za pomoca komendy: &c/case" to loop-player stop set {_arg} to "%arg 1%" parsed as offlineplayer if {_arg} is online: add arg 2 to {case::%{_arg}%::amount} send "&8&l» &7Dostales: &cX%arg 2% MineCast-Case &7od: &6%player%&7. %nl%&8&l» &7Otworzysz za pomoca komendy: &c/case" to {_arg} send "&8&l» &7Dales: &cX%arg 2% MineCast-Case &7dla: &6%{_arg}%&7." to player stop send "&8&l» &7Nie ma takiego gracza na serwerze: %{_arg}%" stop Wymagany Skript 2.2 SkQuery, Skript-Mirror v0.9 Wiem. Skrypt nie jest idealny, jednakże jest to mój 4 skrypt Tak naprawdę uczę się jeszcze. W następnych skryptach poprawię się (mam nadzieję) Miłego dnia. Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181867 Udostępnij na innych stronach Więcej opcji udostępniania...
bludis 418 Opublikowano 3 czerwca 2018 Udostępnij Opublikowano 3 czerwca 2018 Spoiler BloodisTM1337 left the game Dobra, a co to "format slot"? Czyżby to o czym myślę? (ZBUGOWANE FORMATOWANIE GUI?!) Odsyłam Cie do poradnika. Cytat Miłego dnia. kerpson i xAxee 2 Cytuj Odnośnik do komentarza https://skript.pl/temat/27508-a-case-magiczne-skrzynie/#findComment-181873 Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.