rendered paste bodyOutside AI -->
struct Coords
{
float x;
float y;
float z;
float o;
};
static Coords forillidan[] =
{
{ x, y, z, o }
};
<--
OnSpawn()
{
if (_unit->GetPositionX() == x.xf && _unit->GetPositionY() == y.yf && _unit->GetPositionZ() == z.zf && !_unit->isInCombat())
{
_unit->GetAIInterface()->addWayPoint(CreateWaypoint(1, 0, RUN));
_unit->GetAIInterface()->StopMovement(0);
//_unit->GetAIInterface()->SetAIState(STATE_SCRIPTMOVE);
_unit->GetAIInterface()->setMoveType(MOVEMENTTYPE_CIRCLEWP);
//_unit->GetAIInterface()->setWaypointToMove(1);
}
}
inline WayPoint* CreateWaypoint(int id, uint32 waittime, uint32 flags)
{
WayPoint * wp = _unit->CreateWaypointStruct();
wp->id = id;
wp->x = way1[id].x;
wp->y = way1[id].y;
wp->z = way1[id].z;
wp->o = way1[id].o;
wp->waittime = waittime;
wp->flags = flags;
wp->forwardemoteoneshot = 0;
wp->forwardemoteid = 0;
wp->backwardemoteoneshot = 0;
wp->backwardemoteid = 0;
wp->forwardskinid = 0;
wp->backwardskinid = 0;
return wp;
}