Create  Edit  Diff  すぐ消える  Index  Search  Changes  History  Source  RSS  Note  wikifarm  Login



const string sAnimCondVarname = "NW_ANIM_CONDITION";
string sSpawnCondVarname = "NW_GENERIC_MASTER";
const string FILE_WALK_WAYPOINTS = "j_ai_walkwaypoin";
const int NW_FLAG_STEALTH = 0x00000004;
const int NW_FLAG_SEARCH = 0x00000008;
const int NW_FLAG_AMBIENT_ANIMATIONS = 0x00080000;
const int NW_FLAG_DAY_NIGHT_POSTING = 0x00400000;
const int NW_FLAG_AMBIENT_ANIMATIONS_AVIAN = 0x00800000;


// Mark that the given creature has the given condition set for anitmations
// * Bioware SoU animations thing.
void SetAnimationCondition(int nCondition, int bValid = TRUE, object oCreature = OBJECT_SELF);
// Sets the specified spawn-in condition on the caller as directed.
// * Only used for animations
void SetSpawnInCondition(int nCondition, int bValid = TRUE);
// Base for moving round thier waypoints
// - Uses ExectuteScript to run the waypoint walking.
void SpawnWalkWayPoints(int nRun = FALSE, float fPause = 1.0);
// Sets the custom AI file to sString to use.
// - "AI_TEMP_SET_TARGET" is set to anything passed to this script.
void SetAIFileName(string sString);
// Gets the custom AI file set to us.
string GetAIFileName();
// Determines a combat round.
void DetermineCombatRound(object oTarget = OBJECT_INVALID);
// Returns any pre-set target object
object Combat_GetAITargetObject();
// Sets the pre-set target object to attack
void SetAITargetObject(object oTarget);
// Gets the nearest seen or heard enemy.
// * bSeenOnly - If set to TRUE, it will only return a valid seen enemy (if any!)
object Combat_GetNearestSeenOrHeardEnemy(int bSeenOnly = FALSE);
// Gets if the object is valid, and we can see, or hear it.
// * bSeenOnly - If set to TRUE, it must be seen.
// TRUE if oTarget is valid.
int Combat_GetTargetValid(object oTarget, int bSeenOnly = FALSE);
// This will call a random voicechat to be called, if iPercent is met.
void Combat_Taunt(int iPercent = 10);
// This will heal oTarget with the best spell possible.
// - Like the Bioware function.
// - Will force healing if bForce is TRUE, ELSE, it will only heal at 50% HP.
// - TRUE if it heals oTarget
int Combat_HealTarget(object oTarget, int bForce = FALSE);
// This will loop all seen allies. If any of them need healing, it will heal
// them and return TRUE.
// - Uses Combat_HealTarget to check if they need healing.
int Combat_HealAllies();
// Only for use in "Combat_TurnUndead", it checks if there are any non-turned
// undead within 10M, of iRace.
int Combat_TurningAnyOfRaceValid(int iRace);
// This will check if we can turn undead, and check if there are anythings we can
// turn, and turn if so. Uses mainly Bioware stuff.
int Combat_TurnUndead();
// This attempt to use the best potions the creature has.
// * Will return FALSE if they use none, or they already have the effects
// * Uses any Potection First (EG: stoneskin), then Benificial (EG: Bulls strength)
//   then Enhancement (EG: Invisibility)
int Combat_UseAnyPotions();
// Attack oTarget with a melee weapon, and melee feats if we can hit them.
// - VERY basic!
void Combat_AttackMelee(object oTarget);
// Attack oTarget with a ranged weapon (if we have any), and ranged feats if we can hit them.
// - VERY basic!
void Combat_AttackRanged(object oTarget);
// This will check if the caller has nSpell, and casts it at oObject if so.
// - Will not cast if oTarget has the effect of nSpell.
// - Returns TRUE if they cast nSpell.
int Combat_CastAtObject(int nSpell, object oTarget);
// This will check if the caller has nSpell, and casts it at oObject's location if so.
// - Will not cast if oTarget has the effect of nSpell.
// - Returns TRUE if they cast nSpell.
int Combat_CastAtLocation(int nSpell, object oTarget);
// Checks if tUse is TRUE, and uses it against oTarget if not got the effects.
int Combat_TalentAtObject(talent tUse, object oTarget);
// Cheat-Casts nSpell, if under iPercent.
// * Doesn't cast if iPercent fails, or oTarget has nSpell's effects.
// Use this to make sure a caster doesn't run out of spells.
int Combat_CheatRandomSpellAtObject(int nSpell, object oTarget, int iPercent);
// This will loop oTarget's effects, and return TRUE if any are equal to
// iEffect, which is a constant EFFECT_TYPE_*
int Combat_GetHasEffect(int iEffect, object oTarget = OBJECT_SELF);
// This will walk the waypoints of the creature (re-activate them)
// Use this if the creature is not in combat/not attacking/no target to attack/
void Combat_WalkWaypoints();
Last modified:2005/04/18 09:54:38
Keyword(s):[nwn] [ai] [j_inc_basic]
References:[AI_Jass_Customs.erf] [AI_Jass_Optional.erf]