Skocz do zawartości
  • 0

AntyLogout - przerobienie


mateuszeqq13212
 Udostępnij

Pytanie

Cześć przerobi mi ktos ten skrypt? Bo jak kogos uderze to spami np. uderze 2 razy to 2 razi pisze. Prosze o przeprawe zeby jak uderzymy to raz napisalo ze jestes podczas walki nie logaj..

Kod: 

Spoiler

options:

        logo:&8[&6AntyLogout&8]
        ochrona:1 minute
        walkatxt:&4Jestes w walce, nie logaj !
        koniecwalki:&aNie jestes juz w walce, mozesz logac !
        czaswalki:20
        txtlogout:&aGracz &c%player% &awylogowal sie podczas walki !

on first join:
        wait 10 second
        set {ochrona.%player%} to true
        send "{@logo} &aJestes chroniony przez {@ochrona}"
        wait {@ochrona}
        set {ochrona.%player%} to false

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%victim%} is true:
                        set {walka.%victim%} to {@czaswalki}
                        stop
                send "{@logo} {@walkatxt}" to victim
                set {inbattle.%victim%} to true
                set {walka.%victim%} to {@czaswalki}
                while {walka.%victim%} is more than 0:
                        {walka.%victim%} is not set:
                                stop
                        subtract 1 from {walka.%victim%}
                        wait 1 second
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                send "{@logo} {@koniecwalki}" to victim

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%attacker%} is true:
                        set {walka.%attacker%} to {@czaswalki}
                        send "{@logo} {@walkatxt}" to attacker
                        stop
                send "{@logo} {@walkatxt}" to attacker
                set {inbattle.%attacker%} to true
                set {walka.%attacker%} to {@czaswalki}
                while {walka.%attacker%} is more than 0:
                        {walka.%attacker%} is not set:
                                stop
                        subtract 1 from {walka.%attacker%}
                        wait 1 second
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}
                send "{@logo} {@koniecwalki}" to attacker

on quit:
        if {inbattle.%player%} is true:
                kill player
                broadcast "{@logo} {@txtlogout}"
                delete {inbattle.%player%}
                delete {walka.%player%}

on death:
        if {inbattle.%player%} is true:
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}

on join:
        {inbattle.%player%} is set:
                delete {inbattle.%player%}
        {walka.%player%} is set:
                delete {walka.%player%}

 

Edytowane przez mateuszeqq13212
Odnośnik do komentarza
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Wrzucam Ci mój stary skrypt. Przerób go sobie. Działa tak jak opisałeś.

on load:
	set {_sk} to script
	if folder "plugins/Skript/scripts/%{_sk}%" doesn't exists:
		create folder "plugins/Skript/scripts/%{_sk}%"
	if file "plugins/Skript/scripts/%{_sk}%/config.yml" doesn't exists:
		create file "plugins/Skript/scripts/%{_sk}%/config.yml"
		set "script.skapi.enabled" to "true" in yaml file "plugins/Skript/scripts/%{_sk}%/config.yml"
	send "[%{_sk}%] &aSkrypt pomylsnie uruchomiony." to console

on damage:
	if attacker is a player:
		if victim is a player:
			set {antylogout::time::%attacker%} to 30
			set {antylogout::time::%victim%} to 30
			if {antylogout::relog::%attacker%} is not set:
				set {antylogout::relog::%attacker%} to false
				execute console command "pvptimer %attacker%"
				send " &8» &cJestes w trakcie walki z graczem &b%victim%&c." to attacker
				send " &8» &cNie wylogowywuj sie przez &e30 sekund&c." to attacker
			if {antylogout::relog::%victim%} is not set:
				set {antylogout::relog::%victim%} to false
				execute console command "pvptimer %victim%"
				send " &8» &cJestes w trakcie walki z graczem &b%attacker%&c." to victim
				send " &8» &cNie wylogowywuj sie przez &e30 sekund&c." to victim
				
command /core:pvptimer [<player>]:
	aliases: pvptimer
	executable by: console
	trigger:
		while {antylogout::time::%arg 1%} is set:
			wait 1 second
			if {antylogout::time::%arg 1%} is bigger than 0:
				remove 1 from {antylogout::time::%arg 1%}
				if {antylogout::time::%arg 1%} is 20:
					send " &8» &cZa &b20 sekund &cbedziesz mogl sie wylogowac." to arg 1
				if {antylogout::time::%arg 1%} is 10:
					send " &8» &cZa &b10 sekund &cbedziesz mogl sie wylogowac." to arg 1
			if {antylogout::time::%arg 1%} is 0:
				send " &8» &aNie jestes juz w trakcie walki." to arg 1
				send " &8» &aMozesz sie bezpiecznie wylogowac." to arg 1
				delete {antylogout::time::%arg 1%}
				delete {antylogout::relog::%arg 1%}
				stop
				
on quit:
	if {antylogout::relog::%player%} is false:
		delete {antylogout::time::%player%}
		delete {antylogout::relog::%player%}
		set {_loc} to location of player
		loop all items in player's inventory:
			drop loop-item at {_loc}
		kill player
		set {antylogout::killed::%player%} to true
		broadcast " &8» &cGracz &b%player% &cwylogowal sie podczas walki!"

