• 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!

Solved Furniture NPC problems

Exoltes

Novia OTserv Developer
Joined
Jul 2, 2009
Messages
563
Reaction score
47
Location
Belgium
I'm working on a 8.54 Open Tibia Server using The Forgotten Server - Version 0.2.7 (Mystic Spirit).

And i ran into the following problem: my npc's keep walking over every piece of furniture I put in their shops houses what so ever. I would love to see them blocked by it the same way as lesser creatures.

So if anyone has any idea how to do this, I would be very grateful if you'd share it with me :)

Thanks in advance.
 
If those tiles are not reachable for players you could add "nothing special" (blocking items) on them.
 
As far as I know there's no solution to this. Either you take away the npc's autowalk, or as Summ said. Or possibly you can create a specific tile where you need a certain vocation to walk on?
 
Last edited:
Well I still think that it's possible to write a script which makes it impossible for NPC's to walk on items with height in their settings like for example furniture.

Just on how to make it my knowledge doesn't extend me.
 
Well, dind't think of them. Can't you give the boxes an unique ID, or can't you move them in game then? Maybe no one can walk on them then, haven't been playing OT for several years, just started again with a homepage..
 
well the thing is everyone can move them, you can even carry them etc. That's why it will be quite impossible to fix it with this solution.
 
Well, thats true, I thought of the boxes already existing in the map. Not all boxes, if you want all kinds of boxes it would be quite impossible that way.
 
How much different furniture items are there around the npc? You could add them with itemid in movements and then use function onStepIn and if it's an npc it will be teleported back.
 
Server\data\movements\scripts\furniture.lua
Code:
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) == TRUE then
else
        doTeleportThing(cid, fromPosition, FALSE)
    end
    return TRUE
end

Works :)
 
Tried removing the npc and recreating it but can't seem to create the npc again.
Code:
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == FALSE then
local name, pos = getCreatureName(cid), fromPosition
doRemoveCreature(cid)
addEvent(doCreateNpc, 10, name, pos)
end
return TRUE
end
 
Back
Top