FANDOM


Set (OUT OBJECT variable, OBJECT value)
Set the value of a variable

SetVar (CHARACTER|ITEM object, FIXEDSTRING variableName, OBJECT value)
Set the value of a global variable

Cast (OUT INT|FLOAT variable, INT|FLOAT value)
Casts the value to the variable

Add (INOUT INT|FLOAT|FLOAT3 variable, INT|FLOAT|FLOAT3 value)
Adds both values and stores it in the first variable

Subtract (INOUT INT|FLOAT|FLOAT3 variable, INT|FLOAT|FLOAT3 value)
Subtracts both values and stores it in the first variable

Multiply (INOUT INT|FLOAT|FLOAT3 variable, INT|FLOAT value)
Multiplies both values and stores it in the first variable

Divide (INOUT INT|FLOAT|FLOAT3 variable, INT|FLOAT value)
Divides both values and stores it in the first variable

Abs (INOUT INT|FLOAT variable)
Takes the absolute value of a variable

Clamp (INOUT INT|FLOAT variable, INT|FLOAT min, INT|FLOAT max)
Clamps a variable between min and max

GetRandom (OUT OBJECT variable, OBJECT value, OBJECT value, OBJECT value)
Fills in the variable with random one of the values.

GetWeightedRandom (OUT OBJECT variable, OBJECT value, INT|FLOAT weight, ...)
Gets a weighted random of the given values!

GetRandomBetween (OUT INT|FLOAT variable, INT|FLOAT min, INT|FLOAT max)
Gets a random value between min and max (both included)

GetElement (OUT OBJECT variable, INT index, OBJECT value, OBJECT value, OBJECT value)
Fills in the variable with the index one of the values (starting from 0)

SetPriority (FIXEDSTRING reactionName, INT priority)
Changes the priority of a reaction. Priority 0 and below are not executed!

DelayReaction (FIXEDSTRING reactionName, FLOAT timeInSeconds)
The reaction will not be chosen for the specified time

Goto (FIXEDSTRING labelName)
Jumps to the label

GotoIfEqual (OBJECT variable, OBJECT value, FIXEDSTRING labelName)
Jumps to the label if the 2 objects are equal

GotoRand (FIXEDSTRING labelName, FIXEDSTRING labelName, FIXEDSTRING labelName, FIXEDSTRING labelName, FIXEDSTRING labelName)
Jumps to a random label in the list

CreateSurfaceAt (GAMEOBJECT|FLOAT3 target, SURFACE type, FLOAT radius)
Spawn a surface at the target's position

PlayEffectAt (GAMEOBJECT|FLOAT3 target, STRING effectName)
Plays an effect at the target's position

ExplodeAt (GAMEOBJECT|FLOAT3 target, SKILL projectileSkill, [INT casterLevel=-1, CHARACTER cause])
Trigger an explosion of a projectile skill at the target's position. The cause will trigger NPC behavior as if the cause casted the projectile

DisplayText (CHARACTER|ITEM target, FIXEDSTRING text, FLOAT timeInSeconds)
Displays text above the character/item for a certain amount of time. It will replace the current text, including dialogtext

DisplayCombatInfoText (CHARACTER|ITEM target, FIXEDSTRING text, FLOAT timeInSeconds)
Displays text above the character/item for a certain amount of time. It will replace the current text, including dialogtext

StatusText (CHARACTER|ITEM target, FIXEDSTRING text)
Adds statustext above the character/item for a short amount of time. Will not replace texts or dialogtexts

DebugText (CHARACTER|ITEM target, STRING text)
Adds debugtext above the character/item for a short amount of time.

CombatLogText (CHARACTER|ITEM target, FIXEDSTRING text, INT filterID, INT broadcastID)
Adds combatlog text inside the combat log window. Color-/SizeFormatting should already be applied, if not color and size of the string will be NORMAL. filterID determines what filter shows/hides the text. broadcastID determines who will be able to see the message (0 hearingrange. 1 party. 2 all)

