As i cant find solution of a problem i have that monsters/npc stands always face to north so i had idea to do 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
And thats my trying to make it work:
and other try:
I know for sure i does 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 ready script (what will be great) will be nice to explain working of it etc.
//Edit Client 8,6 TFS 0,4 rev 3777
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
Code:
getPlayerLookDir = getCreatureLookDirection
getPlayerLookDirection = getCreatureLookDirection
doCreatureSetLookDir = doCreatureSetLookDirection
getPlayerLookPos = getCreatureLookPosition
getPosByDir = getPositionByDirection
And thats my trying to make it work:
Code:
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:
Code:
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 does 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 ready script (what will be great) will be nice to explain working of it etc.
//Edit Client 8,6 TFS 0,4 rev 3777
Last edited: