Skocz do zawartości
  • 0

Jakikolwiek ruch


ry sieł

Pytanie

20 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
Teraz, Ixidi napisał:

Chodzi Ci o event?


on any movement:

 

Tylko tutaj jest taki problem, że gdy próbuję się rozglądnąć to mnie blokuje i wszystko sie buguje (tzn. kamera się cofa do poprzedniego stanu i tak w kółko i buguje się) :/

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104059
Udostępnij na innych stronach

  • 0

Event on move on
Np.
On walk on grass or #jakisblok:
#tab Send "chodzisz po trawie" to player

Wtedy graczowi pojawia się wiadomość powyżej gdy chodzi po trawie lub i innym danym bloku ( po to ma być "or #jakisblock"")

Natomiast gdy gracz chodzi kucając, zamień walk na step.
(Z tym step nie jestem pewien)



Wysłane z mojego ALE-L21 przy użyciu Tapatalka

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104061
Udostępnij na innych stronach

  • 0
 

variables:
	registered.%player% = false
	logged.%player% = false
	password.%player% = false
options:
	tag: &7[&6&lPLAY&a&lCRAFT&7] &f>
every 1 second:
	if {logged.%player%} is true:
		stop
	else:
		cancel event
on block break:
	if {logged.%player%} is true:
		stop
	else:
		cancel event
on first join:
	set {registered.%player%} to false
on join:
	set {logged.%player%} to false
	if {registered.%player%} is true:
		send "{@tag} &c/login <haslo>" to player
		wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/login <haslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/login <haslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/login <haslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/login <haslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			kick player due to "{@tag} &cNie zalogowales sie na czas!"
	else:
		send "{@tag} &c/register <haslo> <powtorzhaslo>" to player
		wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/register <haslo> <powtorzhaslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/register <haslo> <powtorzhaslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/register <haslo> <powtorzhaslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			send "{@tag} &c/register <haslo> <powtorzhaslo>" to player
			wait 5 seconds
		if {logged.%player%} is false:
			kick player due to "{@tag} &cNie zarejestrowales sie na czas!"
on disconnect:
	set {logged.%player%} to false
command /register <text> <text>:
	aliases: r, reg
	trigger:
		if {registered.%player%} is true:
			send "{@tag} &cJestes juz zarejestrowany!" to player
		else:
			if arg 2 is not set:
				send "{@tag} &cPoprawne uzycie: /register <haslo> <powtorzhaslo>" to player
			if arg 2 is set:
				if arg 1 is arg 2:
					set {registered.%player%} to true
					set {logged.%player%} to true
					set {password.%player%} to md5 hashed arg 1
					send "{@tag} &aPomyslnie zarejestrowano!" to player
			else:
				send "{@tag} &cPoprawne uzycie: /register <haslo> <powtorzhaslo>" to player
command /login <text>:
	aliases: l, log
	trigger:
		if {logged.%player%} is true:
			send "{@tag} &cJestes juz zalogowany!" to player
		else:
			if arg is not set:
				send "{@tag} &cPoprawne uzycie: /login <haslo>" to player
			else:
				if md5 hashed arg is {password.%player%}:
					set {logged.%player%} to true
					send "{@tag} &aPomyslnie zalogowano!" to player
				else:
					send "{@tag} &cPodales zle haslo!" to player
command /changepassword <text> <text>:
	aliases: changepass, cpass, cp
	trigger:
		if {registered.%player%} is true:
			if {logged.%player%} is true:
				if arg 2 is set:
					if md5 hashed arg 1 is {password.%player%}:
						set {password.%player%} to md5 hashed arg 2
						send "{@tag} &aZmieniono haslo!" to player
					else:
						send "{@tag} &cStare haslo jest nieprawidlowe!" to player
				else:
					send "{@tag} &cPoprawne uzycie: /changepassword <stare> <nowe>" to player
			else:
				stop
		else:
			stop
command /logout:
	aliases: log
	trigger:
		if {registered.%player%} is true:
			if {logged.%player%} is true:
				kick player due to "{@tag} &aWylogowano!"
			else:
				stop
		else:
			stop

@Ixidi Próbuję zrobić, że gdy {logged.%player%} jest ustawione na false to gracz może skakać i się rozglądać, ale nie może się poruszać (tzn. chodzić) :)

Edytowane przez ry sieł
Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104062
Udostępnij na innych stronach

  • 0
on join:
    set {_ploc.%player%} to location at x-location of player, y-location of player, z-location of player

on any move:
    if {logged.%player%} is false:
        if x-location of player is equal x-location of {_ploc.%player%}:
            teleport player to {_ploc.%player%}
        if z-location of player is equal z-location of {_ploc.%player%}:
            teleport player to {_ploc.%player%}
        else:
            stop

Nie sprawdzane, mozliwa duza ilość błędów

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104066
Udostępnij na innych stronach

  • 0

@Edek15PL Już odpalam Spigota i sprawdzam czy jest ok :P

@Edek15PL Niestety, teraz to już w ogóle mnie nie cofa ani nic :/ Mogę sobie chodzić nawet jak nie jestem zalogowany

Edytowane przez ry sieł
Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104067
Udostępnij na innych stronach

  • 0

Spróbuj tego

on join:
    set {_ploc.%player%} to the location at x-location of player, y-location of player, z-location of player

on any move:
    if {logged.%player%} is false:
        if x-location of player is not x-location of {_ploc.%player%}:
            teleport player to {_ploc.%player%}
        if z-location of player is not z-location of {_ploc.%player%}:
            teleport player to {_ploc.%player%}
        else:
            stop

 

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104070
Udostępnij na innych stronach

  • 0

Dobra, wpadłem na cos takiego.

on join:
    set {_plocX.%player%} to x-location of player
    set {_plocY.%player%} to y-location of player
    set x-location of {_ploc.%player%} to x-location of player
    set z-location of {_ploc.%player%} to z-location of player

on any move:
    if {logged.%player%} is false:
        if x-location of player is not {_plocX%player%}:
            set y-location of {_ploc.%player%} to y-location of player
            set pitch of {_ploc.%player%} to player's pitch
            set yaw of {_ploc.%player%} to player's yaw
            teleport player to {_ploc.%player}
        if z-location of player is not {_plocZ.%player%}:
            set y-location of {_ploc.%player%} to y-location of player
            set pitch of {_ploc.%player%} to player's pitch
            set yaw of {_ploc.%player%} to player's yaw
            teleport player to {_ploc.%player}
        else:
            stop

 

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104073
Udostępnij na innych stronach

  • 0

Musisz dodać na serwer ten plugin https://www.skunity.com/RandomSK

I dodaj w tych 2 linijkach gdzie jest "teleport player to {_ploc.%player%}" procenty.

 

To  jedyne co mogłem zrobić, najwyżej dziś rano na serwerze przetestuje i napisze inne rozwiązanie.

Edytowane przez Edek15PL
Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104077
Udostępnij na innych stronach

  • 0

@Edek15PL

Niestety, dalej to samo.

[00:24:10 ERROR]: the pitch of {_ploc.%the player%} can't be set to anything (uzytkownicy.sk, line 51: set pitch of {_ploc.%player%} to player's pitch')
[00:24:10 ERROR]: the yaw of {_ploc.%the player%} can't be set to anything (uzytkownicy.sk, line 52: set yaw of {_ploc.%player%} to player's yaw')
[00:24:10 ERROR]: the pitch of {_ploc.%the player%} can't be set to anything (uzytkownicy.sk, line 56: set pitch of {_ploc.%player%} to player's pitch')
[00:24:10 ERROR]: the yaw of {_ploc.%the player%} can't be set to anything (uzytkownicy.sk, line 57: set yaw of {_ploc.%player%} to player's yaw')

 

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104078
Udostępnij na innych stronach

  • 0

On join:
Set {l::%player%} location of player
Set {x::%player%} to rounded x-coordinate of player
Set {y::%player%} to rounded y-coordinate of player
Set {z::%player%} to rounded z-coordinate of player

On any move:
If rounded z-coordinate of player is not {z::%player%}:
Teleport player to {l::%player%}
If rounded x-coordinate of player is not {x::%player%}:
Teleport player to {l::%player%}
If rounded y-coordinate of player is not {y::%player%}:
Teleport player to {l::%player%}

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104127
Udostępnij na innych stronach

  • 0

@Quaczi Nareszcie ktoś mądry! Dzieki, działa :) Tylko jakbyś mógł, to popraw 

Set {l::%player%} location of player

na

Set {l::%player%} to location of player

żeby ktoś się nie pomylił jak będzie szukał odpowiedzi c;

//Proszę o zamknięcie

Odnośnik do komentarza
https://skript.pl/temat/15092-jakikolwiek-ruch/#findComment-104132
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ę...