Skocz do zawartości
  • 0

Skrypt na zamrażanie i odmrażanie (freeze)


Pytanie

Zwracam się do Was z prośbą o napisanie skryptu!

 

Komendy:

- /zamroz - zamraża wszystkich graczy na serwerze

- /odmroz - odmraża wszystkich graczy na serwerze

 

p.s: fajnie gdyby było coś takiego, że jak gracz opuścił serwer i wrócił na serwer, żeby nadal był zamrożony ;c

Edytowane przez papieztanczy2137
Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/
Udostępnij na innych stronach

  • Odpowiedzi 46
  • Dodano
  • Ostatniej odpowiedzi

Top użytkownicy dla tego pytania

Top użytkownicy dla tego pytania

Rekomendowane odpowiedzi

  • 0
7 godzin temu, xMarmo321 napisał:
command /ustawspawn [<integer>]:
	permission: teams.admin
	permission message: &cNie masz uprawnień do użycia tej komendy.
	trigger:
		if arg 1 is 1:
			set {spawn1} to location of player
			send "&aUstawiono spawn dla drużyny 1."
		if arg 1 is 2:
			set {spawn2} to location of player
			send "&aUstawiono spawn dla drużyny 2."
		if arg 1 is 3:
			set {spawn3} to location of player
			send "&aUstawiono spawn dla drużyny 3."
		else if arg 1 is not 1 or 2 or 3:
			send "&cDostępnę drużyny to 1/2/3"
		else if arg 1 is not set:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set:
		if {spawn2} is set:
			if {spawn3} is set:
				set {team1Count} to size of {listaTeam1::*}
				set {team2Count} to size of {listaTeam2::*}
				set {team3Count} to size of {listaTeam3::*}
				chance of 33,33%:
					set {randomTeam} to 1
				chance of 33,33%:
					set {randomTeam} to 2
				chance of 33,33%:
					set {randomTeam} to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::*}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::*}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::*}
					teleport player to {spawn3}
				send "&aDołączyłeś do drużyny {randomTeam}."
			else:
				send "&cNie wszystkie spawn-y zostały ustawione."

on damage:
	if {listaTeam1::*} contains victim:
		if {listaTeam1::*} contains attacker:
			cancel event
	else if {listaTeam2::*} contains victim:
		if {listaTeam2::*} contains attacker:
			cancel event
	else if {listaTeam3::*} contains victim:
		if {listaTeam3::*} contains attacker:
			cancel event

dolacza losowo graczy do jednej z 3 druzyn

[INFO] [Skript] Reloading mrozenie.sk...

[INFO] Line 78: (mrozenie.sk)

[INFO] Can't understand this section: chance of 33,33%

[INFO] Line: chance of 33,33%:

[INFO]

[INFO] Line 80: (mrozenie.sk)

[INFO] Can't understand this section: chance of 33,33%

[INFO] Line: chance of 33,33%:

[INFO]

[INFO] Line 82: (mrozenie.sk)

[INFO] Can't understand this section: chance of 33,33%

[INFO] Line: chance of 33,33%:

[INFO]

[INFO] [Skript] Encountered 3 errors while reloading mrozenie.sk! (287ms)

 

prosiłbym o poprawke

Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/#findComment-332054
Udostępnij na innych stronach

  • 0

Zamień sobie te 33,33 na samo 33 , 

1% zostanie, ale to trzeba mieć pecha 

Ale i tak to nie będzie działać bo wystarczy lekki pech i w jednej drużynie będzie 5 osób w drugiej 2 a w trzeciej 1. Nigdzie nie dajesz jakiegoś limitu podczas losowania, żeby nie dodawało do najbardziej zaludnionej drużyny 

Edytowane przez Fendi
Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/#findComment-332055
Udostępnij na innych stronach

  • 0
18 godzin temu, xMarmo321 napisał:
command /ustawspawn [<integer>]:
	permission: teams.admin
	permission message: &cNie masz uprawnień do użycia tej komendy.
	trigger:
		if arg 1 is 1:
			set {spawn1} to location of player
			send "&aUstawiono spawn dla drużyny 1."
		if arg 1 is 2:
			set {spawn2} to location of player
			send "&aUstawiono spawn dla drużyny 2."
		if arg 1 is 3:
			set {spawn3} to location of player
			send "&aUstawiono spawn dla drużyny 3."
		else if arg 1 is not 1 or 2 or 3:
			send "&cDostępnę drużyny to 1/2/3"
		else if arg 1 is not set:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set:
		if {spawn2} is set:
			if {spawn3} is set:
				set {team1Count} to size of {listaTeam1::*}
				set {team2Count} to size of {listaTeam2::*}
				set {team3Count} to size of {listaTeam3::*}
				chance of 33,33%:
					set {randomTeam} to 1
				chance of 33,33%:
					set {randomTeam} to 2
				chance of 33,33%:
					set {randomTeam} to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::*}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::*}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::*}
					teleport player to {spawn3}
				send "&aDołączyłeś do drużyny {randomTeam}."
			else:
				send "&cNie wszystkie spawn-y zostały ustawione."

on damage:
	if {listaTeam1::*} contains victim:
		if {listaTeam1::*} contains attacker:
			cancel event
	else if {listaTeam2::*} contains victim:
		if {listaTeam2::*} contains attacker:
			cancel event
	else if {listaTeam3::*} contains victim:
		if {listaTeam3::*} contains attacker:
			cancel event

dolacza losowo graczy do jednej z 3 druzyn

@xMarmo321 @Fendi stestowałem skrypt i jest tak ze jak osoba wejdzie na serwer normalnie teleprotuje go na ustawiony spawn, ale jak wyjdzie i wejdzie ponownie to nowy team mu wybiera, a chiałbym, żeby jak już raz wybralo komus team to zostaje w tym teamie...

 

a i jeszcze nie da się klepac między drużynami

Edytowane przez papieztanczy2137
Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/#findComment-332062
Udostępnij na innych stronach

  • 0

Tutaj poprwka
 

command /ustawspawn [<integer>]:
	permission: teams.admin
	permission message: &cNie masz uprawnień do użycia tej komendy.
	trigger:
		if arg 1 is 1:
			set {spawn1} to location of player
			send "&aUstawiono spawn dla drużyny 1."
		if arg 1 is 2:
			set {spawn2} to location of player
			send "&aUstawiono spawn dla drużyny 2."
		if arg 1 is 3:
			set {spawn3} to location of player
			send "&aUstawiono spawn dla drużyny 3."
		else if arg 1 is not 1 or 2 or 3:
			send "&cDostępnę drużyny to 1/2/3"
		else if arg 1 is not set:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set:
		if {spawn2} is set:
			if {spawn3} is set:
				if {listaTeam1::*} contains player:
					teleport player to {spawn1}
				else if {listaTeam3::*} contains player:
					teleport player to {spawn2}
				else if {listaTeam3::*} contains player:
					teleport player to {spawn3}
				else:
					set {team1Count} to size of {listaTeam1::*}
					set {team2Count} to size of {listaTeam2::*}
					set {team3Count} to size of {listaTeam3::*}
					chance of 33,33%:
						set {randomTeam} to 1
					chance of 33,33%:
						set {randomTeam} to 2
					chance of 33,33%:
						set {randomTeam} to 3
					if {randomTeam} is 1:
						execute console command "lp user %player% parent set team1"
						add player to {listaTeam1::*}
						teleport player to {spawn1}
					else if {randomTeam} is 2:
						execute console command "lp user %player% parent set team2"
						add player to {listaTeam2::*}
						teleport player to {spawn2}
					else:
						execute console command "lp user %player% parent set team3"
						add player to {listaTeam3::*}
						teleport player to {spawn3}
					send "&aDołączyłeś do drużyny {randomTeam}."

					

on damage:
	if {listaTeam1::*} contains victim:
		if {listaTeam1::*} contains attacker:
			cancel event
	else if {listaTeam2::*} contains victim:
		if {listaTeam2::*} contains attacker:
			cancel event
	else if {listaTeam3::*} contains victim:
		if {listaTeam3::*} contains attacker:
			cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/#findComment-332064
Udostępnij na innych stronach

  • 0
45 minut temu, xMarmo321 napisał:

Tutaj poprwka
 

command /ustawspawn [<integer>]:
	permission: teams.admin
	permission message: &cNie masz uprawnień do użycia tej komendy.
	trigger:
		if arg 1 is 1:
			set {spawn1} to location of player
			send "&aUstawiono spawn dla drużyny 1."
		if arg 1 is 2:
			set {spawn2} to location of player
			send "&aUstawiono spawn dla drużyny 2."
		if arg 1 is 3:
			set {spawn3} to location of player
			send "&aUstawiono spawn dla drużyny 3."
		else if arg 1 is not 1 or 2 or 3:
			send "&cDostępnę drużyny to 1/2/3"
		else if arg 1 is not set:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set:
		if {spawn2} is set:
			if {spawn3} is set:
				if {listaTeam1::*} contains player:
					teleport player to {spawn1}
				else if {listaTeam3::*} contains player:
					teleport player to {spawn2}
				else if {listaTeam3::*} contains player:
					teleport player to {spawn3}
				else:
					set {team1Count} to size of {listaTeam1::*}
					set {team2Count} to size of {listaTeam2::*}
					set {team3Count} to size of {listaTeam3::*}
					chance of 33,33%:
						set {randomTeam} to 1
					chance of 33,33%:
						set {randomTeam} to 2
					chance of 33,33%:
						set {randomTeam} to 3
					if {randomTeam} is 1:
						execute console command "lp user %player% parent set team1"
						add player to {listaTeam1::*}
						teleport player to {spawn1}
					else if {randomTeam} is 2:
						execute console command "lp user %player% parent set team2"
						add player to {listaTeam2::*}
						teleport player to {spawn2}
					else:
						execute console command "lp user %player% parent set team3"
						add player to {listaTeam3::*}
						teleport player to {spawn3}
					send "&aDołączyłeś do drużyny {randomTeam}."

					

on damage:
	if {listaTeam1::*} contains victim:
		if {listaTeam1::*} contains attacker:
			cancel event
	else if {listaTeam2::*} contains victim:
		if {listaTeam2::*} contains attacker:
			cancel event
	else if {listaTeam3::*} contains victim:
		if {listaTeam3::*} contains attacker:
			cancel event

 

jest chyba jeszvze pvp w teamie

Edytowane przez papieztanczy2137
Odnośnik do komentarza
https://skript.pl/temat/54810-skrypt-na-zamra%C5%BCanie-i-odmra%C5%BCanie-freeze/#findComment-332068
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ę...