Ir para conteúdo

Featured Replies

Postado

As i cant find solution of a problem i have that monsters / npc stands always face to north so i had idea to do the tile that switch their lookdir but i need some help how to do it / edit im fresh in making ots so any help will be awesome; P

But all my tries ends in errors at console; x No idea shall it be aid or uid? Maybe thats what im doing wrong; /

 

Found that 

getPlayerLookDir = getCreatureLookDirection

getPlayerLookDirection = getCreatureLookDirection

doCreatureSetLookDir = doCreatureSetLookDirection

getPlayerLookPos = getCreatureLookPosition



getPosByDir = getPositionByDirection

And thats my trying to make it work:

local dirs = {"south", "east", "north", "west"}

local tile.actionid = {2501, 2502, 2503, 2504}

local nextDir = dirs[i + 1]



function onStepIn (cid, creature, direction, aid)



if tile.actionid == 2501 and

if(creature:isNPC)|| if(creature:isMonster) then

getPosByDir == "north" then

doCreatureSetLookDirection

== "south"



return true

end

and other try:

function getPositionByDirection(cid, position, direction, size)

    local actionid = {2501, 2502, 2503, 2504}

    local n = size or 1

    local table_dirs = {

["south"] == position.y = position.y + n},

["north"] == position.y = position.y - n},

["east"] == position.x = position.x + n},

["west"] == position.x = position.x - n}







function onStepIn (cid, creature, direction, aid)



if actionid == 2501 then

doCreatureSetLookDir == south

end





return true

else



getPosByDir == north then

doCreatureSetLookDir == south

end





return true

end

I know for sure i do something wrong but i just need some tip / help cuz as i said im fresh and need to learn some things; P

 

Even if u know / make any script ready (what will be great) will be nice to explain working of it etc.

 

I forgot to mention it, TFS 0.4 rev 3777,
source

Code:
https://tibiaking.com/forums/topic/76241-dbo-rox-v2-860-open-source99-sem-bugs/




BTW i tried many scripts etc and this one work w / o console error

Code:
local dirs = {"south", "east", "north", "west"}
local aid = {2501, 2502, 2503, 2504}


function onStepIn (cid, creature, direction, aid)

local tile = Tile(creature:getDirection()):getGround()
   if ground.aid == 2501 then
    doCreatureSetLookDirection = SOUTH
    return true
   
    else
doCreatureSetLookDirection = SOUTH
    return true
    end
    end

But still its not this one, cuz nothing happens

tried to make 0 than south cuz thats what i have at lib's, still nothing, also tried to make
position.y + 1],

Any tips / ideas? As i said im fresh and trying to learn so even small tip might be helpfull and  
once again sry i broke the rules

Editado por kobrapl (veja o histórico de edições)

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

Informação Importante

Confirmação de Termo