Postado Junho 18, 2017 8 anos Autor 3 minutos atrás, Way20 disse: Foi outro erro que cometi, editei o post anterior, tenta novamente. Agora foi! , mas uma perguntinha isso irá consumir muito "Cpu" causando Muito lag? Meu servidor https://www.facebook.com/Heavennoobwar
Postado Junho 18, 2017 8 anos 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 Junho 18, 2017 8 anos 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 Junho 18, 2017 8 anos por helix758 (veja o histórico de edições) Meu servidor https://www.facebook.com/Heavennoobwar
Postado Junho 18, 2017 8 anos 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 Junho 18, 2017 8 anos 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 Junho 18, 2017 8 anos 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 ? Meu servidor https://www.facebook.com/Heavennoobwar
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.