on join:
	if {antylogout::killed::%player%} is true:
		wait 2 seconds
		send " &8» &cWylogowales sie podczas walki." to player
		send " &8» &cTwoje itemy zostaly wyrzucone na ziemie." to player
		delete {antylogout::killed::%player%}

#on walk on red wool:
#	if {antylogout::relog::%player%} is false:
#		send "%region at player%" to player
#		set {_loc} to location of event-block
#		remove 1 from y-coord of {_loc}
#		if block at {_loc} is packed ice:
#			cancel event
#			push the player backwards at speed 1
#			send " &8» &cJestes w trakcie walki. Nie mozesz wejsc na teren spawnu." to player
#			send " &8» &cWalka zakonczy sie za &b%{antylogout::time::%player%}% sec&c." to player

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
Spoiler

 

options:

        logo:&8[&6AntyLogout&8]
        ochrona:1 minute
        walkatxt:&4Jestes w walce, nie logaj !
        koniecwalki:&aNie jestes juz w walce, mozesz logac !
        czaswalki:20
        txtlogout:&aGracz &c%player% &awylogowal sie podczas walki !

on first join:
        wait 10 second
        set {ochrona.%player%} to true
        send "{@logo} &aJestes chroniony przez {@ochrona}"
        wait {@ochrona}
        set {ochrona.%player%} to false

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%victim%} is true:
                        set {walka.%victim%} to {@czaswalki}
                        stop
                send "{@logo} {@walkatxt}" to victim
                set {inbattle.%victim%} to false
                set {walka.%victim%} to {@czaswalki}
                while {walka.%victim%} is more than 0:
                        {walka.%victim%} is not set:
                                stop
                        subtract 1 from {walka.%victim%}
                        wait 1 second
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                send "{@logo} {@koniecwalki}" to victim

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%attacker%} is true:
                        set {walka.%attacker%} to {@czaswalki}
                        send "{@logo} {@walkatxt}" to attacker
                        stop
                send "{@logo} {@walkatxt}" to attacker
                set {inbattle.%attacker%} to false
                set {walka.%attacker%} to {@czaswalki}
                while {walka.%attacker%} is more than 0:
                        {walka.%attacker%} is not set:
                                stop
                        subtract 1 from {walka.%attacker%}
                        wait 1 second
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}
                send "{@logo} {@koniecwalki}" to attacker

on quit:
        if {inbattle.%player%} is true:
                kill player
                broadcast "{@logo} {@txtlogout}"
                delete {inbattle.%player%}
                delete {walka.%player%}

on death:
        if {inbattle.%player%} is true:
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}

on join:
        {inbattle.%player%} is set:
                delete {inbattle.%player%}
        {walka.%player%} is set:
                delete {walka.%player%}

 

Zobacz czy to działa

Edytowane przez xxdamixx
Błąd
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
3 minuty temu, xxdamixx napisał:
Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! Ukryj zawartość

 

options:

        logo:&8[&6AntyLogout&8]
        ochrona:1 minute
        walkatxt:&4Jestes w walce, nie logaj !
        koniecwalki:&aNie jestes juz w walce, mozesz logac !
        czaswalki:20
        txtlogout:&aGracz &c%player% &awylogowal sie podczas walki !

on first join:
        wait 10 second
        set {ochrona.%player%} to true
        send "{@logo} &aJestes chroniony przez {@ochrona}"
        wait {@ochrona}
        set {ochrona.%player%} to false

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%victim%} is true:
                        set {walka.%victim%} to {@czaswalki}
                        stop
                send "{@logo} {@walkatxt}" to victim
                set {inbattle.%victim%} to false
                set {walka.%victim%} to {@czaswalki}
                while {walka.%victim%} is more than 0:
                        {walka.%victim%} is not set:
                                stop
                        subtract 1 from {walka.%victim%}
                        wait 1 second
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                send "{@logo} {@koniecwalki}" to victim

on damage:
        victim is player
        attacker is player
        if {ochrona.%victim%} is true:
                cancel event
        if {ochrona.%attacker%} is true:
                cancel event
        else:
                if {inbattle.%attacker%} is true:
                        set {walka.%attacker%} to {@czaswalki}
                        send "{@logo} {@walkatxt}" to attacker
                        stop
                send "{@logo} {@walkatxt}" to attacker
                set {inbattle.%attacker%} to false
                set {walka.%attacker%} to {@czaswalki}
                while {walka.%attacker%} is more than 0:
                        {walka.%attacker%} is not set:
                                stop
                        subtract 1 from {walka.%attacker%}
                        wait 1 second
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}
                send "{@logo} {@koniecwalki}" to attacker

on quit:
        if {inbattle.%player%} is true:
                kill player
                broadcast "{@logo} {@txtlogout}"
                delete {inbattle.%player%}
                delete {walka.%player%}

on death:
        if {inbattle.%player%} is true:
                delete {inbattle.%victim%}
                delete {walka.%victim%}
                delete {inbattle.%attacker%}
                delete {walka.%attacker%}

on join:
        {inbattle.%player%} is set:
                delete {inbattle.%player%}
        {walka.%player%} is set:
                delete {walka.%player%}

 

Zobacz czy to działa

Dalej spami. Gdy zakoncze walke i zaczne

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...