BG(2)EE Script Triggers

NT Returns true only if the current CRE obtained the specified item in the last script round.
Trigger appears to be broken?

Returns true only if the active CRE was attacked in the style specified (not necessarily hit) or had an offensive spell cast on it by the specified object in the last script round. The style parameter is non functional - this trigger is triggered by any attack style.
Note that the LastAttacker object is only set for physical attacks (i.e. spell and script damage does not set LastAttacker).

Returns true if the specified object shouted for Help() in the two script rounds. Help() has a range of approximately 40.

Returns true if the specified object has joined the party in the last script round. This trigger is only sent to player characters.

Returns true if the specified object has left the party in the last script round. This trigger is only sent to player characters.

This trigger is used in conjunction with the GiveOrder() action, and works in a similar way to the Heard() trigger. Only one creature at a time responds to an order, and creatures do not detect their own orders. The creature must be in visual range for this trigger to work.

NT

NT Returns true only if the active CRE was turned by the specified priest or paladin.

NT Returns true only if the specified item is unusable by the active CRE.

Returns true only if the alignment of the specified object matches that in the second parameter.

Returns true only if the Enemy/Ally status of the specified object matches that in the second parameter.

Returns true only if the Class of the specified object matches that in the second parameter.

Returns true only if the specified object exists in the current area (note that dead creatures can still be counted as existing).

Returns true only if the General category of the specified object matches that in the second parameter.

Returns true only if the variable with name 1st parameter of type 2nd parameter has value 3rd parameter.

Returns true only if the current hitpoints of the specified object are equal to the 2nd parameter.

Returns true only if the current hitpoints of the specified object are greater than the 2nd parameter.

Returns true only if the current hitpoints of the specified object are less than the 2nd parameter.

Returns true only if the object specified is in the line of sight of the active CRE and within the given range. This seems to be a combination of the Range() and See() triggers. Range seems limited to the default visual range (30).

Returns true only if the morale of the specified object is equal to the 2nd parameter.

Returns true only if the morale of the specified object is greater than the 2nd parameter.

Returns true only if the morale of the specified object is less than the 2nd parameter.

Returns true only if the Race of the specified object is the same as that specified by the 2nd parameter.

Returns true only if the specified object is within distance given (in feet) of the active CRE. Range seems limited to the default visual range (30), and does not bypass objects. Range is affected by foot circle size (e.g. the minimum range for a huge foot circle creature (Dragon) is 8). Melee range is 4.

Returns true only if the reputation of the specified object is equal to the 2nd parameter.

Returns true only if the reputation of the specified object is greater than the 2nd parameter.

Returns true only if the reputation of the specified object is less than the 2nd parameter.

Returns true only if the active CRE can see the specified object which must not be hidden or invisible.

Returns true only if the specifics (as set in the CRE file or by the ChangeSpecifics() action) of the specified object is equal to the 2nd parameter.

Returns true only if the period of day matches the period in the 2nd parameter (taken from TIME.IDS). Hours are offset by 30 minutes, e.g. Time(1) is true between 00:30 and 01:29.

As above but less specific and uses TIMEODAY.IDS.

Returns true only if the active CRE was hit by the specified object by the specified damage type in the last script round.
If the damage type is CRUSHING or 0, then this will return true for ANY damage type.
!HitBy() returns true when the script is first activated (e.g. initial area load) and when hit by any damage type.

Returns true only if the specified key was pressed in the last script round. Hotkeys defined in keymap.ini take precedence over hotkeys expected by this trigger.

Returns true only if the local timer with the specified ID has expired. This action does not work as a state or response trigger in dialogs.

Always returns true.

Used as a form of script communication, in conjunction with the SendTrigger() action. Seems to have the same range as GiveOrder(), and affects only one creature at once. The LastTrigger object does not get set after receiving a trigger.

Returns true if the active CRE has died in the last script round.
NB. When a block returns true to this trigger, this will be the final block executed in the script, unless it is Continue()'d.

NT Returns true only if the object specified cannot be reached by normal walking by the active CRE.

Delays the next check of the block of triggers where this trigger is, by the number of seconds specified. This value is not stored when the game is saved.

Returns true only if the number of creatures of the type specified in sight of the active CRE are equal to the 2nd parameter.

As above except for less than.

As above except for greater than.

Returns true only if the active CRE has no actions waiting to be performed, i.e. is idle.

See HP() except this is for a percentage.

See HPLT() except this is for a percentage.

See HPGT() except this is for a percentage.

Returns true only if the active CRE was within 30 feet of the specified object and the specified object shouted the specified number (which does not have to be in SHOUTIDS.IDS) in the last script round.
NB. If the object is specified as a death variable, the trigger will only return true if the corresponding object shouting also has an Enemy-Ally flag of NEUTRAL.

Never returns true, i.e. is always false. A block of triggers containing this will never return true regardless of the other triggers in the block. The corresponding actions will never take place.

Returns true only if the active CRE has the specified spell (either as symbolic value or resource string) memorised.

Returns true if the active CRE has at least one spell memorised.

NT Returns true only if the active CRE turned visible in the last script round.

See Global() except the variable must be greater than the value specified to be true.

As above except for less than.

Returns true if the script is processed for the first time this session, e.g. when a creature is created (for CRE scripts) or when the player enters an area (for ARE scripts).

Returns true only if the specified object is in the state specified.

Exact opposite of above.

Returns true only if the player's party has spoken to the active CRE the exact number of times specified.
NB. NumTimesTalkedTo() seems to increment when a PC initiates conversation with an NPC, or an NPC initiates conversation with a PC. NumTimesTalkedTo() does not seem to increment for force-talks, interactions, interjections and self-talking.

Returns true only if the player's party has spoken to the active CRE more than the number of times specified.

Returns true only if the player's party has spoken to the active CRE less than the number of times specified.

Returns true only if the reaction of the object specified (on the friendly-hostile scale) to the player was as specified.
NB. Reaction = 10 + rmodchr + rmodrep (see rmodchr.2da and rmodrep.2da).

Returns true only if the reaction of the object specified (on the friendly-hostile scale) to the player was greater than specified.
NB. Reaction = 10 + rmodchr + rmodrep (see rmodchr.2da and rmodrep.2da).

Returns true only if the reaction of the object specified (on the friendly-hostile scale) to the player was lower than specified.
NB. Reaction = 10 + rmodchr + rmodrep (see rmodchr.2da and rmodrep.2da).

NT.

Returns true only if the timer with the name specified and of the type in the 2nd parameter has run and expired.

Returns true only if the timer with the name specified and of the type in the 2nd parameter is still running.
Note that if we use !GlobalTimerNotExpired(S:Name*,S:Area*) this will return true if the timer has never been set OR if it has already expired – very useful... most useful of all the GlobalTimer triggers :) .

Returns true if any of the party members have the specified item in their inventory. This trigger also checks with container items (e.g. Bags of Holding).

Returns true only if the specifed object is in the player's party.

Returns true only if the specifed object has the statistic in the 3rd parameter at the value of the 2nd parameter.

Returns true only if the specifed object has the statistic in the 3rd parameter greater than the value of the 2nd parameter.

Returns true only if the specifed object has the statistic in the 3rd parameter less than the value of the 2nd parameter.

Generates a random number between 1 and Range. Returns true only if the random number equals the 2nd parameter.

NT As above except returns true only if the random number is greater than the 2nd parameter.

NT As above except returns true only if the random number is less than the 2nd parameter.

Returns true only if the specified object died in the last script round.

NT Returns true if the active CRE killed the specified object in the last script round.

Only for trigger regions in areas. Returns true only if the specified object entered the trigger region in the last script round.

Returns true only if the gender of the specified object is that given in the 2nd parameter.

Returns true only if the player's party has the amount of gold specified in the 2nd parameter.

Returns true only if the player's party has more gold than specified in the 2nd parameter.

Returns true only if the player's party has less gold than specified in the 2nd parameter.

Returns only true if the creature with the specified script name has its death variable set to 1. Not every form of death sets this, but most do. So it's an almost complete test for death. The creature must have existed for this to be true. Note that SPRITE_IS_DEAD variables are not set if the creaure is killed by a neutral creature.

Only for door scripts. Returns true only if the specified object opened the active door in the last script round.

Only for door scripts. Returns true only if the specified object closed the active door in the last script round.

