Ir para conteúdo

Featured Replies

Postado

Olé Galerinha do TK ! Bom vim pedir uma ajudinha vocês ,pois estou com um script de spell chamada Kawarimi no jutsu Attack ( Naruto Tibia ) .

Bom para que o script funcione totalmente é necessário um creaturescript , Porem esse mesmo creaturescript está causando um divergência sei la algo do tipo pois quando eu adiciono o script ele roda normalmente sem nenhum erro no distro porem quando os player targetam uns aos outros não tira dano nenhum tipo você fica targetado abre pk porem não tira Dano !Alguem ai poderia me ajudar Por favor !

Ai o creaturescript

Kawarimiattack.lua

  • 4 weeks later...
Postado

testa assim

function onAttack(cid, target)
    if isPlayer(target) and getPlayerStorageValue(target, 14680) == 1 then
        doSendMagicEffect(getCreaturePosition(cid), 242)
        doCreatureAddHealth(cid, -getPlayerLevel(target))
        pos = getPlayerPosition(target)
        doSendMagicEffect(pos, 242)
        doSendAnimatedText(pos, "Kawarimi Attack!", math.random(1,255))
    local safe = {
                {x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y+2,pos.y+2), z=pos.z},
                {x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
                {x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
                {x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y+2,pos.y+2), z=pos.z}
                 }
        for i = 1, #safe do
            rand = math.random(1, #safe)
                if(queryTileAddThing(target, safe[rand]) == 1) then
                    doTeleportThing(target, safe[rand], true)
                end
        end
        setPlayerStorageValue(target, 14680, 0)
        doSendMagicEffect(getCreaturePosition(target), 10)
else
return true
    end
end

 

Postado
  • Autor

Opa Vlw 

18 horas atrás, esnio12 disse:

testa assim


function onAttack(cid, target)
    if isPlayer(target) and getPlayerStorageValue(target, 14680) == 1 then
        doSendMagicEffect(getCreaturePosition(cid), 242)
        doCreatureAddHealth(cid, -getPlayerLevel(target))
        pos = getPlayerPosition(target)
        doSendMagicEffect(pos, 242)
        doSendAnimatedText(pos, "Kawarimi Attack!", math.random(1,255))
    local safe = {
                {x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y+2,pos.y+2), z=pos.z},
                {x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
                {x=math.random(pos.x+2,pos.x+2), y=math.random(pos.y-2,pos.y-2), z=pos.z},
                {x=math.random(pos.x-2,pos.x-2), y=math.random(pos.y+2,pos.y+2), z=pos.z}
                 }
        for i = 1, #safe do
            rand = math.random(1, #safe)
                if(queryTileAddThing(target, safe[rand]) == 1) then
                    doTeleportThing(target, safe[rand], true)
                end
        end
        setPlayerStorageValue(target, 14680, 0)
        doSendMagicEffect(getCreaturePosition(target), 10)
else
return true
    end
end

 

Opa vlws vou testar aqui se funcionar aviso !mais ja dei seu REP + só por ter me ajudado ! Obrigado

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.6k

Informação Importante

Confirmação de Termo