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

Proszę o naprawę kawałku skryptu


renexo

Rekomendowane odpowiedzi

Opublikowano

Cześć, użytkownicy mpcforum zwracam się do Was o poprawienie kawałku skryptu + dodanie, ale to później.

kod:

 

command /2v2 [<text>] [<text>] [<text>]:
	trigger:
		if arg 1 is "create":
			add arg 2 to {areny::*}
			send "&eStworzyles arene %arg 2%"
			stop
		if arg 1 is "delete":
			remove arg 2 from {areny::*}
			send "&eUsunoles arene %arg 2%"
			stop
		if arg 1 is "setspawna":
			if arg 2 is set:
				if arg 3 is set:
					if arg 3 is "1":
						if {areny::*} contains arg 2:
							set {spawn.1.%arg 2%} to location of player
							send "&4Ustawiles spawn 1 dla areny %arg 2%"
					if arg 3 is "2":
						if {areny::*} contains arg 2:
						set {spawn.2.%arg 2%} to location of player
						send "&4Ustawiles spawn 2 dla areny %arg 2%"
						stop
		if arg 1 is "slobby":
			set {lobby} to location of player
			send "&eUstawiles lobby"
			stop
		if arg 1 is "setspawn":
			set {spawn} to location of player
			send "&eUstawiles spawn"
			stop
		if arg 1 is "join":
			if arg 2 is set:
				if {arena.start.%arg 2%} is not set:
					if {areny::*} contains arg 2:
						if {team.1.%arg 2%::*} > 2:
							add player to {team.1.%arg 2%::*}
							add 1 to {gracze.%arg 2%::*}
							add player to {lgracze.%arg 2%::*}
							set {gra.%player%} to true
							teleport player to {lobby}
							set {inv.%player%} to player's serialized inventory
							set {helm.%player%} to "%helmet of player%"
							set {napiersnik.%player%} to "%chestplate of player%"
							set {spodnie.%player%} to "%legging of player%"
							set {buty.%player%} to "%boots of player%"
							set {inv.%player%} to serialized inventory of player
							clear player's inventory
							send "&eDolaczyles do kolejki 2vs2!"
							if {lgracze.%arg 2%::*} = 4:
								loop {gracze.%arg 2%::*}:
									send "&eWalka rozpocznie sie za 10s" to loop-value
									wait 5 seconds
									send "&eWalka rozpocznie sie za 4s" to loop-value
									wait 1 seconds
									send "&eWalka rozpocznie sie za 3s" to loop-value		
									wait 1 seconds									
									send "&eWalka rozpocznie sie za 2s" to loop-value		
									wait 1 seconds									
									send "&eWalka rozpocznie sie za 1s" to loop-value		
									wait 1 seconds	
									loop {team.1.%arg 2%::*}:
										teleport loop-value-1 to {spawn.1.%arg 2%}
										teleport loop-value-2 to {spawn.1.%arg 2%}
									loop {team.2.%arg 2%::*}:
										teleport loop-value-1 to {spawn.2.%arg 2%}
										teleport loop-value-2 to {spawn.2.%arg 2%}
									send "&eWALCZ!!!" to loop-value
						else:
							if {team.1.%arg 2%::*} = 2:
								add player to {team.2.%arg 2%::*}
								add 1 to {gracze.%arg 2%::*}
								add player to {lgracze.%arg 2%::*}
								set {Gra.%player%} to true
								teleport player to {lobby}
								set {inv.%player%} to player's serialized inventory
								set {helm.%player%} to "%helmet of player%"
								set {napiersnik.%player%} to "%chestplate of player%"
								set {spodnie.%player%} to "%legging of player%"
								set {buty.%player%} to "%boots of player%"
								set {inv.%player%} to serialized inventory of player
								clear player's inventory
								send "&eDolaczyles do kolejki 2vs2!"
								if {gracze.%arg 2%} = 4:
									set {arena.start.%arg 2%} to true
									loop {lgracze.%arg 2%::*}:
										send "&4Walka rozpocznie sie za 10s" to loop-value
										wait 5 seconds
										send "&eWalka rozpocznie sie za 4s" to loop-value
										wait 1 seconds
										send "&eWalka rozpocznie sie za 3s" to loop-value		
										wait 1 seconds									
										send "&eWalka rozpocznie sie za 2s" to loop-value		
										wait 1 seconds									
										send "&eWalka rozpocznie sie za 1s" to loop-value		
										wait 1 seconds	
										loop {team.1.%arg 2%::*}:
											teleport loop-value-1 to {spawn.1.%arg 2%}
											teleport loop-value-2 to {spawn.1.%arg 2%}
										wait 1 ticks
										loop {team.2.%arg 2%::*}:
											teleport loop-value-1 to {spawn.2.%arg 2%}
											teleport loop-value-2 to {spawn.2.%arg 2%}
										send "&eWALCZ!!!" to loop-value
					else:
						send "&4Nie ma takiej areny"
				else:
					send "&4Arena wystartowala"
			else:
				send "&4/2v2 join [nr areny]"
			
		if arg 1 is "leave":
			if arg 2 is set:
				if {gra.%player%} is true:
					set {gra.%player%} to false
					remove player from {team.1.%arg 2%::*}
					remove player from {team.2.%arg 2%::*}
					remove 1 from {gracze.%arg 2%::*}
					remove player from {lgracze.%arg 2%::*}
					teleport player to {spawn}
					send "&eWyszles z gry"
					restore inventory of player from {inv.%player%}
					equip the player with {helm.%player%} parsed as item
					equip the player with {napiersnik.%player%} parsed as item
					equip the player with {spodnie.%player%} parsed as item
					equip the player with {buty.%player%} parsed as item
					restore inventory of player from {inv.%player%}
					stop
				else:
					send "&4Nie jestes podczas gry"
		if arg 1 is "stoparena":
			if arg 2 is set:
				delete {arena.start.%arg 2%}
				loop all players:
					if {gra.loop-player} is true:
						set {gra.%loop-player%} to false
						teleport loop-player to {spawn} 
				send "&4Stop areny %arg 2% udal sie"
				clear {team.1.%arg 2%::*}
				clear {team.2.%arg 2%::*}