Only for door scripts. Returns true only if the specified object detected this trap in the last script round.

NT Only for trap scripts? Returns true only if this trap or trigger was reset in the last script round by the object specified.

Only for trap/trigger region scripts. Returns true only if the specified object disarmed this trap in the last script round.

Only for door scripts – returns true only if this door was unlocked by the specified object in the last script round.
Appears to be broken.

Seems to be broken. Returns true only if the active CRE has no ammunition for the current ranged weapon.

NT Returns true only if the specified NPC has interacted with the party a number of times equal to the 2nd parameter.

NT Returns true only if the specified NPC has interacted with the party a number of times greater than the 2nd parameter.

NT Returns true only if the specified NPC has interacted with the party a number of times less than the 2nd parameter.

Checks the current creature's happiness value. Note that this trigger is only evaluated when the happiness value is checked (at all other times this trigger returns false).

Checks if a pickpocket attempt on the specified creature has failed in the last script round.

For shopkeepers. Returns true if the specified object failed to steal from the shop in the last script round.

NT Not used in any existing scripts.

NT Not used in any existing scripts.

Returns true only if the specified object has the specified item in its inventory. This trigger also checks with container items (e.g. Bags of Holding).

NT Returns true only if the active CRE is interacting (dialogue?) with the specified object.

Returns true only if the specified object is within the range of the active CRE's currently equipped weapon.

Returns true only if the specified object has a weapon in a quickslot.

NT Returns true only if the specified object has the specified happiness value.

NT Returns true only if the happiness of the specified object is greater than the specified value.

NT Returns true only if the happiness of the specified object is less than the specified value.

Returns true only if the current time is greater than that specified. Hours are offset by 30 minutes, e.g. TimeGT(1) is true between 01:30 and 02:29.

Returns true only if the current time is less than that specified. Hours are offset by 30 minutes, e.g. TimeLT(1) is true between 23:30 and 00:29.

Returns true only if the number of party members (dead ones also count) is equal to the number specified.

Returns true only if the number of party members (dead ones also count) is greater than the number specified.

Returns true only if the number of party members (dead ones also count) is less than the number specified.

Returns true only if the active creature is for exactly the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode #365. Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

Returns true only if the active creature is for more than the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode #365. Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

Returns true only if the active creature is for less than the specified number of ticks (1/15th seconds) left under the effect of the script action MakeUnselectable() or opcode #365. Note: By default in BG2EE creatures stop processing scripts while under effect of the script action MakeUnselectable().

Only for trigger regions. Returns true if the specified object clicked on the trigger region running this script.

Returns true only if the number of creatures with script name "Name" that have been killed is equal to the 2nd parameter.

Returns true only if the number of creatures with script name "Name" that have been killed is greater than the 2nd parameter.

Returns true only if the number of creatures with script name "Name" that have been killed is less than the 2nd parameter.

Returns true if the the specified object is detected by the active CRE in any way (hearing or sight). Neither Move Silently nor Hide in Shadows prevent creatures from being detected via Detect(). Detect ignores Protection from Creature Type effects for static objects.

Returns true only if the item specified in parameter 1 is in the container specified in parameter 2.

NT Returns true only if the open state of the specified door matches the state specified in the 2nd parameter.

Returns true only if the specified object has the number of items in the 3rd parameter of the type specified in the 1st parameter in its inventory.

Returns true only if the specified object has more than the number of items in the 3rd parameter of the type specified in the 1st parameter in its inventory.

Returns true only if the specified object has fewer than the number of items in the 3rd parameter of the type specified in the 1st parameter in its inventory.

Returns true only if the party has a total number of items of the type specified equal to the 2nd parameter.

Returns true only if the party has a total number of items of the type specified greater than the 2nd parameter.

Returns true only if the party has a total number of items of the type specified less than the 2nd parameter.

Only for trigger regions. Returns true only if the specified object is over the trigger running the script.

Returns true only if the active CRE is in the area specified.

Returns true if the specified object has the specified item in one of its quicklots if it is a weapon, or has it equipped if it is a piece of armour or an amulet etc. This trigger does not work for Melf's Minute Meteors.

Returns true if the number of hostile creatures of the type specified in the 1st parameter that are currently in fighting range of the party, minus the number of party members, is equal to the 2nd parameter.

Returns true if the number of hostile creatures of the type specified in the 1st parameter that are currently in fighting range of the party, minus the number of party members, is less than the 2nd parameter.

Returns true if the number of hostile creatures of the type specified in the 1st parameter that are currently in fighting range of the party, minus the number of party members, is greater than the 2nd parameter.

This trigger may not work as expected.
Returns true only if the combat counter (counts down from 150 after each attack) is of the value specified. CombatCounter(0) returns true only if there is no combat in the active area at the moment. CombatCounter() can give false results after dialog has been completed or after a Hide in Shadows check has been failed.

Returns true only if the combat counter (counts down from 150 after each attack) is less than the value specified.

This trigger does not work as expected.
Returns true only if the combat counter (counts down from 150 after each attack) is greater than the value specified. CombatCounterGT(0) returns true if there is any combat going on in the active area.

Returns true only if the area in which the active CRE is, has the specified type flag set. Note that the value is OR'd. This trigger can cause a crash if it evaluates to true and is used as the first trigger in a dead NPCs dream script.

NT Only for trigger regions/traps. Returns true if this trap was triggered by the object specified.

NT Returns true only if the party member specified died in the last script round.

Returns true if any (i.e., at least one) of the next 'OrCount' triggers returns true.

Returns true only if the specified object is in the party and in the slot specified (slots are 0-5). Party slots are based on join order; Player1 is in slot 0, Player2 in slot 1 etc.

Returns true only if the specified object cast the spell in the 2nd paramater in the last script round. If the Spell parameter is 0, then this will return true for ANY spell cast.

Seems to have no effect.
InLine(O:Object*) returns true if the active creature can see the target creature.

Returns true if the party has just finished resting.

Returns true only if the experience level of the specified object equals the 2nd parameter.

Returns true only if the experience level of the specified object is greater than the 2nd parameter.

Returns true only if the experience level of the specified object is less than the 2nd parameter.

NT Returns true only if the active CRE summoned the specified object in the last script round.

Returns true only if the 2 global variables specified have equal values.

Returns true only if the 1st global variable has a value greater than the 2nd one.

Returns true only if the 1st global variable has a value less than the 2nd one.

Returns true only if the 2 local variables specified have equal values.

Returns true only if the 1st local variable has a value greater than the 2nd one.

Returns true only if the 1st local variable has a value less than the 2nd one.

Returns true only if the specified object has no actions waiting to be performed.

Returns true only if the specified object is on the screen.

Returns true only if specified object is in the active area. The active area is that in which Player1 is. This trigger will crash the game if the specified creature is not in the active area and is not a global object.

Returns true only if the specified object cast the specified spell on the active CRE in the last script round. If the Spell parameter is 0 (or "" for the RES version), then this will return true for ANY spell cast. Returns false for spells whose Ability target (offset 0xC) is 4 (Any point within range).

NT Returns true only if the current day is the day specified.

NT Returns true only if the current day is after the day specified.

NT Returns true only if the current day is before the day specified.

Returns true only if the object in the 2nd parameter has the script name specified.

Returns true only if the specified object cast the specified priest spell in the last script round.

Returns true only if the specified object cast the specified innate spell in the last script round.
NB. The spell level must match the spell's definition (in SPELL.IDS) for the trigger to return true.

Returns true only if that specifed party member can take part in party dialogue.

Returns true only if the party has the item specified and it is identified.


0x40B1 HasImmunityEffects(O:Object*)
Returns true if any of the specified object is currently affected by any of the listed effects:

0x40B2 HasItemSlot(O:Object*,I:Slot*SLOTS)
NT Returns true only if the specified object has an item in the specified slot. This trigger does not work for Melf's Minute Meteors.

0x40B3 PersonalSpaceDistance(O:Object*,I:Range*)
NT Returns true if the specified object exactly as far away from the active CRE as the 2nd parameter specifies.

0x40B4 InMyGroup(O:Object*)
Returns true only if the specifics value of the specified object is the same as that of the active CRE.

0x40B5 RealGlobalTimerExact(S:Name*,S:Area*)
NT

0x40B6 RealGlobalTimerExpired(S:Name*,S:Area*)
NT Returns true only if the timer with the specified name of the specified area has been set at least once and has now expired.

0x40B7 RealGlobalTimerNotExpired(S:Name*,S:Area*)
NT Returns true only if the timer with the specified name of the specified area has been set and has not yet expired.

0x40B8 NumInPartyAlive(I:Num*)
Returns true only if the number of party members alive is equal to the number specified.

0x40B9 NumInPartyAliveGT(I:Num*)
Returns true only if the number of party members alive is greater than the number specified.

0x40BA NumInPartyAliveLT(I:Num*)
Returns true only if the number of party members alive is less than the number specified.

0x40BB Kit(O:Object*,I:Kit*KIT)
NT Returns true only if the specified object is of the kit specified.

0x40BC IsGabber(O:Object*)
Returns true only if the specified object is the current speaker (in a dialog).

0x40BD IsActive(O:Object*)
Returns true if the specified creature is active and false if it is deactivated. A creature will continue to execute script blocks even while deactivated - this trigger can be used to restrict this behaviour.

0x40BE CharName(S:Name*,O:Object*)
NT Returns true only if the specified object has the character name specified.

0x40BF FallenRanger(O:Object*)
NT Returns true only if the specified object is a fallen ranger.

0x40C0 FallenPaladin(O:Object*)
NT Returns true only if the specified object is a fallen ranger.

0x40C1 InventoryFull(O:Object*)
Returns true only if the specified object can carry no more items.

0x40C2 HasItemEquipedReal(S:ResRef*,O:Object*)
Returns true only if the specified object has the specified item equipped and it is in use. This trigger does not work for Melf's Minute Meteors.

0x40C3 XP(O:Object*,I:XP)
Returns true if the specified object has experience points equal to the number specified.

0x40C4 XPGT(O:Object*,I:XP)
Returns true if the specified object has experience points greater than the number specified.

0x40C5 XPLT(O:Object*,I:XP)
Returns true if the specified object has experience points less than the number specified.

0x40C6 G(S:ResRef*,I:Num*)
This trigger acts as a shortcut for Global(). The trigger can only check global variables.

0x40C7 GGT(S:ResRef*,I:Num*)
This trigger acts as a shortcut for GlobalGT(). The trigger can only check global variables.

0x40C8 GLT(S:ResRef*,I:Num*)
This trigger acts as a shortcut for GlobalLT(). The trigger can only check global variables.

0x40C9 ModalState(I:State*MODAL)
Returns true only if the active CRE is in the state/mode specified. e.g. detecting traps.

0x40CB InMyArea(O:Object*)
Returns true only if the specified object is in the same area as the active CRE.

0x00CC TookDamage()
Returns true if some type of damage was caused to the active CRE (and HP were lost) in the last script round.

0x40CD DamageTaken(I:Amount*)
Returns true if the total damage taken by the active CRE is of the amount specified. Think of this as the reverse of testing for HP. See HP.

0x40CE DamageTakenGT(I:Amount*)
See above and HPGT.
Note: This trigger may not act correctly until the active creature has dropped below their maximum base HP (i.e. without CON bonus taken into account).

0x40CF DamageTakenLT(I:Amount*)
See above and HPLT.

0x40D0 Difficulty(I:Amount*DIFFLEV)
NT Returns true only if the game difficulty setting is of the level specified.

0x40D1 DifficultyGT(I:Amount*DIFFLEV)
NT Returns true only if the game difficulty setting is greater than the level specified.

0x40D2 DifficultyLT(I:Amount*DIFFLEV)
NT Returns true only if the game difficulty setting is less than the level specified.

0x40D3 InPartyAllowDead(O:Object*)
NT Returns true if the specified object which can be dead or alive is in the party.

0x40D4 AreaCheckObject(S:ResRef*,O:Object*)
Returns true if the specified object is in the area specified.

0x40D5 ActuallyInCombat()
Returns true if combat counter is greater than 0.
Confirmed as working in SoA.

0x00D6 WalkedToTrigger(O:Object*)
NT Only for trigger regions. Returns true if the specified object has walked to this trigger.

