Jump to content

Recommended Posts

ADICIONE ESSAS DUAS FUNÇÕES NO SEU ARQUIVO SOME FUNCTIONS, CASO SEU SERVIDOR NÃO TENHA ESSE ARQUIVO, ADICIONE EM 050-function AMBAS OS ARQUIVOS FICAM NA PASTA LIB

 

Spoiler

function getDirectionToWalk(p1, pos2)
    local dir = NORTH
    local pos1 = getCreaturePosition(p1)
    if(pos1.x > pos2.x) then
        dir = WEST
        if(pos1.y > pos2.y) then
            dir = NORTHWEST
        elseif(pos1.y < pos2.y) then
            dir = SOUTHWEST
        end
    elseif(pos1.x < pos2.x) then
        dir = EAST
        if(pos1.y > pos2.y) then
            dir = NORTHEAST
        elseif(pos1.y < pos2.y) then
            dir = SOUTHEAST
        end
    else
        if(pos1.y > pos2.y) then
            dir = NORTH
        elseif(pos1.y < pos2.y) then
            dir = SOUTH
        end
    end
    return dir
end

 

 function getNextStepDelay(cid, dir)
            return tonumber(398)
    end       

 

Edited by Jair Kevick
Link to comment
https://xtibia.com/forum/topic/246973-lua-getdirectiontowalk/
Share on other sites

1 minuto atrás, WellVini disse:

pode dizer especificamente pra que elas servem irmao?

 

a maioria do pessoal hoje em dia quer adaptar uma source em PDA e essa função é exatamente utilizada no ORDER de tais servidores ^_^ possibilitando mover o seu summon 

Edited by Jair Kevick
33 minutos atrás, Jair Kevick disse:

 

a maioria do pessoal hoje em dia quer adaptar uma source em PDA e essa função é exatamente utilizada no ORDER de tais servidores ^_^ possibilitando mover o seu summon 

Eu coloquei ela esses dias no meu kk pensei em postar. ^ ^ 

Agora estou precisando da selfAttackCreature :/ 

Boa iniciativa! ^ ^ 

×
×
  • Create New...