Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Szukam] Skrypt na losową teleportację.


Rekomendowane odpowiedzi

Opublikowano

Witam jest ktoś w stanie napisać mi skrypt lub dać link do skryptu który :

Tepa w losowe x i z ale ma stałe Y czyli x oraz z losuje a Y jest zawsze 80 . Ponad to po prze teleportowaniu gracz ma mieć ochronę od upadku na 15 s .

Nie piszcie mi o pluginach które automatycznie dostosowują y do położenia szukam tylko i wyłącznie takiego skryptu który opisałem wyżej :) z góry dziękuję :) Liczę na odpowiedz :D

Opublikowano
command /teleport:
    trigger:
        set {_x} to random integer between [Wartość] and [Wartość]
        set {_y} to 80
        set {_z} to random integer between [Wartość] and [Wartość]
        set {_miejsce} to location at {_x}, {_y}, {_z}
        teleport player to {_miejsce}
        set {_upadek::%player%} to true
on damage:
    if {_upadek::%player%} is true:
        damage cause is fall
        cancel event
    else:
        stop

Nie testowałem, ale powinno działać, najwyżej podasz błędy i dam poprawiony kod

TEMAT


 


Opublikowano

@pablos11   Jednak errory xD

 [15:17:35] [server thread/ERROR]: 'set {_x} to random integer between [Warto��] and [Warto��]' is not a boolean (yes/no) (tp.sk, line 3: set {_x} to random integer between [Warto��] and [Warto��]')
[15:17:35] [server thread/ERROR]: 'set {_z} to random integer between [Warto��] and [Warto��]' is not a boolean (yes/no) (tp.sk, line 5: set {_z} to random integer between [Warto��] and [Warto��]')
[15:17:35] [server thread/ERROR]: Use 'attacker' and/or 'victim' in damage events (tp.sk, line 10: if {_upadek::%player%} is true:')
[15:17:35] [server thread/ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (tp.sk, line 13: else:')

Opublikowano

Zamiast [Wartość] podaj liczby :D

przykład: set {_x} to random integer between -10000 and 10000

Dałem to tak bo nie wiem jaką na jaką odległość ma teleportować graczy :D

 

on damage:
    if {_upadek::%attacker%} is true:
        damage cause is fall
        cancel event

TEMAT


 


Opublikowano

@pablos11

Teraz coś takiego ;/ :

[15:36:51] [server thread/ERROR]: Use 'attacker' and/or 'victim' in damage events (tp.sk, line 10: if {_upadek::%player%} is true:')
[15:36:51] [server thread/ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (tp.sk, line 13: else:')

Opublikowano

@pablos11 teraz tak ;P

[15:52:29] [server thread/ERROR]: [skript] 'set {_x} to random integer between set {_x} to random integer between -1000 and 1000' is not a boolean (yes/no) (tp.sk, line 3: set {_x} to random integer between set {_x} to random integer between -1000 and 1000')
[15:52:29] [server thread/ERROR]: [skript] 'set {_z} to random integer between set {_z} to random integer between -1000 and 1000' is not a boolean (yes/no) (tp.sk, line 5: set {_z} to random integer between set {_z} to random integer between -1000 and 1000')

Opublikowano


command /teleport:

trigger:

set {_x} to a random integer between {@xMin} and {@xMax}

set {_z} to a random integer between {@zMin} and {@zMax}

set {y} to 80

execute console command "/tppos %player% %{_x}% {_y} %{_z}%"

stop

TEMAT


 


Opublikowano

@pablos11

Ustawił bys tak żeby tepało od -1000 do +1000 ?

[17:54:24] [server thread/ERROR]: undefined option {@xMin} (tp.sk, line 3: set {_x} to a random integer between {@xMin} and {@xMax}')
[17:54:24] [server thread/ERROR]: undefined option {@xMax} (tp.sk, line 3: set {_x} to a random integer between {@xMin} and {@xMax}')
[17:54:24] [server thread/ERROR]: undefined option {@zMin} (tp.sk, line 4: set {_z} to a random integer between {@zMin} and {@zMax}')
[17:54:24] [server thread/ERROR]: undefined option {@zMax} (tp.sk, line 4: set {_z} to a random integer between {@zMin} and {@zMax}')

Opublikowano
command /teleport:
    trigger:
        set {_x} to a random integer between -1000 and 1000
        set {_z} to a random integer between -1000 and 1000
        set {y} to 80
        execute console command "/tppos %player% %{_x}% {_y} %{_z}%"
        stop

teraz powinno działać, nie dałem Ci kawałku kodu w którym mam ustawione opcje :D

TEMAT


 


Opublikowano
command /teleports:
	trigger:
		set {_x} to a random integer between -1000 and 1000
		set {_z} to a random integer between -1000 and 1000
		execute console command "teleport %player% %{_x}% 80 %{_z}%"
		stop

Ok testowałem na swoim serwerze, specjalnie go włączyłem działa

TEMAT


 


Opublikowano

@pablos11

kolejny problem xD

w konsoli losuje ale w minecraft tepa mnie ciagle w te same kordy

 [19:52:06] [server thread/INFO]: CONSOLE issued server command: /tppos Spike207 -6 80 64
[19:52:06] [server thread/INFO]: Teleportacja...
Opublikowano

łooo jezu, dawno nie pisałem takich małych skryptów, ale sprawdź dodając warunek:

 

if blockunder player is a a water:

cancel event

send "Blok pod toba to woda, wpisz komende jeszcze raz"

TEMAT


 


Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...