on death of player:
	if {gra.%player%} is true:
		set {gra.%player%} to false
		teleport player to {spawn}
		send "&eWyszles z gry"
		restore inventory of player from {inv.%player%}
		equip the player with {helm.%player%} parsed as item
		equip the player with {napiersnik.%player%} parsed as item
		equip the player with {spodnie.%player%} parsed as item
		equip the player with {buty.%player%} parsed as item
		restore inventory of player from {inv.%player%}
		
on damage of player:
	attacker is player:
		if {gra.%victim%} is true:
			if {team.1.1} contains victim:
				if {team.1.1} contains attacker:
					cancel event
on damage of player:
	attacker is player:
		if {gra.%victim%} is true:
			if {team.2.1} contains victim:
				if {team.2.1} contains attacker:
					cancel event

 

 

Kiedy wpisuje się /2v2 join [arena], to nic się nie dzieje!!, że dołączyło się do kolejki, tyle znalazłem może być więcej

I proszę o dodanie jeżeli 1 drużyna z dwóch wygra wtedy dostaje np. 1 diaxa

 

Daje +!!!]

@Edit

Jak się wpisze /2v2 join arena to pisze "Arena wystartowala" i nie przenosi nigdzie..

4Headzik

  • 4 tygodnie później...
Opublikowano

Witam,

 

Na wstępie powiem: Cały skrypt jest napisany perfekcyjnie - poziom bardzo zaawansowany. Skrypt jest zoptymalizowany i nie powinien lagować serwera ;)

 

Ale przejdźmy do błędu. Po wpisaniu tej komendy nic się nie dzieje - co oznacza że błąd tkwi od linijki 35 do linijki 103 z prostej przyczyny: tylko tam nie ma "else'a" który byłby konotowany poprzez niepasujące zmienne czy też loopy. A prościej - nie ma tam żadnego "else'a" który wykonywany byłby przez niepasującą znienną

{team.1.%arg 2%::*}. Oznacza to, że zmienna ta wynosi mniej niż 2, lub przyjęła ona wartość <none>, ponieważ nie uwzględniona została w "variables'ach". Albo ta zmienna jest po prostu tekstem. Przez to działanie skryptu jest zakańczane, a Ty nie otrzymujesz żadnej informacji zwrotnej ;) Musisz sprawdzić zmienną {team.1.%arg 2%::*}.

 

Jeżeli jest coś niezrozumiałe - wyjaśnie, a jeżeli pomogłem - możesz dać like ;)

:D  Let's start with MPCForum :D

 

 

 

30/50/69/100/150/200/250...

Opublikowano

Ha, już chyba wiem, gdzie tkwi błąd.

 

Chodzi o zmienną {team.1.%arg 2%::*} oraz {team.2.%arg 2%::*}. Są to zmienne typu "list", co oznacza, że wartości do nich dodawane są dodawane do listy po przecinkach w ten sposób:

[wartość1], [wartość2], [wartość3], ...

No dobrze, ale co z tego?

 

A no to, że w linijce nr 35 oraz nr 69 sprawdzasz, czy zmienne te są liczbą. Ja wiem, że chodziło Ci o to, ile graczy wbiło do danego teamu, ale niestety skrypt to widzi tak:

if {team.1.%arg 2%::*} > 2:

# MYŚLENIE SKRYPTU:

#Aha, mam sprawdzić, czy ta zmienna jest większa od 2, wczytuje ją...

#Ta zmienna jest listą, czyli nie jest liczbą. Dobra, przeskakujemy do "else'a"...

else:
    if {team.1.%arg 2%::*} = 2:

# MYŚLENIE SKRYPTU:

#Aha, mam sprawdzić, czy ta zmienna jest równa 2, wczytuje ją...

#Ta zmienna jest listą, czyli nie jest liczbą. "Else'a" nie ma, więc działanie skryptu przerywam, i nic się nie będzie działo.

 

Rozwiązanie:

 

Zrób następne zmienne. Nazwij je np. {team.1.%arg 2%.count} oraz {team.2.%arg 2%.count}. W "variables'ach" ustaw ich wartość na 0. Kiedy gracz dołącza do drużyny np. 1, daj:

add 1 to {team.1.%arg 2%.count}

I podobnie z drużyną 2.

 

A linijki 35 i 69 zmień tak:

35. if {team.1.%arg 2%.count} > 2:

69. if {team.2.%arg 2%.count} = 2:

No i wszystko.

 

Jak coś jest niezrozumiałe (80% szans, bo jestem paziem xD), to pomoge.

 

Wassup

:D  Let's start with MPCForum :D

 

 

 

30/50/69/100/150/200/250...

Opublikowano

Ha, już chyba wiem, gdzie tkwi błąd.

 

Chodzi o zmienną {team.1.%arg 2%::*} oraz {team.2.%arg 2%::*}. Są to zmienne typu "list", co oznacza, że wartości do nich dodawane są dodawane do listy po przecinkach w ten sposób:

[wartość1], [wartość2], [wartość3], ...

No dobrze, ale co z tego?

 

A no to, że w linijce nr 35 oraz nr 69 sprawdzasz, czy zmienne te są liczbą. Ja wiem, że chodziło Ci o to, ile graczy wbiło do danego teamu, ale niestety skrypt to widzi tak:

if {team.1.%arg 2%::*} > 2:

# MYŚLENIE SKRYPTU:

#Aha, mam sprawdzić, czy ta zmienna jest większa od 2, wczytuje ją...

#Ta zmienna jest listą, czyli nie jest liczbą. Dobra, przeskakujemy do "else'a"...

else:
    if {team.1.%arg 2%::*} = 2:

# MYŚLENIE SKRYPTU:

#Aha, mam sprawdzić, czy ta zmienna jest równa 2, wczytuje ją...

#Ta zmienna jest listą, czyli nie jest liczbą. "Else'a" nie ma, więc działanie skryptu przerywam, i nic się nie będzie działo.

 

Rozwiązanie:

 

Zrób następne zmienne. Nazwij je np. {team.1.%arg 2%.count} oraz {team.2.%arg 2%.count}. W "variables'ach" ustaw ich wartość na 0. Kiedy gracz dołącza do drużyny np. 1, daj:

add 1 to {team.1.%arg 2%.count}

I podobnie z drużyną 2.

 

A linijki 35 i 69 zmień tak:

35. if {team.1.%arg 2%.count} > 2:

69. if {team.2.%arg 2%.count} = 2:

No i wszystko.

 

Jak coś jest niezrozumiałe (80% szans, bo jestem paziem xD), to pomoge.

 

Wassup

Zmieniłem tylko te 2 linijki i teraz nic nie wyskakuje po /2v2 join nazwa :/

 

Zrób następne zmienne. Nazwij je np. {team.1.%arg 2%.count} oraz {team.2.%arg 2%.count}. W "variables'ach" ustaw ich wartość na 0. Kiedy gracz dołącza do drużyny np. 1, daj:

add 1 to {team.1.%arg 2%.count}

Nie ogarniam :O

 

SKRYPT NIE JEST MÓJ!

4Headzik

Opublikowano

Sorry że tak późno odpisuje,

ale masz tu cały skrypt. Powinno działać, jak nie to pisz.

 

 

 

variables:
        {team.1.%text%.count} = 0
        {team.2.%text%.count} = 0

command /2v2 [<text>] [<text>] [<text>]:
    trigger:
        if arg 1 is "create":
            add arg 2 to {areny::*}
            send "&eStworzyles arene %arg 2%"
            stop
        if arg 1 is "delete":
            remove arg 2 from {areny::*}
            send "&eUsunoles arene %arg 2%"
            stop
        if arg 1 is "setspawna":
            if arg 2 is set:
                if arg 3 is set:
                    if arg 3 is "1":
                        if {areny::*} contains arg 2:
                            set {spawn.1.%arg 2%} to location of player
                            send "&4Ustawiles spawn 1 dla areny %arg 2%"
                    if arg 3 is "2":
                        if {areny::*} contains arg 2:
                        set {spawn.2.%arg 2%} to location of player
                        send "&4Ustawiles spawn 2 dla areny %arg 2%"
                        stop
        if arg 1 is "slobby":
            set {lobby} to location of player
            send "&eUstawiles lobby"
            stop
        if arg 1 is "setspawn":
            set {spawn} to location of player
            send "&eUstawiles spawn"
            stop
        if arg 1 is "join":
            if arg 2 is set:
                if {arena.start.%arg 2%} is not set:
                    if {areny::*} contains arg 2:
                        if {team.1.%arg 2%.count} > 2:
                            add player to {team.1.%arg 2%::*}
                            add 1 to {team.1.%arg 2%.count}
                            add 1 to {gracze.%arg 2%::*}
                            add player to {lgracze.%arg 2%::*}
                            set {gra.%player%} to true
                            teleport player to {lobby}
                            set {inv.%player%} to player's serialized inventory
                            set {helm.%player%} to "%helmet of player%"
                            set {napiersnik.%player%} to "%chestplate of player%"
                            set {spodnie.%player%} to "%legging of player%"
                            set {buty.%player%} to "%boots of player%"
                            set {inv.%player%} to serialized inventory of player
                            clear player's inventory
                            send "&eDolaczyles do kolejki 2vs2!"
                            if {lgracze.%arg 2%::*} = 4:
                                loop {gracze.%arg 2%::*}:
                                    send "&eWalka rozpocznie sie za 10s" to loop-value
                                    wait 5 seconds
                                    send "&eWalka rozpocznie sie za 4s" to loop-value
                                    wait 1 seconds
                                    send "&eWalka rozpocznie sie za 3s" to loop-value        
                                    wait 1 seconds                                    
                                    send "&eWalka rozpocznie sie za 2s" to loop-value        
                                    wait 1 seconds                                    
                                    send "&eWalka rozpocznie sie za 1s" to loop-value        
                                    wait 1 seconds    
                                    loop {team.1.%arg 2%::*}:
                                        teleport loop-value-1 to {spawn.1.%arg 2%}
                                        teleport loop-value-2 to {spawn.1.%arg 2%}
                                    loop {team.2.%arg 2%::*}:
                                        teleport loop-value-1 to {spawn.2.%arg 2%}
                                        teleport loop-value-2 to {spawn.2.%arg 2%}
                                    send "&eWALCZ!!!" to loop-value
                        else:
                            if {team.1.%arg 2%.count} = 2:
                                add player to {team.2.%arg 2%::*}
                                add 1 to {team.2.%arg 2%.count}
                                add 1 to {gracze.%arg 2%::*}
                                add player to {lgracze.%arg 2%::*}
                                set {Gra.%player%} to true
                                teleport player to {lobby}
                                set {inv.%player%} to player's serialized inventory
                                set {helm.%player%} to "%helmet of player%"
                                set {napiersnik.%player%} to "%chestplate of player%"
                                set {spodnie.%player%} to "%legging of player%"
                                set {buty.%player%} to "%boots of player%"
                                set {inv.%player%} to serialized inventory of player
                                clear player's inventory
                                send "&eDolaczyles do kolejki 2vs2!"
                                if {gracze.%arg 2%} = 4:
                                    set {arena.start.%arg 2%} to true
                                    loop {lgracze.%arg 2%::*}:
                                        send "&4Walka rozpocznie sie za 10s" to loop-value
                                        wait 5 seconds
                                        send "&eWalka rozpocznie sie za 4s" to loop-value
                                        wait 1 seconds
                                        send "&eWalka rozpocznie sie za 3s" to loop-value        
                                        wait 1 seconds                                    
                                        send "&eWalka rozpocznie sie za 2s" to loop-value        
                                        wait 1 seconds                                    
                                        send "&eWalka rozpocznie sie za 1s" to loop-value        
                                        wait 1 seconds    
                                        loop {team.1.%arg 2%::*}:
                                            teleport loop-value-1 to {spawn.1.%arg 2%}
                                            teleport loop-value-2 to {spawn.1.%arg 2%}
                                        wait 1 ticks
                                        loop {team.2.%arg 2%::*}:
                                            teleport loop-value-1 to {spawn.2.%arg 2%}
                                            teleport loop-value-2 to {spawn.2.%arg 2%}
                                        send "&eWALCZ!!!" to loop-value
                    else:
                        send "&4Nie ma takiej areny"
                else:
                    send "&4Arena wystartowala"
            else:
                send "&4/2v2 join [nr areny]"
            
        if arg 1 is "leave":
            if arg 2 is set:
                if {gra.%player%} is true:
                    set {gra.%player%} to false
                    remove player from {team.1.%arg 2%::*}
                    remove player from {team.2.%arg 2%::*}
                    remove 1 from {gracze.%arg 2%::*}
                    remove player from {lgracze.%arg 2%::*}
                    teleport player to {spawn}
                    send "&eWyszles z gry"
                    restore inventory of player from {inv.%player%}
                    equip the player with {helm.%player%} parsed as item
                    equip the player with {napiersnik.%player%} parsed as item
                    equip the player with {spodnie.%player%} parsed as item
                    equip the player with {buty.%player%} parsed as item
                    restore inventory of player from {inv.%player%}
                    stop
                else:
                    send "&4Nie jestes podczas gry"
        if arg 1 is "stoparena":
            if arg 2 is set:
                delete {arena.start.%arg 2%}
                loop all players:
                    if {gra.loop-player} is true:
                        set {gra.%loop-player%} to false
                        teleport loop-player to {spawn} 
                send "&4Stop areny %arg 2% udal sie"
                clear {team.1.%arg 2%::*}
                clear {team.2.%arg 2%::*}
