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
3 godziny temu, xMarmo321 napisał:
command /odliczanie:
    trigger:
        set {_countdown} to 10
        loop 10 times:
            wait 1 second
            set {_countdown} to {_countdown} - 1
            play sound "minecraft:block.note_block.harp" at player
            send title "Odliczanie skończy się za:" with subtitle "%{_countdown}% sekund" to all players
            apply potion of blindness for 1000 days
        send title "Koniec odliczania" with subtitle "czas minął" to all players
        remove blindness from player

Pisane na szybko i nie testowane

@xMarmo321 @Fendi dziękuję slicznie już za pomoc <3

ale jeszcze jedno pytanie (mam nadzieje ze ostanie :)).. Zwracam się do Was z prośbą o napisanie skryptu, który przyłączałby graczy do jednej z trzech drużyn (drużyny mogą być zrobione komendą /team... coś takiego:

- /ustawspawn1 - ustawia spawna drużyny 1

- /ustawspawn2 - ustawia spawna drużyny 2

- /ustawspawn3 - ustawia spawna drużyny 3

 

Gdy gracze wchodzą na serwer, automatycznie i losowo zostają przyłączeni do jednej z trzech drużyn oraz pojawiają się w ustawionym miejscu "/ustawspawn1-3". Gdy w drużynie 1 jest 15 osób, w drużynie 2 jest 15 osób, a w drużynie 3 jest 14 osób - to następna osoba, która dołączy na serwer, zostaje przyłączona do drużyny 3.

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

  • 0
41 minut temu, Fendi napisał:

anihilacje robisz? jezeli tak to masz do tego paczke pluginow na necie

niee, potrzebne mi na serwer moj, ze znajomymi... daloby sie cos takiego napisac?

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

  • 0
command /ustawspawn [<integer>]:
	permission: teams.admin
	permission send: &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 2 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:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set and {spawn2} is set and {spawn3} is set:
		set {randomTeam} to random integer from 1 to 3
		if {randomTeam} is 1:
			execute console command "lp user %player% parent set team1"
			add player to {listaTeam1::%player%}
			teleport player to {spawn1}
		else if {randomTeam} is 2:
			execute console command "lp user %player% parent set team2"
			add player to {listaTeam2::%player%}
			teleport player to {spawn2}
		else:
			execute console command "lp user %player% parent set team3"
			add player to {listaTeam3::%player%}
			teleport player to {spawn3}
		set {team1Count::*} to size of {listaTeam1::*}
		set {team2Count::*} to size of {listaTeam2::*}
		set {team3Count::*} to size of {listaTeam3::*}
		if {team1Count::*} >= 15 and {team2Count::*} >= 15:
			execute console command "lp user %player% parent set team3"
			teleport player to {spawn3}
			send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
		else if {team1Count} >= 15:
			execute console command "lp user %player% parent set team2"
			teleport player to {spawn2}
			send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
		else if {team2Count} >= 15:
			execute console command "lp user %player% parent set team1"
			teleport player to {spawn1}
			send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
		else:
			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-331930
Udostępnij na innych stronach

  • 0
17 godzin temu, xMarmo321 napisał:
command /ustawspawn [<integer>]:
	permission: teams.admin
	permission send: &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 2 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:
			send "&cDostępnę drużyny to 1/2/3"

on join:
	if {spawn1} is set and {spawn2} is set and {spawn3} is set:
		set {randomTeam} to random integer from 1 to 3
		if {randomTeam} is 1:
			execute console command "lp user %player% parent set team1"
			add player to {listaTeam1::%player%}
			teleport player to {spawn1}
		else if {randomTeam} is 2:
			execute console command "lp user %player% parent set team2"
			add player to {listaTeam2::%player%}
			teleport player to {spawn2}
		else:
			execute console command "lp user %player% parent set team3"
			add player to {listaTeam3::%player%}
			teleport player to {spawn3}
		set {team1Count::*} to size of {listaTeam1::*}
		set {team2Count::*} to size of {listaTeam2::*}
		set {team3Count::*} to size of {listaTeam3::*}
		if {team1Count::*} >= 15 and {team2Count::*} >= 15:
			execute console command "lp user %player% parent set team3"
			teleport player to {spawn3}
			send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
		else if {team1Count} >= 15:
			execute console command "lp user %player% parent set team2"
			teleport player to {spawn2}
			send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
		else if {team2Count} >= 15:
			execute console command "lp user %player% parent set team1"
			teleport player to {spawn1}
			send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
		else:
			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

 

takie błedy wyskakują.. jakbyś poprawił byłbym wdzięczny <3

 

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

[INFO] Line 57: (mrozenie.sk)

[INFO] Can't compare an integer with a text

[INFO] Line: if arg 1 is "1":

[INFO]

[INFO] Line 60: (mrozenie.sk)

[INFO] This command doesn't have a 2nd argument

[INFO] Line: if arg 2 is "2":

[INFO]

[INFO] Line 63: (mrozenie.sk)

[INFO] Can't compare an integer with a text

[INFO] Line: if arg 1 is "3":

[INFO]

[INFO] Line 66: (mrozenie.sk)

[INFO] 'else' has to be placed just after another 'if' or 'else if' section

[INFO] Line: else:

[INFO]

[INFO] Line 70: (mrozenie.sk)

[INFO] Can't understand this condition: '{spawn1} is set and {spawn2} is set and {spawn3} is set'

[INFO] Line: if {spawn1} is set and {spawn2} is set and {spawn3} is set:

[INFO]

[INFO] [Skript] Encountered 5 errors while reloading mrozenie.sk! (193ms)

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

  • 0
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 {randomTeam} to random integer from 1 to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::%player%}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::%player%}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::%player%}
					teleport player to {spawn3}
				set {team1Count::*} to size of {listaTeam1::*}
				set {team2Count::*} to size of {listaTeam2::*}
				set {team3Count::*} to size of {listaTeam3::*}
				if {team1Count::*} = 15:
					if {team2Count::*} = 15:
						execute console command "lp user %player% parent set team3"
						teleport player to {spawn3}
						send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
						stop
					if {team1Count} >= 15:
						execute console command "lp user %player% parent set team2"
						teleport player to {spawn2}
						send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
						stop
					if {team2Count} >= 15:
						execute console command "lp user %player% parent set team1"
						teleport player to {spawn1}
						send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
					else:
						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

 

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

  • 0
