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
this call the NPC id, now if u want to make he moves just use the function
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
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()
Code:
doMoveCreature(cid, direction)
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: