Skocz do zawartości
  • 0

Problem ze skryptem


margo

Pytanie

Witam

Mam taki problem a więc wyskakują takie błędy a nie wiem jak to naprawić. Proszę o pomoc w rozwiązaniu problemu i podam na dole kod

A oto kod skryptów do naprawy

 

 

 

 

 

 

 

A oto błędy 

[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 54: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 58: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 64: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 68: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 74: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 78: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 84: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 88: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 94: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 98: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 104: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 108: else:')



[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (kalambury.sk, line 1: /fly":')

[Skript] The expression 'argument' can only be used within a command (banadmin.sk, line 2: set {gracz} to arg 1 parsed as player')

[Skript] indentation error: expected 0 tabs, but found 1 tab (calc.sk, line 2: if player don't have permission "easysurvival.calc":')
[Skript] indentation error: expected 0 tabs, but found 2 tabs (calc.sk, line 3: ban player')
[Skript] invalid line - all code has to be put into triggers (calc.sk, line 1: on command //calc')

[Skript] indentation error: expected 16 spaces, but found 2 tabs (start.sk, line 60: send "&f"')
[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (start.sk, line 63: send "&8» &7Wiecej informacji pod /pomoc')
[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')

[18:25:33] [Server thread/ERROR]: [Skript] This command doesn't have any arguments (skrzydla.sk, line 3: if arg 1 is "trails":')

 

Edytowane przez HeezQ
HeezQ

Zmieniam wszystkie edytory na code.skript.pl oraz wstawiam tekst w code

Notatka dodana przez HeezQ

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/
Udostępnij na innych stronach

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
22 minuty temu, margo napisał:

[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 54: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 58: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 64: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 68: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 74: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 78: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 84: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 88: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 94: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 98: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 104: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 108: else:')

if player is holding gold axe sprobuj zamienic na If player's tool is gold axe: jeśli nie będzie działało prawdopodobnie musisz zmienić wersje skripta, a else tylko wytabować. "Else musi być umieszczone po if albo else if"

Cytat

[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (kalambury.sk, line 1: /fly":')

Usuń cudzysłów po fly, a przed komendą dodaj command twoja komenda wygląda tak: /fly": a powina Command /fly: 

Cytat

[Skript] The expression 'argument' can only be used within a command (banadmin.sk, line 2: set {gracz} to arg 1 parsed as player')

Tu skript pisze Ci, że arg może być użyty w komendzie, a zrobiłeś event "on command"

Cytat

[Skript] invalid line - all code has to be put into triggers (calc.sk, line 1: on command //calc')

To powinno wyglądać tak: on command "//calc":

Cytat

[Skript] indentation error: expected 0 tabs, but found 1 tab (calc.sk, line 2: if player don't have permission "easysurvival.calc":')
[Skript] indentation error: expected 0 tabs, but found 2 tabs (calc.sk, line 3: ban player')

[Skript] indentation error: expected 16 spaces, but found 2 tabs (start.sk, line 60: send "&f"')

wytabować wytabować wytabować

Cytat

[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')

Te komendy masz już w skrypcie "chat"

Cytat

[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (start.sk, line 63: send "&8» &7Wiecej informacji pod /pomoc')

Twoja komenda wygląda tak: send "&8» &7Wiecej informacji pod /pomoc - zapomniałeś dostawić cudzysłów na końcu, czyli powinna wyglądać tak  send "&8» &7Wiecej informacji pod /pomoc"

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219373
Udostępnij na innych stronach

  • 0

ale to jak mam ten problem rozwiązać jak wyskakuje to nadal 

 

[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')

Edytowane przez BrixNW
Nieaktywny

Poprawiam formatowanie.

Pamiętaj, jeżeli coś wklejasz, kliknij opcję usuń formatowanie.

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219384
Udostępnij na innych stronach

  • 0

@Margo

To chyba oczywiste, jeżeli nie potrafisz czytać to trochę współczuje i życzę powodzenia w znajdywaniu pracy 😜

 

"A command with the name /pl is already defined in chat.sk" Taka komenda jest juz w skypcie o nazwie "chat.sk"

Edytowane przez BrixNW
Formatowanie
Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219385
Udostępnij na innych stronach

  • 0
18 minut temu, margo napisał:

ale to jak mam ten problem rozwiązać jak wyskakuje to nadal 

 

[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')

Gdybyś nie zrozumiał kolegi wyżej to usuń te komendy bo masz je już w innym skrypcie, prościej się nie da. Ewentualnie se pozamieniaj czy coś

Edytowane przez BrixNW
Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219387
Udostępnij na innych stronach

  • 0

teraz takie błędy wyskakują

[Skript] The expression 'argument' can only be used within a command (banadmin.sk, line 2: set {gracz} to arg 1 parsed as player')
[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (calc.sk, line 1: on command //calc":')

[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 54: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 58: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 64: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 68: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 74: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 78: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 84: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 88: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 94: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 98: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 104: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 108: else:')

[Skript] Required entry 'trigger' is missing in 'Command /fly' (kalambury.sk, starting at line 1) (kalambury.sk, line 1: Command /fly:')
[Skript] Unexpected entry 'if {fly} is false'. Check whether it's spelled correctly or remove it. (kalambury.sk, line 2: if {fly} is false:')

[Skript] can't understand this condition: 'damage was caused by explode' (lawa.sk, line 14: damage was caused by explode:')

[Skript] This command doesn't have any arguments (skrzydla.sk, line 3: if arg 1 is "trails":')
[Skript] indentation error: expected 16 spaces, but found 2 tabs (start.sk, line 60: send "&f"')
[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')


 

Edytowane przez HeezQ
HeezQ

Wrzucam w code

Notatka dodana przez HeezQ

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219388
Udostępnij na innych stronach

  • 0
14 godzin temu, margo napisał:

teraz takie błędy wyskakują


[Skript] The expression 'argument' can only be used within a command (banadmin.sk, line 2: set {gracz} to arg 1 parsed as player')
[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (calc.sk, line 1: on command //calc":')

[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 54: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 58: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 64: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 68: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 74: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 78: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 84: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 88: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 94: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 98: else:')
[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 104: if player is holding gold axe:')
[Skript] 'else' has to be placed just after an 'if' or 'else if' section (drewno.sk, line 108: else:')

[Skript] Required entry 'trigger' is missing in 'Command /fly' (kalambury.sk, starting at line 1) (kalambury.sk, line 1: Command /fly:')
[Skript] Unexpected entry 'if {fly} is false'. Check whether it's spelled correctly or remove it. (kalambury.sk, line 2: if {fly} is false:')

[Skript] can't understand this condition: 'damage was caused by explode' (lawa.sk, line 14: damage was caused by explode:')

[Skript] This command doesn't have any arguments (skrzydla.sk, line 3: if arg 1 is "trails":')
[Skript] indentation error: expected 16 spaces, but found 2 tabs (start.sk, line 60: send "&f"')
[Skript] A command with the name /pl is already defined in chat.sk (start.sk, line 73: command /pl [<text>]:')
[Skript] A command with the name /bukkit:plugins is already defined in chat.sk (start.sk, line 80: command /bukkit:plugins [<text>]:')
[Skript] A command with the name /bukkit:pl is already defined in chat.sk (start.sk, line 87: command /bukkit:pl [<text>]:')


 

Wszystko ci tlumaczylem procz tych twoich fly, na co to ma byc komenda z tym /fly? Błąd w linii pierwszej kalambury.sk mówi, że brakuje triggera tak wygląda komenda /abc która pisze do gracza abc

command /abc:

[tab]trigger:

[tab][tab]send "abc" to player

Mam prośbę, spójrz na tematy które Ci podesłałem wyżej, no i może jeszcze na ten który Ci podeśle teraz

 

Edytowane przez HeezQ
HeezQ

Wrzucam cytat w code

Notatka dodana przez HeezQ

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219389
Udostępnij na innych stronach

  • 0

Jakbyś nie zrozumiał kolegów wyżej, to powiem Ci ja. Żeby pisać skrypty, musisz znać podstawy języka angielskiego.

Krótka lekcja

Jeżeli mamy

If

i chcemy w skrypcie sprawdzić czy gracz ma uprawnienia.

If sender has permission "test.sk":

Dlaczego piszemy has, a nie have? Ponieważ jest to osoba 3 liczby pojedynczej, czyli on/ona/ono.

 

Są takie przypadki jak ten

If player doesn't have permission "test.sk":

Tutaj mamy odnośnie gracza, doesn't  odnosi się do gracza, do niego czyli do osoby 3 liczby pojedynczej, nie mamy już has tylko have, bo doesn't pełni funkcje, która mówi nam o osobie 3.

 

Jeżeli chodzi o resztę to mamy kolejny przykład, który możemy w prosty sposób przetłumaczyć

[Skript] Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (calc.sk, line 1: on command //calc":')

Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". - Nieprawidłowe użycie cudzysłowów. Jeżeli chcesz użyć w cudzysłowu w cytowanym tekście, podwój je.

Ciężko to przetłumaczyć sobie? Jeżeli nie znasz podstaw to lepiej się douczyć.

 

A co do twoich błędów.

Cytat

[Skript] Can't compare a player with 'holding gold axe' (drewno.sk, line 54: if player is holding gold axe:')

 

Kody mi się strasznie nie podobają i te błędy...


on place of end stone:
    if tool is end stone named "{@na}" with lore "&7Generuje &aOak Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {oak.%event-block%} to true
        set event-block to oak wood
    if tool is end stone named "{@na}" with lore "&7Generuje &aSpruce Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {spruce.%event-block%} to true
        set event-block to spruce wood
    if tool is end stone named "{@na}" with lore "&7Generuje &aBirch Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {birch.%event-block%} to true
        set event-block to birch wood
    if tool is end stone named "{@na}" with lore "&7Generuje &aJungle Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {jungle.%event-block%} to true
        set event-block to jungle wood
    if tool is end stone named "{@na}" with lore "&7Generuje &aAcacia Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {acacia.%event-block%} to true
        set event-block to acacia wood
    if tool is end stone named "{@na}" with lore "&7Generuje &aDark Oak Wood":
        send "&7>> &aAktywowales drewniarke. &7Aby ja zniszczyc uzyj zlotej siekiery."
        wait 10 tick
        set {darkoak.%event-block%} to true
        set event-block to dark oak wood
on break of oak wood:
    if {oak.%event-block%} is true:
        if player is holding gold axe:
            set {oak.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &aOak Wood"
        else:
            wait 3 second
            set event-block to oak wood
            stop
on break of birch wood:
    if {birch.%event-block%} is true:
        if player is holding gold axe:
            set {birch.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &abirch Wood"
        else:
            wait 3 second
            set event-block to birch wood
            stop
on break of spruce wood:
    if {spruce.%event-block%} is true:
        if player is holding gold axe:
            set {spruce.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &aspruce Wood"
        else:
            wait 3 second
            set event-block to spruce wood
            stop
on break of jungle wood:
    if {jungle.%event-block%} is true:
        if player is holding gold axe:
            set {jungle.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &ajungle Wood"
        else:
            wait 3 second
            set event-block to jungle wood
            stop
on break of acacia wood:
    if {acacia.%event-block%} is true:
        if player is holding gold axe:
            set {acacia.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &aacacia Wood"
        else:
            wait 3 second
            set event-block to acacia wood
            stop
on break of dark oak wood:
    if {dark oak.%event-block%} is true:
        if player is holding gold axe:
            set {dark oak.%event-block%} to false
            send "&7>> &cDezaktywowales drewniarke"
            drop 1 end stone named "{@na}" with lore "&7Generuje &adark oak Wood"
        else:
            wait 3 second
            set event-block to dark oak wood
            stop

 

Długie to straszne...

 Tak jak pisałem zamień gold axe na golden axe

/fly":
    if {fly} is false:
        cancel event
        send "&cFly zostalo wylaczone na czas eventu!"
        stop
command /Flyy [<text>]:
    permission: sk.fly
    permission message: &cBrak uprawnien!
    trigger:
        if arg 1 is "on":
            set {fly} to true
            send "&aWlaczyles fly!"
            stop
        else:
            if arg 1 is "off":
                set {fly} to false
                send "&aWylaczyles fly!"
                stop
            else if arg 1 is not set:
                send "&c> &7/Flyy (On/Off)"
                stop

 

Pewnie że nie działa bo nie dałeś 

command /fly:

 

Wgl co to jest?

/fly":
    if {fly} is false:
        cancel event
        send "&cFly zostalo wylaczone na czas eventu!"
        stop

Czemu 2 razy zamykasz Event?

Nie lepiej napisać to tak

command /fly:
    if {fly} is false:
        send "&cFly zostalo wylaczone na czas eventu!"
  		stop

 

A i równie dobrze z tego całego kodu

/fly":
    if {fly} is false:
        cancel event
        send "&cFly zostalo wylaczone na czas eventu!"
        stop
command /Flyy [<text>]:
    permission: sk.fly
    permission message: &cBrak uprawnien!
    trigger:
        if arg 1 is "on":
            set {fly} to true
            send "&aWlaczyles fly!"
            stop
        else:
            if arg 1 is "off":
                set {fly} to false
                send "&aWylaczyles fly!"
                stop
            else if arg 1 is not set:
                send "&c> &7/Flyy (On/Off)"
                stop

 

Można zrobić 1

command /fly [<text>]:
	trigger:
  		if arg is not set:
  			if {fly} is false:
  				send "&cFly zostalo wylaczone podczas eventu!"
  			else:
  				send "&cFly zostalo wlaczone podczas eventu!"
  				stop
  		if arg is "on":
  			if sender has permission "sk.fly":
  				send "&cWlaczyles fly!"
  				set {fly} to true
  				stop
		if arg is "off":
  			if sender has permission "sk.fly":
  				send "&cWylaczyles fly!"
  				set {fly} to false
  				stop
		if arg is "info":
  			if sender has permission "sk.fly":
  				send "&cCommands:"
  				send "&c/fly on/off"
  			else:
  				send "&cBrak uprawnien"
  				stop
 		

 

Przykuła mnie jeszcze jedna uwaga w tym skrypcie, a mianowicie to

if arg 1 is "on":
            set {fly} to true
            send "&aWlaczyles fly!"
            stop
        else:
            if arg 1 is "off":
                set {fly} to false
                send "&aWylaczyles fly!"
                stop
            else if arg 1 is not set:
                send "&c> &7/Flyy (On/Off)"
                stop

Dałeś if arg więc po co ten else? I później jeszcze ten else if? Przecież to nawet działać nie będzie, bo ty ciągle wykonujesz to do komendy /fly on

 

command /skrzydla:
    trigger:
        if arg 1 is "trails":
        make player execute command "/trails"
        message "&aOtworzyles panel ze skrzydlami!"

 

Gdzie tutaj argumenty można wstawiać, czy gracz ma wgl dostęp do komendy trails? Dlaczego użyłeś message, nie lepiej send?

 

command /skrzydla [<text>]:
    trigger:
        if arg 1 is "trails":
        	make player execute command "/trails"
        	send "&aOtworzyles panel ze skrzydlami!"

 

Kolejny.

on join:
    if player's nickname is "verplo" or  "XMan1234X" or "Dexik":
        set action bar of all players to coloured "&4Wlasciciel &6&l%player% &7dolaczyl do gry!"
 
 
 
command /sidebar [<text>]:
    trigger:
        execute player command "featherboard toggle"
 
 
 
 
 
 
command /sendtitle [<text>]:
    permission: Mega-Drop.alert
    permission message: &8» &cNie masz dostepu do tej komendy! &7(Mega-Drop.aler)
    trigger:
        if arg 1 is set:
            execute player command "stb all &f%arg 1%"
            execute player command "tb all &6&lEASYSURVIVAL&e&l.PL"
            send " &8» &7Wyslano wiadomosc: &6%arg 1% &7do wszystkich graczy."
        if arg 1 is not set:
            execute console command "stb msg %player% &8» &7Poprawne uzycie: &6/sendtitle <wiadomosc>"
            execute console command "tb msg %player% &6&lMega-Drop.eu"
 
 
 
 
 
 
           
 
#Wejscie
 
variables:
 
                {odwiedziny.%player%} = 0
 
                {odwiedziny} = 0
 
on join:
 
                add 1 to {odwiedziny.%player%}
 
on first join:
 
                add 1 to {odwiedziny}
 
on join:
 
                wait 3 tick
 
                send "&f"
        send "&f"
                send "&8» &7Witaj na serwerze: &6MEGA-DROP.EU&7."
                send "&8» &7Aktualnie online: &6%number of all players% &7graczy."
                send "&8» &7Wiecej informacji pod /pomoc
 
 
 
command /plugins [<text>]:
    trigger:
        send "&8» &cNie masz dostepu do tej komendy! &7(verplo.Plugins)"
 
 
 
command /pl [<text>]:
    trigger:
        send "&8» &cNie masz dostepu do tej komendy! &7(verplo.Plugins)"
 
 
 
 
command /bukkit:plugins [<text>]:
    trigger:
        send "&8» &cNie masz dostepu do tej komendy! &7(verplo.Plugins)"
 
 
 
 
command /bukkit:pl [<text>]:
    trigger:
        send "&8» &cNie masz dostepu do tej komendy! &7(verplo.Plugins)"
   
 
 
 
command /bukkit:about [<text>]:
    trigger:
        send "&8» &cNie masz dostepu do tej komendy! &7(verplo.Plugins)"

 

Z tym miałem problem, otóż wpisujesz [<text>] do komend serwerowych, ale po co?

Przecież wystarczy że masz opa, lub nadasz randze permisje i już jest dobrze.

 

on join:
    if player is "verplo" or "XMan1234X" or "Dexik":
        set action bar of all players to coloured "&4Wlasciciel &6&l%player% &7dolaczyl do gry!"
 
 
 
command /sidebar:
    trigger:
        execute player command "featherboard toggle"
 
 
 
 
 
 
command /sendtitle [<text>]:
    trigger:
       if player has permission "Mega-Drop.alert": 
  			if arg 1 is set:
            	send "&f%arg 1%" to players
            	send "&6&lEASYSURVIVAL&e&l.PL" to players
            	send " &8» &7Wyslano wiadomosc: &6%arg 1% &7do wszystkich graczy."
  				stop
       	 	if arg 1 is not set:
            	send "&8» &7Poprawne uzycie: &6/sendtitle <wiadomosc>"
            	send "&6&lMega-Drop.eu"
  				stop
  		else:
  			send "&cBrak uprawnien"
  			stop
 
variables:
 
                {odwiedziny.%player%} = 0
 
                {odwiedziny} = 0
 
on first join:
 
                add 1 to {odwiedziny}
 
on join:
	wait 3 tick
    send ""
    send ""
    send "&8» &7Witaj na serwerze: &6MEGA-DROP.EU&7."
    send "&8» &7Aktualnie online: &6%number of all players% &7graczy."
    send "&8» &7Wiecej informacji pod /pomoc
 
 
 
command /plugins:
    trigger:
        if sender doesn't have permission "plugins.sk":
  			send "&cBrak uprawnien"
 
command /pl [<text>]:
    trigger:
  		if sender doesn't have permission "plugins.sk":
  				send "&cBrak uprawnien"
 
command /bukkit:plugins [<text>]:
    trigger:
        if sender doesn't have permission "plugins.sk":
  			send "&cBrak uprawnien"
 
command /bukkit:pl [<text>]:
    trigger:
        if sender doesn't have permission "plugins.sk":
  			send "&cBrak uprawnien"
 
command /bukkit:about [<text>]:
    trigger:
        if sender doesn't have permission "plugins.sk":
  			send "&cBrak uprawnien"

 

A kolejny skrypt to wgl nie potrzebny jest

on command //calc
    if player don't have permission "easysurvival.calc":
        ban player

Przecież jak gracz uprawnień nie ma to 1. Dostanie za nic bana, a dwa i tak to nie działa bo nie jest napisane

on command //calc:

 

Kolejny syfiasty skrypt, ale dobra

on command "ban [<player>]":
    set {gracz} to arg 1 parsed as player
    if {gracz} have permission "niebanuj.ban":
        ban player

 

Może to inaczej wyjaśnię.

  1.  Po co to?
  2. Nie lepiej zainstalować plugin?
  3. Jak chcesz napisać skrypt na bany to lepiej rozwiń go bo taki to nic Ci nie da

Poprawny kod powinien tak wyglądać

command /ban [<offlineplayer>] [<text>]:
	trigger:
  		if sender has permission "ban.sk":
  			if arg 1 is set:
  				if arg 2 is set:
  					make player execute "ban %arg 1% %arg 2%"
  					send "&cZbanowales gracza"
  					send ""
  					send ""
  					send "&8&l>>> &6Gracz &c%arg 1% &6zostal zbanowany przez &c%sender% &6za: &c%arg 2%"
  					send ""
  					send ""
  				else:
  					send "&cPodaj powod bana!"
  					stop
  			else:
  				send "&cNie podales nicku gracza!"
  				stop
  		else:
  			send "&cBrak uprawnien!"
  			stop

 

Więc podsumowanie, jeżeli chcesz pisać skrypty musisz znać podstawy języka angielskiego, zwracać uwagę na jakość kodu, oraz jak go wykonujesz. Jeżeli kod będzie bardzo długi i bezużyteczny to nie trzymaj takiego kodu, tylko skróć go, tu się liczy jakość, oraz serwer. Według mnie pluginy na bany są lepsze, więc to ostatnie mogłeś sobie darować.

Jeżeli to do Ciebie nie dotarło to wejdź do poradnika podanego przez osoby wyżej, jeżeli nadal nie będziesz rozumiał błędów, to po prostu wystarczy lekcja języka angielskiego

Krótka lekcja, wyrażeń

I can - Ja mogę, ja umiem, ja potrafię

I can't - Ja nie mogę, ja nie umiem, ja nie potrafię

Can't understand - Nie rozumiem

Has to be placed - Musi zostać umieszczony

Doesn't have permission - Nie ma uprawnień

Has - ma (dotyczy to tylko osób trzecich liczby pojedynczej on/ona/ono z angielskiego he/she/it)

 

Musisz znać podstawy

Present Simple

Past Simple

Present Continuous

 

Inaczej napisanie rozbudowanego skryptu, który będzie zoptymalizowany będzie dla Ciebie ciężkie.

 

Więc wszystko podsumowałem, myślę że pomogłem, jeżeli masz pytania pisz na PW

Odnośnik do komentarza
https://skript.pl/temat/34072-problem-ze-skryptem/#findComment-219395
Udostępnij na innych stronach

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ą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...