crie um arquivo em globalevents com nome removerbatle.lua
local function removeBattle(cid)
doRemoveCondition(cid, CONDITION_INFIGHT)
return false
end
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid))
if getTilePzInfo(pos) == true then
removeBattle(cid)
end
end
return true
end
tag xml
1000 é equivalente a 1 segundo em servidores milesegundos , caso contrário você deverá usar "1"
<globalevent name="removerbatle" interval="1000" event="script" value="removerbatle.lua"/>
- Você pode retirar pela source também (o correto é por la.)
caso queira.
em
protocolgame.cpp
Procura por
if(player->hasCondition(CONDITION_INFIGHT))
Troque por:
if(player->getZone() != ZONE_PROTECTION && player->hasCondition(CONDITION_INFIGHT))