Log (STRING text, ...)
Log's the the scriptlog. (for debugging purposes)

Label (FIXEDSTRING name)
Marks this line as a label where Goto actions can jump to

StartTimer (FIXEDSTRING timerName, FLOAT timeInSeconds, INT repeatCount)
Start a timer which will throw the timer event. Set repeatcount < 0 for a permanent timer.

StopTimer (FIXEDSTRING timerName)
Stop a timer which will throw the timer event

DialogStart (STRING dialog, CHARACTER|ITEM target, CHARACTER|ITEM target, CHARACTER|ITEM target, CHARACTER|ITEM target)
Start a dialog between the targets

DialogRequestStop (STRING dialog)
Stops a certain dialog

Check ()
Reevaluate the conditions in the CHECK section of this reaction

Reset ()
Resets the current reaction. It will start from the beginning again

Interrupt (FIXEDSTRING reactionName)
Interrupt the reaction.

GlobalSetEvent (STRING eventName)
Sets a global event. Scripts and Story can catch it.

GlobalClearEvent (STRING eventName)
Clears a global event. Scripts and Story can catch it.

StopLoopEffect (INT fxHandle)
Stops a looping effect

IterateItems (FIXEDSTRING eventname)
Launch iterate event for each item

IterateItemsNear (GAMEOBJECT source, FLOAT radius, FIXEDSTRING eventname)
Launch iterate event for each item in range

IterateItemsOnObject (CHARACTER|ITEM source, FIXEDSTRING eventname)
Launch iterate event for each item standing on the source