on death of player:
    if {gra.%player%} is true:
        set {gra.%player%} to false
        teleport player to {spawn}
        send "&eWyszles z gry"
        restore inventory of player from {inv.%player%}
        equip the player with {helm.%player%} parsed as item
        equip the player with {napiersnik.%player%} parsed as item
        equip the player with {spodnie.%player%} parsed as item
        equip the player with {buty.%player%} parsed as item
        restore inventory of player from {inv.%player%}
        
on damage of player:
    attacker is player:
        if {gra.%victim%} is true:
            if {team.1.1} contains victim:
                if {team.1.1} contains attacker:
                    cancel event
on damage of player:
    attacker is player:
        if {gra.%victim%} is true:
            if {team.2.1} contains victim:
                if {team.2.1} contains attacker:
                    cancel event

 

 

 

Tyle,

Wassup

 

// Edit

 

Dodałem spoiler.

:D  Let's start with MPCForum :D

 

 

 

30/50/69/100/150/200/250...

Opublikowano

Nie uzywaj skryptow, na dobrym serwerze pvp, tym bardziej takiego dlugiego..

Prosty plugin na areny z paczki xVojteq, ma o wiele wiecej funkcji i lepszych.

Jak chcesz moge ci go podeslac.

 

❤ MC.PROPACRAFT.PL 


★ SKRYPTY ★


★ TECHNIK SERWERÓW MINECRAFT ★


✮ Pomogłem? Strzej lajka! ✮


 

  • 2 tygodnie później...
Opublikowano