0x40D7 LevelParty(I:Num*)
Returns true only if the average level of the party is equal to the number specified. Only the highest level of dual/multi-class characters is taken into account.

0x40D8 LevelPartyGT(I:Num*)
Returns true only if the average level of the party is greater than the number specified. Only the highest level of dual/multi-class characters is taken into account.

0x40D9 LevelPartyLT(I:Num*)
Returns true only if the average level of the party is less than the number specified. Only the highest level of dual/multi-class characters is taken into account.

0x40DA HaveSpellParty(I:Spell*Spell)
Returns true if any of the party members have the specified spell memorised.

0x40DB AmIInWatchersKeepPleaseIgnoreTheLackOfApostophe()
Returns true only if the active CRE is in a Watcher's Keep (i.e. the current area begins with AR30).

0x40DB InWatchersKeep()
Returns true only if the active CRE is in a Watcher's Keep (i.e. the current area begins with AR30).

0x40DC AreaCheckAllegiance(I:Allegience*EA)
This trigger will check if any creatures of the specified allegiance are present in the current area.

0x40DD IsTouchGUI()
Returns true only if the current device has touch screen capability.

0x40DE HasDLC(S:DLCName*)
Returns true if the DLC specified by the DLCName parameter has been purchased. Note: Returns true on PC/Mac/Linux as all DLCs are automatically available.

0x40DF BeenInParty(S:Name*)
Returns true if the specified creature has been in the party at any point.

0x40E0 NextTriggerObject(O:Object*)
Defines the object that the next trigger will be evaluated in reference to. This trigger does not evaluate and does not count as a trigger in an OR() block. If the object cannot be found, the next trigger will evaluate to false. It will even break the OR() trigger if you don't put it in there last in the entire condition section. WeiDU adds a shorthand notation in the form of TriggerOverride(object, trigger) that merges this and the target trigger into a single line.

0x40E1 ExtendedStateCheck(O:Object*,I:State*extstate)
Returns true only if the specified object is in the state specified (uses EXTSTATE.IDS).

0x40E2 CheckSpellState(O:Object*,I:State*splstate)
Returns true only if the specified object is in the state specified (uses SPELLSTATE.IDS). Spell states can be set via opcode 328.

0x40E3 NearLocation(O:Object*,I:PointX*,I:PointY*,I:Range*)
Returns true if the specified object is within the range of the specified point. Works similar to Range, but with a point instead of an object.

