Ir para conteúdo

Featured Replies

  • Respostas 40
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Não tem necessidade de fazer isso, pode ser feito um simples script para remover o pz caso o player esteja em protect zone, acredito que isso deva resolver seu problema. Posso fazer o script pra você,

  • Não sei ao certo se funciona, tente mudar esta parte no config.lua "allowFightback" pra "false", veja se resolve alguma coisa...

  • --[[ Capture The Flag System Author: Maxwell Denisson(MaXwEllDeN) Version: 2.0 Contact: [email protected] ]] local CTF = CTF_LIB function onStatsChange(cid, attacker, type, combat,

Posted Images

Postado
Agora, helix758 disse:

Agora foi! , mas uma perguntinha isso irá consumir muito "Cpu" causando Muito lag? 

Acredito que não, mas por precaução deixa o tempo de execução do script alto, entre 10~15 segundos. Se preferir também posso fazer ele tirar o pz somente de quem está no evento, da maneira como está ele está removendo de todos os players online. (quem estiver pz em proctect zone ele remove).

 

 

 

Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito.

                                                                                                                                                                                                                                        Aristóteles 

Postado
  • Autor
10 minutos atrás, Way20 disse:

Acredito que não, mas por precaução deixa o tempo de execução do script alto, entre 10~15 segundos. Se preferir também posso fazer ele tirar o pz somente de quem está no evento, da maneira como está ele está removendo de todos os players online. (quem estiver pz em proctect zone ele remove).

Hé pode ser, Seria legal e também poderia por pra remover o Pk ? 

e uma outra duvida o Cpu so conta se o player estiver no protection zone, OU... Somente aqueles que estã com a batle vermelha e estão perdendo Pz ?? 

 

Conta todos no protection zone, Ou todos batle vermelha perdendo dentro do protection ? 

se poder fazer pra remover somente no evento seria legal

Editado por helix758 (veja o histórico de edições)

Postado
15 minutos atrás, helix758 disse:

Hé pode ser, Seria legal e também poderia por pra remover o Pk ? 

e uma outra duvida o Cpu so conta se o player estiver no protection zone, OU... Somente aqueles que estã com a batle vermelha e estão perdendo Pz ?? 

 

Conta todos no protection zone, Ou todos batle vermelha perdendo dentro do protection ? 

Ele faz 1 verificação em todos players online que estão em protect zone, verifica se está com pz, se tiver remove, se não tiver, nada é feito.

--<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML

function onThink(interval, lastExecution, thinkInterval)
    local players = getPlayersOnline()
    for _, pid in ipairs(players) do
		if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) and getPlayerStorageValue(cid, 16700) ~= -1 then
			doPlayerSetPzLocked(pid, false)
			doCreatureSetSkullType(pid, 0)
		end
	end
	return true
end
--[[
    Capture The Flag System
    Author: Maxwell Denisson(MaXwEllDeN)
    Version: 2.0
    Contact: maxwellmda@gmail.com
]]

local CTF = CTF_LIB
function onStatsChange(cid, attacker, type, combat, value)
    if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then
        if getPlayerStorageValue(cid, 16702) ~= -1 then
            CTF.returnFlag(cid, 1)
        end
		if isPlayerPzLocked(cid) then
			doPlayerSetPzLocked(cid, false)
			doCreatureSetSkullType(cid, 0)
		end
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
        return false
    end
    return true
end
function onLogout(cid)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        CTF.removePlayer(cid)
    end
   return true
end
function onCombat(cid, target)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
            return false
        end
    end
    return true
end
function onAttack(cid, target)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
            return false
        end
    end
    return true
end

 

Editado por Way20 (veja o histórico de edições)

 

 

 

Nós somos aquilo que fazemos repetidamente. Excelência, não é um modo de agir, mas um hábito.

                                                                                                                                                                                                                                        Aristóteles 

Postado
  • Autor
3 minutos atrás, Way20 disse:

Ele faz 1 verificação em todos players online que estão em protect zone, verifica se está com pz, se tiver remove, se não tiver, nada é feito.


--<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML

function onThink(interval, lastExecution, thinkInterval)
    local players = getPlayersOnline()
    for _, pid in ipairs(players) do
		if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) then
			doPlayerSetPzLocked(pid, false)
			doCreatureSetSkullType(pid, 0)
		end
	end
	return true
end

--[[
    Capture The Flag System
    Author: Maxwell Denisson(MaXwEllDeN)
    Version: 2.0
    Contact: maxwellmda@gmail.com
]]

local CTF = CTF_LIB
function onStatsChange(cid, attacker, type, combat, value)
    if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then
        if getPlayerStorageValue(cid, 16702) ~= -1 then
            CTF.returnFlag(cid, 1)
        end
		if isPlayerPzLocked(cid) then
			doPlayerSetPzLocked(cid, false)
			doCreatureSetSkullType(cid, 0)
		end
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
        return false
    end
    return true
end
function onLogout(cid)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        CTF.removePlayer(cid)
    end
   return true
end
function onCombat(cid, target)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
            return false
        end
    end
    return true
end
function onAttack(cid, target)
    if getPlayerStorageValue(cid, 16700) ~= -1 then
        if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then
            return false
        end
    end
    return true
end

 

So irá funcionar dentro do evento ?

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo