Skocz do zawartości
  • 0

Skrypt na komende /tpa i /tpaccept


Pytanie

Witam, moglby mi ktos napisac skrypt na komende /tpa , /tpahere i /tpaccept?

Tak zeby gracz podczas teleportacji nie mogl sie ruszyc, a jak sie ruszy to anuluje teleportacje.

Z gory dzieki :)

Edytowane przez powley
Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/
Udostępnij na innych stronach

  • Odpowiedzi 42
  • Dodano
  • Ostatniej odpowiedzi

Top użytkownicy dla tego pytania

Top użytkownicy dla tego pytania

Rekomendowane odpowiedzi

  • 0
5 godzin temu, ShroN napisał:

po prostu zapisuj x, y i z (samo) i porównuj...

Jak mam to zapisac?

 

5 godzin temu, ShroN napisał:

po prostu zapisuj x, y i z (samo) i porównuj...

Tak wyglada teraz ten skrypt.

 

 

command /tpa [<offlineplayer>] [<text>]:
    trigger:
        if arg 1 is set:
            if offlineplayer-arg is online:
                if {tpa::ocz::%player%} is not set:
                    set {tpa::ocz::%player%} to true
                    set {_} to "%{tpa::ocz::%player%}%" parsed as player
                    set {tpa::%player%} to "%offlineplayer-arg%"
                    set {tpa::ocz::%offlineplayer-arg%} to "%player%"
                    send "&8>> &aWyslano prosbe o teleportacje do &7%arg 1%&a." to player
                    send "&8>> &aOtrzymales prosbe o przeteleportowanie sie do ciebie od &7%player%&a." to offlineplayer-arg
                    send "&8>> &aWpisz &7/tpaccept&a lub &7/tpdeny&a." to offlineplayer-arg
                    wait 120 seconds
                    set {tpa::ocz::%player%} to 0
                    set {tpa.%arg 1%} to 0
                    delete {tpa::ocz::%player%}
                    delete {tpa::%{_}%}
                    delete {tpa::%player%}
                else:
                    send "&cWyslales juz prosbe o teleport do tego gracza"
            else:
                send "&cPodany gracz nie jest online!"
                stop
        else:
            send "&cPoprawne uzycie komendy: &7/tpa [NICK]"
            stop
            
            
on quit:
        set {tpa::ocz::%player%} to 0
        set {tpa.%arg 1%} to 0
        delete {tpa::ocz::%player%}
        delete {tpa::%{_}%}
        delete {tpa::%player%}
        
        
command /tpaccept [<text>]:
    trigger:
        if arg 1 is not set:
            if {tpa::ocz::%player%} is set:
                set {_} to "%{tpa::ocz::%player%}%" parsed as player
                wait 10 seconds
                set {tpa::%player%-loc} to location of {_}
                set {tpa::%player%-next} to true
                if {tpa::%player%-next} is true:
                    set {tpa::%player%-not} to false
                    delete {tpa::%player%}
                    delete {tpa::ocz::%player%}
                loop 5 times:
                    wait 1 second
                    set {tpa::%player%-loc-n} to location of {_}
                if {tpa::%player%-loc} is not {tpa::%player%-loc-n}:
                    set {tpa::%player%-not} to true
                    send "&cRuszyles sie, teleportacja przerwana!" to {_}
                    delete {tpa::%player%}
                    delete {tpa::ocz::%player%}
                    set {tpa::ocz::%player%} to 0
                    delete {tpa::ocz::%player%}
                    set {tpa.%arg 1%} to 0
                if {tpa::%player%-not} is false:
                    delete {tpa::%{_}%}
                    delete {tpa::ocz::%player%}
                    delete {tpa::%player%}
                    set {tpa::ocz::%player%} to 0
                    set {tpa.%arg 1%} to 0
                    teleport {_} to location of player
            else:
                send "&cNie masz zadnych zadan o teleportacje."
                stop
        else:
            send "&cPoprawne uzycie komendy: &7/tpaccept"

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138503
Udostępnij na innych stronach

  • 0
8 minut temu, powley napisał:

Moglbys mi powiedziec gdzie to wpisac lub co zamienic w tym skrypcie?

command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			loop 10 times:
				if {tpaccept.%arg 1%.%player%} is true:
					loop exit #albo exit loop
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
				else:
					send "Gracz odrzucil twoja prosbe"
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
  					stop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::-x}:
						if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::-y}:
							if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::-z}:
								set {tpa::%player%-not} to true
								send "Teleportacja anulowana"
								set {tpa.%player%.%arg 1%} to false
								set {tpaccept.%arg 1%.%player%} to false
								stop
			if {tpa::%player%-not} is false:
				teleport player to location of player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

 

Edytowane przez ShroN
Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138508
Udostępnij na innych stronach

  • 0
12 godzin temu, ShroN napisał:

command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			loop 10 times:
				if {tpaccept.%arg 1%.%player%} is true:
					loop exit #albo exit loop
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
				else:
					send "Gracz odrzucil twoja prosbe"
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
  					stop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::-x}:
						if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::-y}:
							if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::-z}:
								set {tpa::%player%-not} to true
								send "Teleportacja anulowana"
								set {tpa.%player%.%arg 1%} to false
								set {tpaccept.%arg 1%.%player%} to false
								stop
			if {tpa::%player%-not} is false:
				teleport player to location of player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

 

Nie dziala.

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138529
Udostępnij na innych stronach

  • 0
2 minuty temu, ShroN napisał:

to znaczy, są jakieś błędy czy nic nie wywala, gdzie kod przestaje działać?

Jak napisze /tpa [nick] to pisze Wyslales prosbe o teleportacje do gracza i 10 razy spamuje Gracz odrzucil teleportacje i tepa bez /tpaccept

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138531
Udostępnij na innych stronach

  • 0
command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
			loop 10 times:
				if {tpaccept.%arg 1%.%player%} is true:
					loop exit #albo exit loop
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Okej, teraz sprobuj

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138533
Udostępnij na innych stronach

  • 0
6 minut temu, ShroN napisał:

command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
			loop 10 times:
				if {tpaccept.%arg 1%.%player%} is true:
					loop exit #albo exit loop
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
							set {tpa::%player%-not} to true
							send "Teleportacja anulowana"
							set {tpa.%player%.%arg 1%} to false
							set {tpaccept.%arg 1%.%player%} to false
							stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Okej, teraz sprobuj

Nie tepa i jak napisze np. /tpa gosciu  to pisze Wyslales prosbe do gracza gosciu Nie gracz gosciu nie zaakceptowal twojej prosby.

I jak wpisze /tpaccept to nic sie nie dzieje i nic nie pisze

Edytowane przez powley
Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138534
Udostępnij na innych stronach

  • 0
command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
			loop 10 times:
				wait 1 second
				if {tpaccept.%arg 1%.%player%} is true:
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
					loop exit #albo exit loop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Teraz zobacz, i napisz mi jakie wiadomości pojawiają się na chacie

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138536
Udostępnij na innych stronach

  • 0
1 minutę temu, ShroN napisał:

command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true:
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
			loop 10 times:
				wait 1 second
				if {tpaccept.%arg 1%.%player%} is true:
					send "Nie ruszaj sie przez 5 sekund"
					wait 2 second
					set {tpa::%player%-loc::x} to x-coordinate of player
					set {tpa::%player%-loc::y} to y-coordinate of player
					set {tpa::%player%-loc::z} to z-coordinate of player
					set {tpa::%player%-next} to true
					loop exit #albo exit loop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true:
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Teraz zobacz, i napisz mi jakie wiadomości pojawiają się na chacie

Po reloadzie?

 

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138537
Udostępnij na innych stronach

  • 0
Teraz, ShroN napisał:

Heheh, chodzi mi o errory jeżeli takowe są, i wiadomości po użyciu komendy

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. (tpa.sk, line 4: set {tpa%player%%arg 1%} to true:'}

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 (tpa.sk, line 62: set {tpaccept%player%%arg 1% to true:')

'set {tpa%player%%arg 1%} to true' is not a boolean (yes/no) (tpa.sk, line 4: set {tpa%player%%arg 1%} to true:')

'loop exit' is not a boolean (yes/no) (tpa.sk, line 17: loop exit#albo exit loop')

'set {tpaccept%player%%arg 1%} to true' is not a boolean (yes/no) (tpa.sk, line 62: set {tpaccept%player%%arg 1%} to true:')

Teraz po /tpaccept pisze do gracza ktory chce sie tepac "Nie gracz gosciu nie zaakceptowal twojej prosby" i nadal nic sie nie dzieje

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138540
Udostępnij na innych stronach

  • 0
command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
            set {tpa::%player%-loop-exit} to false
			loop 10 times:
				wait 1 second
				if {tpaccept.%arg 1%.%player%} is true:
					if {tpa::%player%-loop-exit} is false:
						set {tpa::%player%-loop-exit} to true
						send "Nie ruszaj sie przez 5 sekund"
						wait 2 second
						set {tpa::%player%-loc::x} to x-coordinate of player
						set {tpa::%player%-loc::y} to y-coordinate of player
						set {tpa::%player%-loc::z} to z-coordinate of player
						set {tpa::%player%-next} to true
						loop-exit #albo exit loop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Poprawiłem błędy powinno działać, a i jeżeli wywala ci error w 20 linii, to usuń loop-exit
I od razu się pisze o błędach,

teraz proszę jeżeli wyskoczą ci errory napisz je (ale przed tym uwzględnij pierwszą linie mojej wypowiedzi) oraz wiadomości które otrzymujesz po uruchomieniu komendy

Edytowane przez ShroN
Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138542
Udostępnij na innych stronach

  • 0
3 minuty temu, ShroN napisał:

command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
            set {tpa::%player%-loop-exit} to false
			loop 10 times:
				wait 1 second
				if {tpaccept.%arg 1%.%player%} is true:
					if {tpa::%player%-loop-exit} is false:
						set {tpa::%player%-loop-exit} to true
						send "Nie ruszaj sie przez 5 sekund"
						wait 2 second
						set {tpa::%player%-loc::x} to x-coordinate of player
						set {tpa::%player%-loc::y} to y-coordinate of player
						set {tpa::%player%-loc::z} to z-coordinate of player
						set {tpa::%player%-next} to true
						loop-exit #albo exit loop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Nie gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Poprawiłem błędy powinno działać, a i jeżeli wywala ci error w 20 linii, to usuń loop-exit
I od razu się pisze o błędach,

teraz proszę jeżeli wyskoczą ci errory napisz je (ale przed tym uwzględnij pierwszą linie mojej wypowiedzi) oraz wiadomości które otrzymujesz po uruchomieniu komendy

Nie ma juz errorow ale jest to samo co przedtem

"Teraz po /tpaccept pisze do gracza ktory chce sie tepac "Nie gracz gosciu nie zaakceptowal twojej prosby" i nadal nic sie nie dzieje"

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138543
Udostępnij na innych stronach

  • 0
command /tpa [<player>]:
	trigger:
		if player has permission "skript.tpa":
			set {tpa.%player%.%arg 1%} to true
			send "Wyslales prosbe o teleportacje do gracza %arg 1%"
			send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg
			set {tpa::%player%-next} to false
			set {tpa::%player%-loop-exit} to false
			loop 10 times:
				wait 1 second
				if {tpaccept.%arg 1%.%player%} is true:
					if {tpa::%player%-loop-exit} is false:
						set {tpa::%player%-loop-exit} to true
						send "Nie ruszaj sie przez 5 sekund"
						wait 2 second
						set {tpa::%player%-loc::x} to x-coordinate of player
						set {tpa::%player%-loc::y} to y-coordinate of player
						set {tpa::%player%-loc::z} to z-coordinate of player
						set {tpa::%player%-next} to true
						loop-exit #albo exit loop
			if {tpa::%player%-next} is true:
				set {tpa::%player%-not} to false
				loop 5 times:
					wait 1 second
					set {tpa::%player%-loc::n-x} to x-coordinate of player
					set {tpa::%player%-loc::n-y} to y-coordinate of player
					set {tpa::%player%-loc::n-z} to z-coordinate of player
					if {tpa::%player%-loc::n-x} is not {tpa::%player%-loc::x}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-y} is not {tpa::%player%-loc::y}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
					if {tpa::%player%-loc::n-z} is not {tpa::%player%-loc::z}:
						set {tpa::%player%-not} to true
						send "Teleportacja anulowana"
						set {tpa.%player%.%arg 1%} to false
						set {tpaccept.%arg 1%.%player%} to false
						stop
				if {tpa::%player%-not} is false:
					teleport player to location of player-arg
					set {tpa.%player%.%arg 1%} to false
					set {tpaccept.%arg 1%.%player%} to false
					send "Teleportacja"
					stop
			else:
				send "Gracz %arg 1% nie zaakceptowal twojej prosby"
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop


  
command /tpaccept [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% zaakceptował twoja prosbe" to player-arg
				set {tpaccept.%player%.%arg 1%} to true
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop
  
command /tpadeny [<player>]:
	trigger:
		if player has permission "skript.tpa":
			if {tpa.%arg 1%.%player%} is true:
				send "Gracz %player% odrzucil twoja prosbe" to player-arg
				set {tpa.%player%.%arg 1%} to false
				set {tpaccept.%arg 1%.%player%} to false
				stop
			else:
				send "Gracz %arg 1% nie prosil cie o teleportacje"
				stop

Spróbuj teraz, jeżeli to nie pomoże to sam nie wiem co jest nie tak...
Najpierw wpisz /tpa nick
A potem osoba [nick] ma wpisać /tpaccept ma na to 10 sekund.

Napisz co pisze na czacie u ciebie i u osoby [nick]

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138544
Udostępnij na innych stronach

  • 0

Osobie ktora chce sie tepac: Wyslales prosbe o teleportacje do gracza [nick]

Osobie do ktorej chce sie tepac: Gracz nick prosi o teleportacje, wpisz /tpaccept nick aby zaakceptowac

I jak wpisze /tpaccept to osobie ktora chce sie tepnac pisze Gracz nick nie zaakceptowal twojej prosby

I nie tepa

Odnośnik do komentarza
https://skript.pl/temat/20340-skrypt-na-komende-tpa-i-tpaccept/#findComment-138545
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ę...