Skocz do zawartości
  • 0

Poprawa skryptu


KurytPL Againn

Pytanie

Mam taki skrypt:

https://pastebin.com/Lpba1dbw

Chciałbym dodać 2 rzeczy:

Komende:

/haste all    -daje haste wszystkim graczom
/haste <nick>    -  daje haste danemu graczowi

oraz druga rzecz WAŻNA
aby te wszystkie komendy można było wpisywać w konsole i one się wywołają bo na chwile obecną tak nie działa

Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/
Udostępnij na innych stronach

13 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
14 minut temu, SayJacoB napisał:

Proszę: klik.

Nie testowane! Może nie działać, ale myślę że z resztą sobie poradzisz.

Przykro mi ale skrypt nie działa
Gdy wpisuje /haste <gracz > to  wypisuje mi tylko dostepne komendy, haste nie daje

Błąd: http://screenshot.sh/ouGEnhQstout3

Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123522
Udostępnij na innych stronach

  • 0
1 minutę temu, SayJacoB napisał:

W linijce 20 zamiast


apply haste 2 to arg 1 for 5 minutes

to


apply haste 2 to arg 2 for 5 minutes

Powinno działać.

Dalej jest jak sie wpisze /haste <nick>  - to pisze Poprawne uzycie komendy

Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123524
Udostępnij na innych stronach

  • 0
command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					if arg 2 is online:
						apply haste 2 to arg 2 for 5 minutes
						send "" to arg 2
						send "" to arg 2
						send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
						stop

Jeśli nie działa to

command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					if arg 2 is online:
						set arg 2 to {_p}
						wait 1 tick
						apply haste 2 to {_p} for 5 minutes
						send "" to arg 2
						send "" to arg 2
						send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
						stop

 

Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123529
Udostępnij na innych stronach

  • 0
5 minut temu, SayJacoB napisał:

command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					if arg 2 is online:
						apply haste 2 to arg 2 for 5 minutes
						send "" to arg 2
						send "" to arg 2
						send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
						stop

Jeśli nie działa to


command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					if arg 2 is online:
						set arg 2 to {_p}
						wait 1 tick
						apply haste 2 to {_p} for 5 minutes
						send "" to arg 2
						send "" to arg 2
						send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
						stop

 

Oba nie działają. Dodatkowo przy tym drugim mi serwer wywaliło XD

Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123530
Udostępnij na innych stronach

  • 0
command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					if arg 2 is online:
						apply effect haste 2 for 5 minutes to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
						send "" to arg 2
						send "" to arg 2
						send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
						stop

Lub

command /haste [<text>] [<player>]:
	executable by: players, console
	trigger:
		if player has permissions "haste.run":
			if arg 1 is "all":
				if arg 2 is not set:
					apply haste 2 to all players for 5 minutes
					broadcast ""
					broadcast ""
					broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
					broadcast ""
					broadcast ""
					stop
			if arg 1 is not set:
				if arg 2 is set:
					apply haste 2 to the arg 2 for 5 minutes
					send "" to arg 2
					send "" to arg 2
					send "&aOtrzymales efekt &6Haste II &ana &c5 &aminut." to arg 2
					send "" to arg 2
					send "" to arg 2
					send "&aDales efekt &6Haste II &agraczowi &c%arg 2% &ana &c5 &aminut."
					stop

 

Edytowane przez SayJacoB
Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123532
Udostępnij na innych stronach

  • 0
43 minuty temu, _kuba300402_ napisał:

Działa lecz komendy nie działają wtedy gdy się wpisze w console

Edytowane przez KurytPL Againn
Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123683
Udostępnij na innych stronach

  • 0


 

        if player has permissions "haste.run":
            if arg 1 is "all":
                if arg 2 is not set:
                    apply haste 2 to all players for 5 minutes
                    broadcast ""
                    broadcast ""
                    broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
                    broadcast ""
                    broadcast ""
                    stop
                 else:
                     apply haste 2 to all players for 5 minutes
                    broadcast ""
                    broadcast ""
                    broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
                    broadcast ""
                    broadcast ""
                    stop

zamień na

        if sender has permissions "haste.run":
            if arg 1 is "all":
                apply haste 2 to all players for 5 minutes
                broadcast ""
                broadcast ""
                broadcast "&aWszyscy otrzymali efekt &6Haste II &ana &c5 &aminut."
                broadcast ""
                broadcast ""
                stop
Odnośnik do komentarza
https://skript.pl/temat/18072-poprawa-skryptu/#findComment-123698
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

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