0x40E4 NearSavedLocation(O:Object*,S:Global*,I:Range*)
Returns true if the object is near its home location (in case the specified variable doesn't exist) or near a point marked by a variable. The default home location for creatures is equal to their default position in the ARE file.

0x40E5 Switch(S:Global*,S:Area*)
The switch trigger can be used to change how the RESPONSE # sections are evaluated. Using this trigger causes the RESPONSE sections to evaluate the global specified by the 1st parameter in the scope defined by the 2nd parameter.

0x40E6 IsWeaponRanged(O:Object*)
Returns true if a ranged weapon (i.e. bow or thrown axe) is currently equipped and selected on the specified object.

0x40E7 ButtonDisabled(I:Button*BUTTON)
Returns true if the specified interface button is disabled.

0x40E8 HasItemCategory(O:Object*,I:Itemtype*ITEMCAT,I:Equipped*BOOLEAN)
Returns true if the target object has one or more items of the specified item category in their inventory. The 3rd parameter defines whether the item has to be equipped as well.

0x40E9 NightmareModeOn()
Returns true if Nightmare Mode is active (aka "Legacy of Bhaal" mode in BGEE/BG2EE or "Heart of Fury" mode in IWDEE).

0x40EA OriginalClass(O:Object*,I:Class*CLASS)
Returns true if the original class of a dual-classed creature equals the class specified in the 2nd parameter.

0x00EB CutSceneBroken()
Returns true if a breakable cutscene has been terminated by the user.

0x40EC WeaponEffectiveVs(O:Object*,I:Hand*HAND)
Returns true if the weapon equipped in the hand defined by the 2nd parameter of the active creature can hit the target object specified in the 1st parameter.

0x40ED INI(S:Name*,I:Number*)
Returns true if the baldur.lua contains the entry SetPrivateProfileString('Script','Name','Number'). 'Script' is the fixed section name. 'Name' and 'Number' are checked by the script trigger.

0x40EE reserved1()
NT

0x40EF reserved2()
NT

0x40F0 reserved3()
NT

0x40F1 ModalStateObject(O:Object*,I:ModalState*Modal)
Returns true only if the specified object is in the state/mode specified. e.g. detecting traps.

0x40F2 WeaponCanDamage(O:Object*,I:Hand*HAND)
Returns true if the weapon equipped in the hand defined by the 2nd parameter of the active creature can cause non-zero damage to the target object specified in the 1st parameter.

0x40F3 NumKilledByParty(I:Number*)
Returns true if the total count of killed creatures by the party equals the specified number.

0x40F4 NumKilledByPartyGT(I:Number*)
Returns true if the total count of killed creatures by the party is greater than the specified number.

0x40F5 NumKilledByPartyLT(I:Number*)
Returns true if the total count of killed creatures by the party is less than the specified number.

0x40F6 CanTurn(O:Object*,I:Difference*)
Returns true if the active CRE can turn the (undead) target object with a level difference equal to or greater than the value specified in the 2nd parameter.

0x40F7 BitCheck(S:Name*,S:Area*,I:Bit*Bits)
Returns true if at least one bit from the given variable is in common with the bits defined in the third parameter.

0x40F8 CanEquipRanged()
Returns true only if the active creature can switch to a ranged weapon that is ready for use (e.g. a throwing weapon, such as darts, or a launcher with corresponding ammo, such as bow and arrow).

0x40F9 ImmuneToSpellLevel(O:Object*,I:Level*)
Returns true if the specified object is immune to spells of the level specified by the 2nd parameter.

0x40FA StoryModeOn()
Returns true if Story Mode is active.

0x40FB IsForcedRandomEncounterActive(S:Area*)
Returns true only if a random encounter to the specified area has been initialized by a preceding call of ForceRandomEncounter() or ForceRandomEncounterEntry().

0x40FC reserved()
NT

0x40FD ClassLevel(O:Object*,I:Category*CLASSCAT,I:Value*)
Returns true only if the experience level of the specified object in the class denoted by the 2nd parameter equals the 3rd parameter.

0x40FE ClassLevelGT(O:Object*,I:Category*CLASSCAT,I:Value*)
Returns true only if the experience level of the specified object in the class denoted by the 2nd parameter is greater than the 3rd parameter.

0x40FF ClassLevelLT(O:Object*,I:Category*CLASSCAT,I:Value*)
Returns true only if the experience level of the specified object in the class denoted by the 2nd parameter is less than the 3rd parameter.

0x4100 SecretDoorDetected(O:Object*,I:Open*BOOLEAN)
Returns true only if the hidden door specified by the 1st parameter has been detected, and its opened state equals the 2nd parameter.

0x0101 reserved()
NT

0x4102 HaveKnownSpell(I:Spell*Spell)
0x4102 HaveKnownSpellRES(S:Spell*)
Returns true if the active CRE has the specified spell scribed in their spellbook. It does not have to be memorised.

0x4103 CheckItemSlot(O:Object*,S:Item*,I:Slot*SLOTS)
Returns true only if the item specified in the 2nd parameter can be found in the inventory slot (taken from SLOTS.IDS) of the specified object.

0x4104 CurrentAmmo(S:ResRef*,O:Object*)
Returns true only if the specified object has a ranged weapon with the ammo specified by ResRef equipped.

0x4105 reserved()
NT

0x4106 reserved()
NT

0x4107 reserved()
NT

0x4108 reserved()
NT

0x4109 reserved()
NT

0x410A Proficiency(O:Object*,I:Slot*WProf,I:Value*)
Returns true only if the proficiency level of the specified object in the weapon denoted by the second parameter is equal to the third parameter.

0x410B ProficiencyGT(O:Object*,I:Slot*WProf,I:Value*)
Returns true only if the proficiency level of the specified object in the weapon denoted by the second parameter is greater than the third parameter.

0x410C ProficiencyLT(O:Object*,I:Slot*WProf,I:Value*)
Returns true only if the proficiency level of the specified object in the weapon denoted by the second parameter is less than the third parameter.