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

How do I make a NPC be moveable by normal players?

mikeware

New Member
Joined
Jul 17, 2007
Messages
338
Reaction score
0
Location
Brazil
make a NPC be moveable by normal players [+tutorial]

Hi, as the title say, Im trying to make a npc that normal players could move him, but everything i tryed failed =/
The only way that I found to make it work was editing the flags value of normal players to move everything but with that he would move everything he wants and I want just a especific NPC, tryed put access 0 but skill they can't move...
so what do I need to make to this NPC be moveable not only by gms but by normal players like in real tibia.

thanks :)


<!-----------Edit----------->
Hey ppl, i made a working script, u Can't move the NPC just pushing it without editing the sources and etc, but u can make he moves for urself :)
the function we'll need to use is
Code:
getNpcCid()
this call the NPC id, now if u want to make he moves just use the function
Code:
doMoveCreature(cid, direction)
change cid to getNpcCid, then the NPC will move, and then change the direction to the corresponding value, they are:
NORTH = 0
EAST = 1
SOUTH = 2
WEST = 3
SOUTHWEST = 4
SOUTHEAST = 5
NORTHWEST = 6
NORTHEAST = 7

example:
u want make he moves to right:
doMoveCreature(getNpcCid,1)


there are others special functions for NPCs like getNpcCid, look at npc.cpp for more.
k bye :)
 
Last edited:
You can't push npc's with an acces higher then 5 becouse then players could push gm's although ....

yours Evil Hero,
 
i think (doTeleportThing(cid, newpos, <optional> pushmove))
but dont knwo :S

ya im trying that, but i need something to call the NPC...
and there is a better function for that:
doMoveCreature(cid, direction)

the problem is something to call him....
tryed:
npc = getThingfromPos(his position)

then
doMoveCreature(npc.uid, "direction number")

but the second time i want to move him, won't work cuz he is on another position
 
The thread is closed. But mikeware, please post the script it may be usefull for other members who are looking for the same thing. If you wish to post it, edit your main post if you can't send me a private message
 
Back
Top