WiecznyRD 0 Opublikowano 2 września 2021 Udostępnij Opublikowano 2 września 2021 Siemka, potrzebuje skryptu żeby woda zadawała na przykład 2 serduszka oraz żeby była możliwość że jak się wypije potkę to dawała odporność na przykład na 10 min, najlepiej też żeby było można zmieniać nazwę oraz recepturę potki. Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/ Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 2 września 2021 Udostępnij Opublikowano 2 września 2021 on script load: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond on join: set {damage::%event-player%} to true every 1 second: loop all players: while block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true W evencie on script load masz recepturę i nazwę napoju. Jeśli ją zmieniasz, to musisz pamiętać o tym, że musisz zmienić ją również w evencie on consume. Mam nadzieję, że będzie działać, ale mam okropne problemy z internetem i nie mam dostępu do dokumentacji skript, więc napisałem, jak umiałem... Jak są jakieś błędy, to je wyślij Wstawiam w code Notatka dodana przez Notro Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311184 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 2 września 2021 Autor Udostępnij Opublikowano 2 września 2021 16 minut temu, hbrt napisał: on script load: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond on join: set {damage::%event-player%} to true every 1 second: loop all players: while block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true Napisałem w takiej formie, bo nie mogę kliknąć w zakładkę kod, bo wyskakuje mi błąd. W evencie on script load masz recepturę i nazwę napoju. Jeśli ją zmieniasz, to musisz pamiętać o tym, że musisz zmienić ją również w evencie on consume. Mam nadzieję, że będzie działać, ale mam okropne problemy z internetem i nie mam dostępu do dokumentacji skript, więc napisałem, jak umiałem... Jak są jakieś błędy, to je wyślij Błędy: Spoiler [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 1: on script load:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 4: on join:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 7: every 1 second:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 8: loop all players:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 9: while block at loop-player is water:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 10: if {damage::%loop-player%} is true:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 12: else:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 13: if {damage::%loop-player%} is false:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 16: on consume:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 17: if player's tool is water bottle named "&5Potka no-damage":') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 19: while player is online:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 20: if {czas::%player%} > 0:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 23: else:') [21:23:21 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (wat.sk, line 24: if {czas::%player%} <= 0:') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 2: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 5: set {damage::%event-player%} to true') [21:23:21 ERROR]: can't understand this event: ' loop all players' (wat.sk, line 8: loop all players:') [21:23:21 ERROR]: can't understand this event: ' while block at loop-player is water' (wat.sk, line 9: while block at loop-player is water:') [21:23:21 ERROR]: can't understand this event: ' if {damage::%loop-player%} is true' (wat.sk, line 10: if {damage::%loop-player%} is true:') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 11: damage loop-player by 2 hearts') [21:23:21 ERROR]: can't understand this event: ' else' (wat.sk, line 12: else:') [21:23:21 ERROR]: can't understand this event: ' if {damage::%loop-player%} is false' (wat.sk, line 13: if {damage::%loop-player%} is false:') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 14: stop') [21:23:21 ERROR]: can't understand this event: ' if player's tool is water bottle named "&5Potka no-damage"' (wat.sk, line 17: if player's tool is water bottle named "&5Potka no-damage":') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 18: add 600 to {czas::%player%}') [21:23:21 ERROR]: can't understand this event: ' while player is online' (wat.sk, line 19: while player is online:') [21:23:21 ERROR]: can't understand this event: ' if {czas::%player%} > 0' (wat.sk, line 20: if {czas::%player%} > 0:') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 21: wait 1 second') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 22: remove 1 from {czas::%player%}') [21:23:21 ERROR]: can't understand this event: ' else' (wat.sk, line 23: else:') [21:23:21 ERROR]: can't understand this event: ' if {czas::%player%} <= 0' (wat.sk, line 24: if {czas::%player%} <= 0:') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 25: send "&aCzas działania potki skończy się za 10 sekund!" to player') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 26: wait 10 seconds') [21:23:21 ERROR]: invalid line - all code has to be put into triggers (wat.sk, line 27: set {damage::%player%} to true') Wstawiam błędy w code Notatka dodana przez Notro Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311185 Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 2 września 2021 Udostępnij Opublikowano 2 września 2021 on script load: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond variables: set {damage::*} to true every 1 second: loop all players: if block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true jeśli nie działa to napisz jaką masz wersję skript Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311186 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 2 września 2021 Autor Udostępnij Opublikowano 2 września 2021 2 minuty temu, hbrt napisał: on script load: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond variables: set {damage::*} to true every 1 second: loop all players: if block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true jeśli nie działa to napisz jaką masz wersję skript [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 3 tabs (wat.sk, line 19: while player is online:') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 4 tabs (wat.sk, line 20: if {czas::%player%} > 0:') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 5 tabs (wat.sk, line 21: wait 1 second') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 5 tabs (wat.sk, line 22: remove 1 from {czas::%player%}') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 4 tabs (wat.sk, line 23: else:') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 5 tabs (wat.sk, line 24: if {czas::%player%} <= 0:') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 6 tabs (wat.sk, line 25: send "&aCzas działania potki skończy się za 10 sekund!" to player') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 6 tabs (wat.sk, line 26: wait 10 seconds') [21:59:25 ERROR]: indentation error: expected 2 tabs, but found 6 tabs (wat.sk, line 27: set {damage::%player%} to true') [21:59:25 ERROR]: Can't understand this condition/effect: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond (wat.sk, line 2: register new shaped recipe for water bottle named "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond') [21:59:25 ERROR]: 'set {damage::*} to true' is not an entry (like 'name = value') (wat.sk, line 5: set {damage::*} to true') [22:00:57 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases [22:00:57 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript [22:00:57 INFO]: [Skript] Server Version: git-Purpur-1370 (MC: 1.17.1) [22:00:57 INFO]: [Skript] Skript Version: 2.6-beta3 [22:00:57 INFO]: [Skript] Installed Skript Addons: Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311187 Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 2 września 2021 Udostępnij Opublikowano 2 września 2021 pobierz najnowszą wersję skript z githuba Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311188 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 2 września 2021 Autor Udostępnij Opublikowano 2 września 2021 To jest najnowsza wersja Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311189 Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 3 września 2021 Udostępnij Opublikowano 3 września 2021 2.6-beta3? ja mam 2.5 alpha5 czy jakoś tak... Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311206 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 3 września 2021 Autor Udostępnij Opublikowano 3 września 2021 Tak, na githubie to jest najnowsza Chyba że jakiegoś dodatku brakuje do skryptu ? Łączę posty. Notatka dodana przez Glicz Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311212 Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 3 września 2021 Udostępnij Opublikowano 3 września 2021 on script load: register new shapeless recipe for water bottle from "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond variables: set {damage::*} to true every 1 second: loop all players: if block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true może teraz? Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311224 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 3 września 2021 Autor Udostępnij Opublikowano 3 września 2021 (edytowane) 37 minut temu, hbrt napisał: on script load: register new shapeless recipe for water bottle from "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond variables: set {damage::*} to true every 1 second: loop all players: if block at loop-player is water: if {damage::%loop-player%} is true: damage loop-player by 2 hearts else: if {damage::%loop-player%} is false: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to true może teraz? [16:21:01 ERROR]: 'set {damage::*} to true' is not an entry (like 'name = value') (dw.sk, line 2: set {damage::*} to true') wyskakuje jeszcze taki błąd, potka nie działa a wiadomość że czas potki się kończy pojawia się co 10 sekund po odliczeniu całego czasu Edytowane 3 września 2021 przez WiecznyRD Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311226 Udostępnij na innych stronach Więcej opcji udostępniania...
0 hbrt 41 Opublikowano 3 września 2021 Udostępnij Opublikowano 3 września 2021 on script load: register new shapeless recipe for water bottle from "&5Potkano-damage" using diamond, gold, diamond, gold, water bottle, gold, diamond, gold, diamond every 1 second: loop all players: loop 100 times: if block at loop-player is water: if {damage::%loop-player%} is 0: wait 1 second damage loop-player by 2 hearts else: if {damage::%loop-player%} is 1: stop on consume: if player's tool is water bottle named "&5Potka no-damage": add 600 to {czas::%player%} set {damage::%player%} to 1 while player is online: if {czas::%player%} > 0: wait 1 second remove 1 from {czas::%player%} else: if {czas::%player%} <= 0: send "&aCzas działania potki skończy się za 10 sekund!" to player wait 10 seconds set {damage::%player%} to 0 a teraz? XD CoFFeIN04 1 Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311227 Udostępnij na innych stronach Więcej opcji udostępniania...
0 WiecznyRD 0 Opublikowano 3 września 2021 Autor Udostępnij Opublikowano 3 września 2021 Już sobie poradziłem, można zamykać Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311228 Udostępnij na innych stronach Więcej opcji udostępniania...
0 Zbucki 46 Opublikowano 3 września 2021 Udostępnij Opublikowano 3 września 2021 Problem został rozwiązany. Odnośnik do komentarza https://skript.pl/temat/50225-woda-zadaje-damage/#findComment-311229 Udostępnij na innych stronach Więcej opcji udostępniania...
Pytanie
WiecznyRD 0
Siemka, potrzebuje skryptu żeby woda zadawała na przykład 2 serduszka oraz żeby była możliwość że jak się wypije potkę to dawała odporność na przykład na 10 min, najlepiej też żeby było można zmieniać nazwę oraz recepturę potki.
Odnośnik do komentarza
https://skript.pl/temat/50225-woda-zadaje-damage/Udostępnij na innych stronach
13 odpowiedzi na to pytanie
Rekomendowane odpowiedzi