1 hora atrás, xugrude456 disse:
function onThink(cid, interval)
if isPlayer(cid) then
if(getTilePzInfo(getCreaturePosition(cid))) then
doRemoveCondition(cid, CONDITION_INFIGHT)
end
end
end
É em creaturescript.
info
Group: Visconde
Joined: 26/08/10
Posts: 431
Reputation: +60
Gender: Masculino
Tibia Character: Gabriel Rookgaardian

1 hora atrás, xugrude456 disse:
function onThink(cid, interval)
if isPlayer(cid) then
if(getTilePzInfo(getCreaturePosition(cid))) then
doRemoveCondition(cid, CONDITION_INFIGHT)
end
end
end
É em creaturescript.
info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night

Ao entrar em PZ tira o battle? Recomendo mais alterar nas Source. Não compesa usar o onThink não
info
Group: Campones
Joined: 14/01/19
Posts: 36
Reputation: +4

2 horas atrás, gabriel28 disse:function onThink(cid, interval) if isPlayer(cid) then if(getTilePzInfo(getCreaturePosition(cid))) then doRemoveCondition(cid, CONDITION_INFIGHT) end end endÉ em creaturescript.
e so addicionar ? so isso la e a tag?
info
Group: Artesão
Joined: 05/06/15
Posts: 119
Reputation: +31
Gender: Outro

4 horas atrás, xugrude456 disse:
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))
info
Group: Campones
Joined: 14/01/19
Posts: 36
Reputation: +4

1 hora atrás, Yan Liima disse:Ao entrar em PZ tira o battle? Recomendo mais alterar nas Source. Não compesa usar o onThink não
pq não compensa poderia me explica melhor
info
Group: Campones
Joined: 14/01/19
Posts: 36
Reputation: +4

3 minutos atrás, Dragon Ball Hiper disse: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))
não funciono o script do global events, fico com battle no pz
info
Group: Artesão
Joined: 05/06/15
Posts: 119
Reputation: +31
Gender: Outro

4 minutos atrás, xugrude456 disse:não funciono o script do global events, fico com battle no pz
Impossível bro :c
Eu mesmo usei muito em 0.4 entre outros '
a função
CONDITION_INFIGHT
remove assim que acessa a zona ..
-
o segundo passo deve ajudar você .
ou veja atentamente o primeiro passo !
info
Group: Campones
Joined: 14/01/19
Posts: 36
Reputation: +4

testei aki, funcionou obrigado, tinha dado um erro pq tinha um ponto de interogação
info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night

info
Group: Campones
Joined: 14/01/19
Posts: 36
Reputation: +4
alguem tem script para 0.4.0.0 de tira battle pra ajuda