walkradius=0
If you don't want the NPC to move at all, add this in the XML of the npc:
XML:walkradius=0
Or you can search for `walkradius` in sources to figure out how to implement it to the server.
Provide server version and more info.
what if you try to add this when npc add focusYou know when the npc talks to a player, then he stops moving, he just stays where he is, freezed? Thats what i wanna know, if theres any code that would stop him from moving while talking to that player and when the player say bye he starts moving again.
doCreatureSetNoMove(getNpcId(), true) -- Stop npc movement
doCreatureSetNoMove(getNpcId(), false) -- Start npc movement
what if you try to add this when npc add focus
and when you release focus you use thisLUA:doCreatureSetNoMove(getNpcId(), true) -- Stop npc movement
LUA:doCreatureSetNoMove(getNpcId(), false) -- Start npc movement
Note: this could be used on older tfs versions (0.x) not sure if it work on newer tfs version
What tfs version are you using?doCreatureSetNoMove seems to be working, but i dont have that getNpcId() function on the otserver.
Lua Script Error: [Npc interface]
data/npc/scripts/melchior.luanThink
data/npc/scripts/melchior.lua:147: attempt to call global 'getNpcId' (a nil value)
stack traceback:
data/npc/scripts/melchior.lua:147: in function <data/npc/scripts/melchior.lua:144>
What tfs version are you using?
edit:
what if you change it to getNpcCid() instead of getNpcId()
seems like 1.x+ servers use that instead
Avesta is not the same as theforgottenserver (tfs), i think avesta is based of the orginal otserv 0.6.3 dont quote me on that though.Its avesta 0.63, i couldnt find the tfs version tho.
Is there any tfs for 7.62 or 7.72 server?Avesta is not the same as theforgottenserver (tfs), i think avesta is based of the orginal otserv 0.6.3 dont quote me on that though.
Well since you did have the function to make creatures not move, all you need to do is to find a solution to find the Npc's id.
Im not to familiar whit Avesta or the orginal otserv distributions, and that devsite died a few years ago.
I believe there is one ported to 7.72 you have to search or have a look in this section DistributionsIs there any tfs for 7.62 or 7.72 server?