
//------------------------------------------------------------------------------------------
//Scripters ai program interface
//------------------------------------------------------------------------------------------

//------------------------------------------------------------------------------------------
//Character types
//------------------------------------------------------------------------------------------

//   
void LAi_SetPlayerType(aref chr);

//   
void LAi_SetOfficerType(aref chr);

//   
void LAi_SetCitizenType(aref chr);
//   ,    
void LAi_SetCitizenTypeNoGroup(aref chr);

//   
void LAi_SetGuardianType(aref chr);
//   ,    
void LAi_SetGuardianTypeNoGroup(aref chr)

//   
void LAi_SetPatrolType(aref chr);
//   ,    
void LAi_SetPatrolTypeNoGroup(aref chr);

//   
void LAi_SetWarriorType(aref chr);
//   ,    
void LAi_SetWarriorTypeNoGroup(aref chr);
//  
void LAi_warrior_SetCommander(aref chr, aref commander);
//     
void LAi_warrior_DialogEnable(aref chr, bool isEnable);
//     
void LAi_warrior_SetStay(aref chr, bool isStay);

//    
void LAi_SetMerchantType(aref chr);
//   ,    
void LAi_SetMerchantTypeNoGroup(aref chr);

//   
void LAi_SetStayType(aref chr);
//   ,    
void LAi_SetStayTypeNoGroup(aref chr);

//   
void LAi_SetSitType(aref chr);
//   ,    
void LAi_SetSitTypeNoGroup(aref chr);

//    (only man)
void LAi_SetBarmanType(aref chr);
//   ,     (only man)
void LAi_SetBarmanTypeNoGroup(aref chr);

//    (only woman)
void LAi_SetWaitressType(aref chr);
//   ,     (only woman)
void LAi_SetWaitressTypeNoGroup(aref chr);

//   
void LAi_SetPoorType(aref chr);
//   ,    
void LAi_SetPoorTypeNoGroup(aref chr);

//   
void LAi_SetHuberType(aref chr);
//   ,    
void LAi_SetHuberTypeNoGroup(aref chr);

//   ,   
void LAi_SetHuberStayType(aref chr);
//   ,   ,    
void LAi_SetHuberStayTypeNoGroup(aref chr);
//    
void LAi_SetStayHuberPointMap(aref chr, string group, string locator);
//    
void LAi_SetStayHuberPointWindow(aref chr, string group, string locator);

//   
void LAi_SetPriestType(aref chr);
//   ,    
void LAi_SetPriestTypeNoGroup(aref chr);

//   
void LAi_SetActorType(aref chr);
//   ,    
void LAi_SetActorTypeNoGroup(aref chr);


//------------------------------------------------------------------------------------------
//Actor
//------------------------------------------------------------------------------------------
//
//  quest:
//            ""        
//            "questName"       
//  timeout:
//            -1    ,   
//            >= 0          
//
//
//          
//
//
//------------------------------------------------------------------------------------------

//  , 
void LAi_ActorStay(aref chr);

//     , 
void LAi_ActorGoToLocator(aref chr, string group, string locator, string quest, float timeout);
//     , 
void LAi_ActorRunToLocator(aref chr, string group, string locator, string quest, float timeout);

//     , 
void LAi_ActorGoToLocation(aref chr, string groupExit, string locatorExit, string locID, string groupEnter, string locatorEnter, string quest, float timeout);
//     , 
void LAi_ActorRunToLocation(aref chr, string groupExit, string locatorExit, string locID, string groupEnter, string locatorEnter, string quest, float timeout);

//  c     ,   
//       
void LAi_ActorFollow(aref chr, aref follow, string quest, float timeout);

//  c     , 
//       
void LAi_ActorFollowEverywhere(aref chr, string quest, float timeout);

//    , 
void LAi_ActorAttack(aref chr, aref enemy, string quest);

//    , 
void LAi_ActorAfraid(aref chr, aref by, bool canMove);

//           , 
void LAi_ActorDialog(aref chr, aref to, string quest, float timeout, float dlgTime);
//       , 
void LAi_ActorDialogNow(aref chr, aref to, string quest, float dlgTime);
//    , 
void LAi_ActorSelfDialog(aref chr, string quest);
//     , 
void LAi_ActorWaitDialog(aref chr, aref by);

//   ,    , 
//  ,      
void LAi_ActorAnimation(aref chr, string animation, string quest, float timeout);

//    (), 
void LAi_ActorTurnToCharacter(aref chr, aref to);
//   , 
void LAi_ActorTurnByLocator(aref chr, string group, string locator);
//   , 
void LAi_ActorTurnToLocator(aref chr, string group, string locator);

//   ,  idle-
void LAi_ActorSetStayMode(aref chr);
//   ,  idle-
void LAi_ActorSetSitMode(aref chr);
//   
void LAi_ActorSetLayMode(aref chr);

//     ,     
void LAi_type_actor_Reset(aref chr)

//------------------------------------------------------------------------------------------
//Characters control
//------------------------------------------------------------------------------------------

//   
void LAi_SetLoginTime(aref chr, float start, float end);
//   
void LAi_RemoveLoginTime(aref chr);
//   ,       
void LAi_SetFanatic(aref chr, string churchID, strung group, string locator, float start, float end);
//  
void LAi_RemoveFanatic(aref chr);
//    
void LAi_NoRebirthEnable(aref chr);
//    
void LAi_NoRebirthDisable(aref chr);
///     
void LAi_LoginInCaptureTown(aref chr, bool isEnable);