Nie uzywaj skryptow, na dobrym serwerze pvp, tym bardziej takiego dlugiego..

Prosty plugin na areny z paczki xVojteq, ma o wiele wiecej funkcji i lepszych.

Jak chcesz moge ci go podeslac.

Czy pouczenie to jest pomoc? Co mnie obchodzą pluginy, ja prosiłem tylko o pomoc a nie pytałem się czy plugin lepszy. ZBĘDNYPOST.

Nie, nie musisz mi podeslac, lecz dzięki za ofertę i próbę pomocy ale nie na temat.

Sorry że tak późno odpisuje,

ale masz tu cały skrypt. Powinno działać, jak nie to pisz.

 

 

 

variables:
        {team.1.%text%.count} = 0
        {team.2.%text%.count} = 0

command /2v2 [<text>] [<text>] [<text>]:
    trigger:
        if arg 1 is "create":
            add arg 2 to {areny::*}
            send "&eStworzyles arene %arg 2%"
            stop
        if arg 1 is "delete":
            remove arg 2 from {areny::*}
            send "&eUsunoles arene %arg 2%"
            stop
        if arg 1 is "setspawna":
            if arg 2 is set:
                if arg 3 is set:
                    if arg 3 is "1":
                        if {areny::*} contains arg 2:
                            set {spawn.1.%arg 2%} to location of player
                            send "&4Ustawiles spawn 1 dla areny %arg 2%"
                    if arg 3 is "2":
                        if {areny::*} contains arg 2:
                        set {spawn.2.%arg 2%} to location of player
                        send "&4Ustawiles spawn 2 dla areny %arg 2%"
                        stop
        if arg 1 is "slobby":
            set {lobby} to location of player
            send "&eUstawiles lobby"
            stop
        if arg 1 is "setspawn":
            set {spawn} to location of player
            send "&eUstawiles spawn"
            stop
        if arg 1 is "join":
            if arg 2 is set:
                if {arena.start.%arg 2%} is not set:
                    if {areny::*} contains arg 2:
                        if {team.1.%arg 2%.count} > 2:
                            add player to {team.1.%arg 2%::*}
                            add 1 to {team.1.%arg 2%.count}
                            add 1 to {gracze.%arg 2%::*}
                            add player to {lgracze.%arg 2%::*}
                            set {gra.%player%} to true
                            teleport player to {lobby}
                            set {inv.%player%} to player's serialized inventory
                            set {helm.%player%} to "%helmet of player%"
                            set {napiersnik.%player%} to "%chestplate of player%"
                            set {spodnie.%player%} to "%legging of player%"
                            set {buty.%player%} to "%boots of player%"
                            set {inv.%player%} to serialized inventory of player
                            clear player's inventory
                            send "&eDolaczyles do kolejki 2vs2!"
                            if {lgracze.%arg 2%::*} = 4:
                                loop {gracze.%arg 2%::*}:
                                    send "&eWalka rozpocznie sie za 10s" to loop-value
                                    wait 5 seconds
                                    send "&eWalka rozpocznie sie za 4s" to loop-value
                                    wait 1 seconds
                                    send "&eWalka rozpocznie sie za 3s" to loop-value        
                                    wait 1 seconds                                    
                                    send "&eWalka rozpocznie sie za 2s" to loop-value        
                                    wait 1 seconds                                    
                                    send "&eWalka rozpocznie sie za 1s" to loop-value        
                                    wait 1 seconds    
                                    loop {team.1.%arg 2%::*}:
                                        teleport loop-value-1 to {spawn.1.%arg 2%}
                                        teleport loop-value-2 to {spawn.1.%arg 2%}
                                    loop {team.2.%arg 2%::*}:
                                        teleport loop-value-1 to {spawn.2.%arg 2%}
                                        teleport loop-value-2 to {spawn.2.%arg 2%}
                                    send "&eWALCZ!!!" to loop-value
                        else:
                            if {team.1.%arg 2%.count} = 2:
                                add player to {team.2.%arg 2%::*}
                                add 1 to {team.2.%arg 2%.count}
                                add 1 to {gracze.%arg 2%::*}
                                add player to {lgracze.%arg 2%::*}
                                set {Gra.%player%} to true
                                teleport player to {lobby}
                                set {inv.%player%} to player's serialized inventory
                                set {helm.%player%} to "%helmet of player%"
                                set {napiersnik.%player%} to "%chestplate of player%"
                                set {spodnie.%player%} to "%legging of player%"
                                set {buty.%player%} to "%boots of player%"
                                set {inv.%player%} to serialized inventory of player
                                clear player's inventory
                                send "&eDolaczyles do kolejki 2vs2!"
                                if {gracze.%arg 2%} = 4:
                                    set {arena.start.%arg 2%} to true
                                    loop {lgracze.%arg 2%::*}:
                                        send "&4Walka rozpocznie sie za 10s" to loop-value
                                        wait 5 seconds
                                        send "&eWalka rozpocznie sie za 4s" to loop-value
                                        wait 1 seconds
                                        send "&eWalka rozpocznie sie za 3s" to loop-value        
                                        wait 1 seconds                                    
                                        send "&eWalka rozpocznie sie za 2s" to loop-value        
                                        wait 1 seconds                                    
                                        send "&eWalka rozpocznie sie za 1s" to loop-value        
                                        wait 1 seconds    
                                        loop {team.1.%arg 2%::*}:
                                            teleport loop-value-1 to {spawn.1.%arg 2%}
                                            teleport loop-value-2 to {spawn.1.%arg 2%}
                                        wait 1 ticks
                                        loop {team.2.%arg 2%::*}:
                                            teleport loop-value-1 to {spawn.2.%arg 2%}
                                            teleport loop-value-2 to {spawn.2.%arg 2%}
                                        send "&eWALCZ!!!" to loop-value
                    else:
                        send "&4Nie ma takiej areny"
                else:
                    send "&4Arena wystartowala"
            else:
                send "&4/2v2 join [nr areny]"
            
        if arg 1 is "leave":
            if arg 2 is set:
                if {gra.%player%} is true:
                    set {gra.%player%} to false
                    remove player from {team.1.%arg 2%::*}
                    remove player from {team.2.%arg 2%::*}
                    remove 1 from {gracze.%arg 2%::*}
                    remove player from {lgracze.%arg 2%::*}
                    teleport player to {spawn}
                    send "&eWyszles z gry"
                    restore inventory of player from {inv.%player%}
                    equip the player with {helm.%player%} parsed as item
                    equip the player with {napiersnik.%player%} parsed as item
                    equip the player with {spodnie.%player%} parsed as item
                    equip the player with {buty.%player%} parsed as item
                    restore inventory of player from {inv.%player%}
                    stop
                else:
                    send "&4Nie jestes podczas gry"
        if arg 1 is "stoparena":
            if arg 2 is set:
                delete {arena.start.%arg 2%}
                loop all players:
                    if {gra.loop-player} is true:
                        set {gra.%loop-player%} to false
                        teleport loop-player to {spawn} 
                send "&4Stop areny %arg 2% udal sie"
                clear {team.1.%arg 2%::*}
                clear {team.2.%arg 2%::*}