IterateParty (FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each party member. If you pass compare parameters, it will iterate over them in the requested order.

IterateCharacters (FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each character.  If you pass compare parameters, it will iterate over them in the requested order.

IterateCharactersNear (GAMEOBJECT source, FLOAT radius, FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each character in range.  If you pass compare parameters, it will iterate over them in the requested order.

IterateCharactersOnObject (CHARACTER|ITEM source, FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each character standing on the source. If you pass compare parameters, it will iterate over them in the requested order.

IterateCharactersInCombat (CHARACTER source, FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each character in combat with the source. If you pass compare parameters, it will iterate over them in the requested order.

IterateHostilesFor (CHARACTER source, FIXEDSTRING eventname, [COMPARE howTo, COMPAREFUNC compareFunc])
Launch iterate event for each character who is targetting the source. If you pass compare parameters, it will iterate over them in the requested order.

SpawnCharacter (OUT CHARACTER result, CHARACTERTEMPLATE rootTemplate, GAMEOBJECT|FLOAT3 position, INT playSpawn)
Spawns a character

SpawnItem (ITEMTEMPLATE rootTemplate,GAMEOBJECT|FLOAT3 position, OUT ITEM result)
Spawns an item

ShootLocalProjectile (SKILL projectileSkill,CHARACTER|ITEM source,FLOAT3 localOffset,FLOAT3 direction,[INT casterLevel])
Spawns a projectile at the source (with offset, can be null) shooting at the target

ShootLocalProjectileAt (SKILL projectileSkill,CHARACTER|ITEM source,FLOAT3 localOffset,GAMEOBJECT|FLOAT3 target,[INT casterLevel])
Spawns a projectile at the source (with offset, can be null) shooting at the target

ShootWorldProjectile (SKILL projectileSkill,CHARACTER|ITEM source,FLOAT3 worldPos,FLOAT3 direction,[INT casterLevel])
Spawns a projectile at worldPos shooting at the target. Source can be null.

ShootWorldProjectileAt (SKILL projectileSkill,CHARACTER|ITEM source,FLOAT3 worldPos,GAMEOBJECT|FLOAT3 target,[INT casterLevel])
Spawns a projectile at worldPos shooting at the target. Source can be null.

ShootLocalCone (SKILL coneSkill,CHARACTER|ITEM source,FLOAT3 localOffset,FLOAT3 direction,[INT casterLevel])
Shoots a cone from source (with offset, can be null) in a direction

ShootLocalConeAt (SKILL coneSkill,CHARACTER|ITEM source,FLOAT3 localOffset,GAMEOBJECT|FLOAT3 target,[INT casterLevel])
Shoots a cone from source (with offset, can be null) at the target

ShootWorldCone (SKILL coneSkill,CHARACTER|ITEM source,FLOAT3 worldPos,FLOAT3 direction,[INT casterLevel])
Shoots a cone from worldPos in a direction. Source can be null.

ShootWorldConeAt (SKILL coneSkill,CHARACTER|ITEM source,FLOAT3 worldPos,GAMEOBJECT|FLOAT3 target,[INT casterLevel])
Shoots a cone from worldPos at the target. Source can be null.

SetVisible (CHARACTER|ITEM object, INT visible)
Sets a character or item visible or not.

GetPosition (GAMEOBJECT object,OUT FLOAT3 src)
Get the current position of an object

GetForwardDirection (GAMEOBJECT object,OUT FLOAT3 direction)
Get the current forward direction of an object

GetRightDirection (GAMEOBJECT object,OUT FLOAT3 direction)
Get the current right direction of an object

GetUpDirection (GAMEOBJECT object,OUT FLOAT3 direction)
Get the current up direction of an object

GetDirection (GAMEOBJECT|FLOAT3 src,GAMEOBJECT|FLOAT3 target,OUT FLOAT3 direction[, OUT FLOAT distance])
Get the direction from src to target (optional  returns the distance between the objects as well)

RotateY (INOUT FLOAT3 vector, FLOAT degrees)
Rotate the vector around the Y-axis for a certain angle (in degrees)

SetHealth (CHARACTER|ITEM target, FLOAT procent)
Set a characters or items health on the given percentage. (percentage between 0 and 1)

PlaySound (CHARACTER|ITEM target, STRING soundEvent)
Plays a sound event at the target

SetX (INOUT FLOAT3 vector, FLOAT|INT value)
Sets the X component of the FLOAT3

SetY (INOUT FLOAT3 vector, FLOAT|INT value)
Sets the Y component of the FLOAT3

SetZ (INOUT FLOAT3 vector, FLOAT|INT value)
Sets the Z component of the FLOAT3

SetAtmosphere (FIXEDSTRING atmosphereTriggerUUID, FIXEDSTRING atmosphere)
Changes the atmosphere of the trigger

ResetAtmosphere (FIXEDSTRING atmosphereTriggerUUID)
Resets the atmosphere of the trigger

AddStatusInfluence (CHARACTER|ITEM object, STATUS status, FLOAT strength, [FIXEDSTRING extraData=\"\"], [INT isWeather=1])
Adds the status influence strength on the object.

RemoveStatusInfluence (CHARACTER|ITEM object, STATUS status, FLOAT strength, [FIXEDSTRING extraData=\"\"], [INT isWeather=1])
Removes the status influence strength on the object.

AddTemporaryStatusInfluence (CHARACTER|ITEM object, STATUS status, FLOAT strength, [FIXEDSTRING extraData=\"\"], [INT isWeather=1])
Adds a temporary status influence strength on the object.. It will be gone in a few seconds if it's not set again

CallFunction (FIXEDSTRING functionName)
Calls a function with the ID

SetMaterial (CHARACTER|ITEM object, FIXEDSTRING materialUUID, INT duration, INT applyOnBody, INT applyOnArmor, INT applyOnWeapon[, INT applyNormalMap, INT overlay, INT fading])
Changes the material of the object for a set time (in turns), -1 is infinite. applyNormalMap: Copy the original materials normal map

Sleep (FLOAT timeInSeconds)
Sleeps for a certain amount of time

CharacterAttack (CHARACTER|ITEM target [,INT alwaysHit])
Moves in weapon range and attacks the target

CharacterAttackWithoutMove (CHARACTER|ITEM target [,INT alwaysHit])
Attacks the target without checking weaponranges and without moving

CharacterTeleportTo (GAMEOBJECT|FLOAT3 target)
Teleport to or near the target

CharacterMoveTo (GAMEOBJECT|FLOAT3 target, [INT running=0, INT shouldArrive=0, INT longPath=0, FLOAT minDistance=1.5, FLOAT maxDistance=minDistance+2.5])
Move to the target.
Set shouldArrive to 1 if you want a guaranteed move. (teleports on fail)
Set longPath to 1 if it's a really long path

CharacterMoveInRange (GAMEOBJECT|FLOAT3 target, FLOAT rangeMin, FLOAT rangeMax, INT running)
Move within a certain range

CharacterMoveOutOfSight (FLOAT angle)
Move out of screen

CharacterPlayAnimation (FIXEDSTRING animation [, INT exitOnFinish=1, INT waitForCompletion=1])
Plays a certain animation
ExitOnFinish means if the exit will kill itself after it was played (revert back to still)
WaitForCompletion means if the action will wait for the animation to be played at least once.

CharacterStopAnimation ()
Stops all animations.

CharacterPickUpItem (ITEM item)
Moves close enough to the item if necessary and picks it up

CharacterUseItem (ITEM item)
Moves close enough to the item if necessary and uses it

CharacterMoveItem (ITEM item, GAMEOBJECT|FLOAT3 target[, INT amount])
Moves close enough to the item if necessary and moves it to the position

CharacterAddSkill (SKILL skill)
Add the skill to the character

CharacterRemoveSkill (SKILL skill)
Remove the skill from the character

CharacterUseSkill (SKILL skill, GAMEOBJECT|FLOAT3 target [, FLOAT3 destination])
Cast a skill

CharacterUseSkillFromItem (ITEM skillItem, GAMEOBJECT|FLOAT3 target [, FLOAT3 destination, SKILL skillOverride=null])
Cast a skill from an item. If wanted, you can override which skill it casts with skillOverride

CharacterAppearAt (GAMEOBJECT target, INT playspawn)
Appear at the target

CharacterAppearOutOfSightTo (GAMEOBJECT target, FLOAT angle, INT playspawn)
Appears out of sight to the players from a certain angle while being able to reach target

CharacterAppearOnTrailOutOfSightTo (CHARACTER target, FLOAT angle, INT playspawn)
Appears out of sight to the players, on its previous locations, from a certain angle while being able to reach target

CharacterDisappear (FLOAT angle)
Move out of screen and go of stage

CharacterSetOffStage ()
Set Off Stage

CharacterSetOnStage ()
Set On Stage

CharacterLookAt (GAMEOBJECT|FLOAT3 target[, INT snapToTarget=0, INT angleTolerance=0])
Rotates the character to look at the target.

CharacterLookFrom (GAMEOBJECT target[, INT snapToTarget=0])
Rotates to the character so it has the same rotation as the target

CharacterFollow (CHARACTER target, FLOAT durationInSeconds, INT run)
Follow the target for a certain time

CharacterFollowOwnerOrLeader (FLOAT durationInSeconds, INT run)
Follow the leader or owner for a certain time

CharacterWander (FLOAT|TRIGGER range, FLOAT durationInSeconds [, INT run, GAMEOBJECT anchor])
Wander around for a certain time

CharacterSwitchWeaponType (WEAPON type)
If necessary switch to the new weapon type

CharacterFleeFrom (RELATION relation, FLOAT range)
Run away from certain characters if necessary

CharacterFleeFromSurface (SURFACE surface)
Run away from a certain surface if necessary

CharacterFleeFromDangerousSurface ()
Run away from a dangerous surfaces if necessary

CharacterDie (CHARACTER character)
Kills the character

CharacterHeal (CHARACTER character, FLOAT percentage)
Heals the character

CharacterConsume (CHARACTER character, POTION potion)
Makes the character consume a potion. Doesn't cost any AP and will just execute the result of the potion.

CharacterSetInvulnerable (CHARACTER character, INT bool)
Makes the character invulnerable or not. (Allow damage)

CharacterSetImmortal (CHARACTER character, INT bool)
Makes the character immortal or not. (Allow dying)

CharacterEndTurn ()
Ends the character's current turn

CharacterPlayEffect (CHARACTER character, STRING effect [,FIXEDSTRING boneName])
Plays an effect on the character and it follows the character

CharacterPlayLoopEffect (OUT INT effectHandle, CHARACTER character, STRING effect [,FIXEDSTRING boneName])
Plays a looping effect on the character and it follows the character

CharacterEvent (CHARACTER character, STRING eventName)
Throw a character event which you can catch in scripts and story

CharacterItemEvent (CHARACTER character, ITEM item, STRING eventName)
Throw a character/item event which you can catch in scripts and story

CharacterSetRelationIndivToIndiv (CHARACTER source, CHARACTER target, INT relation)
Changes the relationship between 2 characters.

CharacterForceUpdate (INT forceUpdate)
Makes sure the attached character is always being update or not.
Make sure you turn it off at the right time, or we have everyone updating!

CharacterSetEnemy (CHARACTER character, CHARACTER enemy)
Sets the current enemy of character

CharacterApplyStatus (CHARACTER character, STATUS status [, INT turns=null, INT force=0])
Applies the status to the character
When turns is -1 it's a permanent status
When turns is -2 it's a keep alive status (which means it will die if it's not applied again within 1 second)
When force is 1 it will ignore savingthrows & immunities.

CharacterRemoveStatus (CHARACTER character, STATUS status)
Removes the status from the character

CharacterSetFaction (CHARACTER character, FIXEDSTRING faction)
Changes the faction of a character

CharacterDestroy (CHARACTER character)
Destroys the character

CharacterSetCanFight (CHARACTER character, INT enabled[, INT wholeGroup=0])
Enables/Disables the fact if the character can fight. Optional for the whole group

CharacterSetCanSpotSneakers (CHARACTER character, INT enabled)
Enables/Disables the fact if the character can spot sneaking characters.

CharacterSetIsBoss (CHARACTER character, INT enabled)
Enables/Disables the fact if the character is a boss.

CharacterSetAttackOfOpportunity (CHARACTER character, INT enabled)
Enables/Disables the fact if the character can do attack of opportunities.

CharacterSetCombatTimeout (CHARACTER character, FLOAT timer)
Overwrites the character's combat timeout check.

CharacterResetCombatTimeout (CHARACTER character)
Resets the character's combat timeout check.

CharacterResurrect (CHARACTER character)
Resurrects the character.

CharacterAddToInventory (CHARACTER character, FIXEDSTRING itemStatsObject[, INT amount])
Add the item to the character

CharacterRemoveFromInventory (CHARACTER character, FIXEDSTRING itemStatsObject[, INT amount])
Remove the item from the character

CharacterDrinkPotion (FIXEDSTRING statID)
Makes the character drink a potion from the inventory.

CharacterSetAnimationOverride (CHARACTER character, FIXEDSTRING animation)
Sets an animation override, only walk/run/die animations can override it.

ItemEvent (ITEM item, STRING eventName)
Throw an item event which you can catch in scripts and story

ItemPlayAnimation (FIXEDSTRING animation)
Plays an animation on the item

ItemPlayAnimationTo (FIXEDSTRING animation, FLOAT targetPercentage, [FLOAT speed])
Plays an animation on the item to the target time (percentage of the total duration)

ItemPlayEffect (ITEM item, STRING effect [,FIXEDSTRING boneName])
Plays an effect on the item and it follows the item

ItemPlayLoopEffect (OUT INT effectHandle, ITEM item, STRING effect [,FIXEDSTRING boneName])
Plays a looping effect on the item and it follows the item

ItemSetOnStage (ITEM item, INTEGER bool)
Sets an item on or offstage

ItemClose (ITEM item)
Close an item

ItemOpen (ITEM item)
Open an item

ItemLock (ITEM item, FIXEDSTRING key)
Lock an item

ItemUnlock (ITEM item)
Unlock an item

ItemApplyStatus (ITEM item, STATUS status [, INT turns=null, INT force=0])
Applies the status to the item
When turns is -1 it's a permanent status
When turns is -2 it's a keep alive status (which means it will die if it's not applied again within 1 second)
When force is 1 it will ignore savingthrows & immunities.

ItemRemoveStatus (ITEM item, STATUS status)
Removes the status from the item

ItemDie (ITEM item)
Kills the item

ItemTeleportTo (ITEM item, GAMEOBJECT|FLOAT3 target)
Teleports the item to the target

ItemLookAt (GAMEOBJECT target, FLOAT degreesPerSecond)
Rotates the item to look at the target

ItemDestroy (ITEM item)
Destroys the item

IsEqual (OBJECT variable, OBJECT variable)
Compares both objects and see if they are equal.

IsLessThen (INT|FLOAT variable, INT|FLOAT variable)
Compares both objects and see if the first one is smaller.

IsGreaterThen (INT|FLOAT variable, INT|FLOAT variable)
Compares both objects and see if the first one is bigger.

IsRandom (FLOAT percentage)
Each time this condition is checked, it will succeed with a chance of the percentage (between 0 and 1)

IsRound (INT roundNumber)
Checks if we are currently in combat in round x

IsInSurface (CHARACTER|ITEM target, SURFACE type)
Check if the character or item is currently standing on the specific surface

IsInDangerousSurface (CHARACTER target)
Check if the character is currently standing on a dangerous surface

IsInDialog (CHARACTER|ITEM target)
Check if the character or item is currently in a dialog

GetDistance (OUT FLOAT distance, GAMEOBJECT|FLOAT3 source, GAMEOBJECT|FLOAT3 target)
Returns the distance between 2 positions

GetInnerDistance (OUT FLOAT distance, GAMEOBJECT source, GAMEOBJECT target)
Returns the distance between 2 gameobjects (character, item, trigger, ...)
Their bounds are already subtracted.

GetPosition (GAMEOBJECT object, OUT FLOAT3 position)
Returns the position of a gameobject (character, item, trigger, ...)

GetVar (OUT OBJECT returnValue, CHARACTER|ITEM target, FIXEDSTRING varName)
Gets a global variable from the target

GetClosestPlayer (OUT CHARACTER player, [GAMEOBJECT|FLOAT3 source])
Gets the closest player near the source, default being being the object itself

ContainsSurface (GAMEOBJECT|FLOAT3 source, FLOAT radius, SURFACE type,)
Checks if there is any surface of the type within a radius of the source

IsSurface (GAMEOBJECT|FLOAT3 source, FLOAT radius, SURFACE type,)
Checks if the whole radius around the source is the specified surface type

IsObjectOnObject (CHARACTER|ITEM source,CHARACTER|ITEM target)
Checks if the source is standing on the target

GetX (FLOAT3 vector, OUT FLOAT value)
Returns the X component of the vector

GetY (FLOAT3 vector, OUT FLOAT value)
Returns the Y component of the vector

GetZ (FLOAT3 vector, OUT FLOAT value)
Returns the Z component of the vector

FindSurface (OUT FLOAT3 result, GAMEOBJECT|FLOAT3 source, FLOAT minRange, FLOAT maxRange, SURFACE type [,CHARACTER alignSource, INT minEnemiesInSurface, INT maxAlliesInSurface, INT minimumCellCount])
Finds the closest surface of a specific type.
If there's a filled in enemies/alliesInsurface, it will be an extra condition for the surface.

FindValidPosition (INOUT FLOAT3 position, FLOAT radius[, CHARACTER|ITEM object=null])
Finds the closest valid position (where the object can stand.)

FindPosition (INOUT FLOAT3 position, GAMEOBJECT|FLOAT3 source, FLOAT radius, FLOAT rangeCheck, CHARACTER alignSource, INT minAllies, INT maxAllies, INT minEnemies, INT maxEnemies)
Finds the closest position from the source (within radius) where the conditions are matched.
Used for finding AOE positions.

FindCover (INOUT FLOAT3 position, CHARACTER character, GAMEOBJECT|FLOAT3 source, FLOAT rangeCheck)
Finds the closest cover position from the source (within range) where the character is \"safe\" from enemies.

CanSee (GAMEOBJECT|FLOAT3 source, GAMEOBJECT|FLOAT3 target)
Check if the sight is blocked between 2 points.

IsVisible (CHARACTER|ITEM object)
Check if the object is set invisible or not with SetVisible.

GetTextDuration (CHARACTER|ITEM object, FIXEDSRTING key, OUT FLOAT duration)
Gets how long a text needs to be displayed

CharacterGet (OUT CHARACTER character, GAMEOBJECT|FLOAT3 src, FLOAT range, COMPARE howTo, COMPAREFUNC compareFunc[, RELATION  relation, SURFACE surface, STATUS status, TALENT talent, CHARACTER inSightOf])
Get a character within a certain range conforming to the filled in restraints.
This will never return the character to which this script is attached!

CharacterCount (OUT INT count, GAMEOBJECT|FLOAT3 src, FLOAT range, [RELATION  relation, SURFACE surface, STATUS status, TALENT talent, CHARACTER inSightOf])
Counts the characters within a certain range conforming to the filled in restraints.

CharacterGetOwner (OUT CHARACTER owner, CHARACTER source)
Get the character's owner

CharacterGetFollow (OUT CHARACTER to follow, CHARACTER source)
Get the character to follow

CharacterGetEnemy (OUT CHARACTER current enemy, CHARACTER source)
Get current enemy of character

CharacterCanCast (CHARACTER source, SKILL skillId[, INT ignoreActionPoints=0])
Check if the character source can cast the skill: will check cooldown, actionpoints

CharacterCanCastFromItem (CHARACTER source, ITEM item[, INT ignoreActionPoints=0, SKILL skillOverride])
Check if the character source can cast the skill from an item.

CharacterCanDrinkPotion (CHARACTER source, FIXEDSTRING potionID[, INT ignoreActionPoints=0])
Check if the character source can drink the potion: will check inv and actionpoints

CharacterCanSee (CHARACTER watchingChar, CHARACTER|ITEM target [, INT forceUpdate=0])
Check if character has target in his line of sight.
If you force the update, it will not use the cache and recheck the sight (can be slow if overused).

CharacterCanShoot (CHARACTER source, GAMEOBJECT|FLOAT3 target)
Check if the character can shoot the target.

CharacterIsPlayer (CHARACTER character)
Check if the character is a player

CharacterIsStoryGlobal (CHARACTER character)
Check if the character is global for story

CharacterIsInParty (CHARACTER character)
Check if the character is in the party

CharacterIsEnemy (CHARACTER source, CHARACTER target)
Check if target is enemy of source

CharacterIsAlly (CHARACTER source, CHARACTER target)
Check if target is ally of source

CharacterIsNeutral (CHARACTER source, CHARACTER target)
Check if target is neutral of source

CharacterIsDead (CHARACTER character)
Check if character is dead

CharacterIsSummon (CHARACTER character)
Check if character is a summon

CharacterIsStoryNPC (CHARACTER character)
Check if character is a story NPC

CharacterInWeaponRange (CHARACTER character, CHARACTER target)
Check if target is in the current's weapon range

CharacterInTouchRange (CHARACTER character, CHARACTER targetChar)
Check if target is in the character's touch range 

CharacterHasStatus (CHARACTER character, STATUS statusType[, FIXEDSTRING extraData])
Check if character currently has the status.
ExtraData can be filled in for some statuses:
 - Consume: statsid of the item
 - Shield: skillid of the shield

CharacterHasTalent (CHARACTER character, TALENT talent)
Check if character currently has the talent

CharacterHasWeaponType (CHARACTER character, WEAPON weaponTYPE)
Check if character currently has a weapon of this type in his inventory

CharacterGetStat (OUT FLOAT statValue, CHARACTER character, CHARACTERSTAT statType)
Returns the current value of the stat (Vitality, ...)

CharacterGetSightRange (OUT FLOAT range, CHARACTER character)
Returns the character's sight range

CharacterGetWeaponRange (OUT FLOAT minRange, OUT FLOAT maxRange, CHARACTER character)
Returns the character's current weapon range

CharacterGetTouchRange (OUT FLOAT touchRange, CHARACTER character)
Returns the character's current touch range

CharacterGetSkillRange (OUT FLOAT minRange, OUT FLOAT maxRange,CHARACTER character, SKILL skillId)
Returns the character's skill range

CharacterGetSkillImpactRange (OUT FLOAT areaRange, CHARACTER character, SKILL skillId)
Returns the character's skill range

CharacterIsInTrigger (CHARACTER character, TRIGGER trigger)
Check if character is in given trigger

CharacterGetFaction (OUT FIXEDSTRING faction, CHARACTER character)
Returns the character's faction

CharacterGetAbility (OUT INT value, CHARACTER character, ABILITY ability)
Returns the character's value of the specified ability

CharacterGetHostileCount (OUT INT value, CHARACTER character)
Returns how many characters are targeting this character right now... You can iterate over them with IterateEnemiesOf.

CharacterCanFight (CHARACTER character)
Returns true if the character can fight.

CharacterGetTemplate (CHARACTER character, OUT CHARACTERTEMPLATE root)
Returns the roottemplate of the character.

CharacterCanSpotSneakers (CHARACTER character)
Returns true if the character can spot sneaking characters

CharacterIsBoss (CHARACTER character)
Returns true if the character is tagged as a boss

CharacterIsFloating (CHARACTER character)
Check if character is a floating character

CharacterInCreation (CHARACTER character)
Returns true if the character is in character creation

CharacterAvoidsTraps (CHARACTER character)
Returns true if the character avoids traps

CharacterCheckRelation (CHARACTER character, RELATION relation)
Returns true if relation check succeeds

CharacterIsInGroup (CHARACTER character, STRING group)
Check if the character is in a certain dialog group

CharacterIsInActiveTurn (CHARACTER character)
Returns true if it's the character's turn in combat.

CharacterIsBetterOrEqualClass (CHARACTER character, INT currentScore, OUT INT newScore, INT warriorScore, INT rogueScore, INT mageScore, INT clericScore, INT rangerScore)
Returns true if score is higher or equal than the current score

CharacterHasBeenHitBy (CHARACTER character, DAMAGE_TYPE damageType)
Returns true if the character was hit by this type.

CharacterHasCastedSpellLastTurn (CHARACTER character)
Returns true if the character has casted a spell in his last turn.

CharacterHasHadStatus (CHARACTER character, STATUS status)
Returns true if the character has had a specific status this combat.

ItemGet (OUT ITEM item, GAMEOBJECT|FLOAT3 src, FLOAT range, COMPARE howTo, COMPAREFUNC compareFunc, FIXEDSTRING rootTemplate)
Get an item within a certain range conforming to the filled in restraints.

ItemGetFromInventory (OUT ITEM item, CHARACTER|ITEM object, FIXEDSTRING statsId)
Returns the first item in the inventory which matches the statsid

ItemGetStat (OUT FLOAT statValue, ITEM item, ITEMSTAT statType)
Returns the current value of the stat (Weight, ...)

ItemIsMoving (ITEM item)
Returns if the item is moving or not.

ItemIsFalling (ITEM item)
Returns if the item is falling or not. (after teleport)

ItemHasStatus (ITEM item, STATUS status)
Returns if the item has the status.

ItemIsDestroyed (ITEM item)
Returns if the item is destroyed.

ItemGetTemplate (ITEM item, OUT ITEMTEMPLATE root)
Returns the roottemplate of the item.

ItemGetSkillId (ITEM item, OUT SKILL root)
Returns the skillid of the item if it has one.
Community content is available under CC-BY-SA unless otherwise noted.