// 
void LAi_SetHP(aref chr, float cur, float max);
//  
void LAi_SetCurHP(aref chr, float cur);
//   
void LAi_SetCurHPMax(aref chr);
//    
void LAi_SetDltHealth(aref chr, float healthPerSec);
// 
void LAi_UseHealthBottle(aref chr, float healthInBottle);
//  
void LAi_SetImmortal(aref chr, bool isImmortal);
//  
float LAi_GetCharacterHP(aref chr);
//   
float LAi_GetCharacterMaxHP(aref chr);
//    0..1
float LAi_GetCharacterRelHP(aref chr);

//  ,     ,  
void LAi_SetCheckMinHP(aref chr, float min, bool immortal, string quest);
//  
void LAi_RemoveCheckMinHP(aref chr);

// 
void LAi_KillCharacter(aref chr);
//  
bool LAi_IsDead(aref chr);

//   
float LAi_GetCharacterRelCharge(aref chr);

//   
void LAi_CharacterDisableDialog(aref chr);
//   
void LAi_CharacterEnableDialog(aref chr);

//    
void LAi_CharacterReincarnation(aref chr, bool isEnable, bool isUseCurModel);

// fencing       
void LAi_SetAdjustFencingSkill(aref chr, float min, float max);
//  
void LAi_DelAdjustFencingSkill(aref chr);


// 
void LAi_CharacterPlaySound(aref chr, string soundname);

//     
void LAi_SetFightMode(aref chr, bool isFightMode);
//   (!!!     !!!)
void LAi_LockFightMode(aref chr, bool isLockFightMode);

//------------------------------------------------------------------------------------------
//Groups
//------------------------------------------------------------------------------------------

 :
LAI_GROUP_DEFAULT	//  
LAI_GROUP_CITIZEN	//    ,   
LAI_GROUP_PLAYER	//    ,   
LAI_GROUP_GUARDS	//      
LAI_GROUP_ACTOR		// ,     
LAI_GROUP_HUBER		//      ,   


 :
LAI_GROUP_FRIEND	// 
LAI_GROUP_NEUTRAL	// 
LAI_GROUP_ENEMY		// 


 :
//    ,  
LAI_GROUP_DEF_LOOK			//  
LAI_GROUP_DEF_HEAR			//   
LAI_GROUP_DEF_SAY			//     

//  
#define LAI_GROUP_PLA_LOOK	//  
#define LAI_GROUP_PLA_HEAR	//   
#define LAI_GROUP_PLA_SAY	//     

//  
#define LAI_GROUP_GRD_LOOK	//  
#define LAI_GROUP_GRD_HEAR	//   
#define LAI_GROUP_GRD_SAY	//     

//  
#define LAI_GROUP_ACT_LOOK	//  
#define LAI_GROUP_ACT_HEAR	//   
#define LAI_GROUP_ACT_SAY	//     

//  
#define LAI_GROUP_HUB_LOOK	//  
#define LAI_GROUP_HUB_HEAR	//   
#define LAI_GROUP_HUB_SAY	//     

// 
#define LAI_GROUP_PDEFAULT	//   
#define LAI_GROUP_PPLAYER	//   
#define LAI_GROUP_PGUARDS	//   
#define LAI_GROUP_PCITIZENS	//      


//  
void LAi_group_Register(string groupName);

//    
void LAi_group_SetLookRadius(string groupName, float radius);
//    
void LAi_group_SetHearRadius(string groupName, float radius);
//    
void LAi_group_SetSayRadius(string groupName, float radius);
//   
void LAi_group_SetPriority(string groupName, int priority);
//   0..1
bool LAi_group_SetAlarm(string group1, string group2, float level);
//    /
bool LAi_group_SetAlarmDown(string group1, string group2, float down);


//    ,   ,      
void LAi_group_MoveCharacter(aref chr, string groupName);

//   
void LAi_group_SetRelation(string group1, string group2, string curRelation);
//        
void LAi_group_SetAlarmReaction(string group1, string group2, string actRelation, string relRelation)
//    2 
void LAi_group_FightGroups(string group1, string group2, bool asignGuardianType);
//    2 ,    
void LAi_group_FightGroupsEx(string group1, string group2, bool asignWarriarType, int commander1, int commander2, bool isStay, bool isDialog);

//    
float LAi_group_GetPlayerAlarm();
//    
bool LAi_group_IsActivePlayerAlarm();

//    
void LAi_group_SetCheck(string groupName, string quest);
//    
void LAi_group_RemoveCheck(string groupName);

//    
void LAi_CharacterReincarnation(aref chr, bool isEnable, bool isUseCurModel);

//----------------------------------------------------------------------
//Other
//----------------------------------------------------------------------

//      
string LAi_FindRandomLocator(string group);
//      
string LAi_FindFarLocator(string group, float x, float y, float z);
//   
string LAi_FindNearestFreeLocator(string group, float x, float y, float z);

//  
aref LAi_CreateFantomCharacter(0, string model, string group, string locator);
//  
ref LAi_CreateFantomCharacterEx(string model, string group, string locator);

//    ,  
void LAi_QuestDelay(string quest, float delayTime);



//   ,   questFadeOut,   ,   questFadeIn
void LAi_Fade(string questFadeOut, string questFadeIn);


//     
void LAi_LocationFightDisable(ref location, bool isDisable);
//    
void LAi_LocationMonstersGen(ref location, bool isEnable);
//   
void LAi_LocationSetMonstersTime(ref location, float start, float end);
//         
void LAi_LocationFantomsGen(ref location, bool isEnable);