on death of player:
    if {gra.%player%} is true:
        set {gra.%player%} to false
        teleport player to {spawn}
        send "&eWyszles z gry"
        restore inventory of player from {inv.%player%}
        equip the player with {helm.%player%} parsed as item
        equip the player with {napiersnik.%player%} parsed as item
        equip the player with {spodnie.%player%} parsed as item
        equip the player with {buty.%player%} parsed as item
        restore inventory of player from {inv.%player%}
        
on damage of player:
    attacker is player:
        if {gra.%victim%} is true:
            if {team.1.1} contains victim:
                if {team.1.1} contains attacker:
                    cancel event
on damage of player:
    attacker is player:
        if {gra.%victim%} is true:
            if {team.2.1} contains victim:
                if {team.2.1} contains attacker:
                    cancel event

 

 

 

Tyle,

Wassup

 

// Edit

 

Dodałem spoiler.

Dalej nic nie wyskakuje po wpisaniu /2v2 join nazwa

4Headzik

Opublikowano

@renexo

 

W takim razie nie wiem co jest grane. Spróbuj skontaktować się z twórcą tego skryptu.

:D  Let's start with MPCForum :D

 

 

 

30/50/69/100/150/200/250...

Opublikowano

Proszę o zamknięcie tematu, ponieważ nie ma sensu drążyć tego problemu skoro mam błąd z pluginem najprawdopodobniej :/

4Headzik

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...