• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua [Solved] NPC turn East

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
I trying to do something like this:

Code:
function onThink()
    local cid = getNpcCid()
    local npc = Creature(cid)
    local npcpos = {x = 32352, y = 32226, z = 7}
 
    local posplayer = {x = 32354, y = 32226, z = 7} -- 32354, 32226, 7
     if ppos.x == posplayer.x and ppos.y == posplayer.y then
    selfTurn(EAST)
    else
    selfTurn(SOUTH)
    end
end



When player is in X position, the npc turn East, someone can help? Thanks
 
Last edited by a moderator:
Back
Top