function ai_passive_init(e) CharacterControlStand(e) end function ai_passive_main(e) PlayerDist = GetPlayerDistance(e) EntObjNo = g_Entity[e]['obj'] if PlayerDist < 200 then AIEntityGoToPosition(EntObjNo,g_Entity[e]['x'],g_Entity[e]['z']) AIEntityStop(e) RotateToPlayer(e) else if GetTimer(e)>6000 then tempangle = math.random(6.28) tempx = g_Entity[e]['x'] + (math.cos(tempangle)*400); tempz = g_Entity[e]['z'] + (math.sin(tempangle)*400); AIEntityGoToPosition(EntObjNo,tempx,tempz) StartTimer(e) end end end