5 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 {randomTeam} to random integer from 1 to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::%player%}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::%player%}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::%player%}
					teleport player to {spawn3}
				set {team1Count::*} to size of {listaTeam1::*}
				set {team2Count::*} to size of {listaTeam2::*}
				set {team3Count::*} to size of {listaTeam3::*}
				if {team1Count::*} = 15 and {team2Count::*} = 15:
					execute console command "lp user %player% parent set team3"
					teleport player to {spawn3}
					send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
					stop
				if {team1Count} >= 15:
					execute console command "lp user %player% parent set team2"
					teleport player to {spawn2}
					send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
					stop
				if {team2Count} >= 15:
					execute console command "lp user %player% parent set team1"
					teleport player to {spawn1}
					send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
				else:
					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

 

teraz cos takiego:

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

[INFO] Line 91: (mrozenie.sk)

[INFO] Can't understand this condition: '{team1Count::*} = 15 and {team2Count::*} = 15'

[INFO] Line: if {team1Count::*} = 15 and {team2Count::*} = 15:

[INFO]

[INFO] [Skript] Encountered 1 error while reloading mrozenie.sk! (321ms)

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

  • 0

skopiuj kod jeszcze raz zmieniłem go! albo masz:
 

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 {randomTeam} to random integer from 1 to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::%player%}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::%player%}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::%player%}
					teleport player to {spawn3}
				set {team1Count::*} to size of {listaTeam1::*}
				set {team2Count::*} to size of {listaTeam2::*}
				set {team3Count::*} to size of {listaTeam3::*}
				if {team1Count::*} = 15:
					if {team2Count::*} = 15:
						execute console command "lp user %player% parent set team3"
						teleport player to {spawn3}
						send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
						stop
					if {team1Count} >= 15:
						execute console command "lp user %player% parent set team2"
						teleport player to {spawn2}
						send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
						stop
					if {team2Count} >= 15:
						execute console command "lp user %player% parent set team1"
						teleport player to {spawn1}
						send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
					else:
						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-332007
Udostępnij na innych stronach

  • 0
7 minut temu, xMarmo321 napisał:

skopiuj kod jeszcze raz zmieniłem go! albo masz:
 

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 {randomTeam} to random integer from 1 to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::%player%}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::%player%}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::%player%}
					teleport player to {spawn3}
				set {team1Count::*} to size of {listaTeam1::*}
				set {team2Count::*} to size of {listaTeam2::*}
				set {team3Count::*} to size of {listaTeam3::*}
				if {team1Count::*} = 15:
					if {team2Count::*} = 15:
						execute console command "lp user %player% parent set team3"
						teleport player to {spawn3}
						send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
						stop
					if {team1Count} >= 15:
						execute console command "lp user %player% parent set team2"
						teleport player to {spawn2}
						send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
						stop
					if {team2Count} >= 15:
						execute console command "lp user %player% parent set team1"
						teleport player to {spawn1}
						send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
					else:
						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

 

chyba działa... nie sprawdzałem jeszcze na serwerze w minecrafcie, ale kod nie ma juz zadnych bledow

 

dziekuje <3

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

  • 0
12 godzin temu, xMarmo321 napisał:

skopiuj kod jeszcze raz zmieniłem go! albo masz:
 

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 {randomTeam} to random integer from 1 to 3
				if {randomTeam} is 1:
					execute console command "lp user %player% parent set team1"
					add player to {listaTeam1::%player%}
					teleport player to {spawn1}
				else if {randomTeam} is 2:
					execute console command "lp user %player% parent set team2"
					add player to {listaTeam2::%player%}
					teleport player to {spawn2}
				else:
					execute console command "lp user %player% parent set team3"
					add player to {listaTeam3::%player%}
					teleport player to {spawn3}
				set {team1Count::*} to size of {listaTeam1::*}
				set {team2Count::*} to size of {listaTeam2::*}
				set {team3Count::*} to size of {listaTeam3::*}
				if {team1Count::*} = 15:
					if {team2Count::*} = 15:
						execute console command "lp user %player% parent set team3"
						teleport player to {spawn3}
						send "&aDołączyłeś do drużyny 3 z powodu zapełnienia pozostałych drużyn."
						stop
					if {team1Count} >= 15:
						execute console command "lp user %player% parent set team2"
						teleport player to {spawn2}
						send "&aDołączyłeś do drużyny 2 z powodu zapełnienia drużyny 1."
						stop
					if {team2Count} >= 15:
						execute console command "lp user %player% parent set team1"
						teleport player to {spawn1}
						send "&aDołączyłeś do drużyny 1 z powodu zapełnienia drużyny 2."
					else:
						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

 

@xMarmo321 a pytanie mam... jak ten skrypt w ogole dziala? jak osoby będą wbijały na serwer (np. wbije 9 osób) to rozdzielą się na 3 druyny po 3 osoby?

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

  • 0
35 minut temu, xMarmo321 napisał:

nie tego nie przewidzialem dolaczy wszystkich do druzyny 1 hmm'

 

to ja prosiłem o skrypt, ktory losowo bedzie rozdzielal wszystkich graczy do druzyn (15 to był tylko przyklad) ;c

 

poprawisz?

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

  • 0
6 godzin temu, Fendi napisał:

Powinno działać ;D

Licze na like

fajny skrypt, ale z tego co widze to u ciebie sie wybiera druzyne, a mi chodzi o to zeby było losowo dobierane (skrypt moze byc powiązany z komendą /team z minecraft)

 

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

  • 0
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

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