ZE

Ajuda Com Onattack

Por zeloooko, 10 de jan. de 2011 em Archived

3
866
zeloookoZ
10 de janeiro de 2011 às 20:09

to com um problema chatin pakas

bom e o seguinte to tentando fase que caso o mosnter receba a condition_drunk ele nao hit e nao atacke ateh kba a condition to tentando asim + sem resultados

function onAttack(cid, target)
      local pos = getCreaturePosition(cid)
    if getCreatureCondition(cid, CONDITION_DRUNK) == TRUE then
    doSendAnimatedText(pos, 'Fail', 215)     
    end            

return TRUE
end

 

se alguem puder me ajudar

Obrg

KydraiK
10 de janeiro de 2011 às 21:08

Tenta colocar um "return false":

function onAttack(cid, target)
    local pos = getCreaturePosition(cid)
    if getCreatureCondition(cid, CONDITION_DRUNK) == TRUE then
           doSendAnimatedText(pos, 'Fail', 215)
           return FALSE
    end
    return TRUE
end

Se não der posta todos os scripts.

Editado Janeiro 10 por kydrai

zeloookoZ
10 de janeiro de 2011 às 21:27

function onAttack(cid, target)
    local pos = getCreaturePosition(cid)
    if getCreatureCondition(cid, CONDITION_DRUNK) == TRUE then
           doSendAnimatedText(pos, 'Fail', 215)
           return FALSE
    end
    return TRUE
end

 

Jah tentei assim ele ateh nao atack so q ele tbm nao volta a atacar depois que acaba a condition

=X

 

o script e uma spell normal q add a condition no target ( + especificamente so funciona em monsters )

e as tag no moster xml q add o evento nos monsters