BG(2)EE Script Triggers

0x0001 Acquired(S:ResRef*)
NT Returns true only if the current CRE obtained the specified item in the last script round.
Trigger appears to be broken?

0x0002 AttackedBy(O:Object*,I:Style*AStyles)
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).

0x0003 Help(O:Object*)
Returns true if the specified object shouted for Help() in the two script rounds. Help() has a range of approximately 40.

0x0004 Joins(O:Object*)
Returns true if the specified object has joined the party in the last script round. This trigger is only sent to player characters.

0x0005 Leaves(O:Object*)
Returns true if the specified object has left the party in the last script round. This trigger is only sent to player characters.

0x0006 ReceivedOrder(O:Object*,I:Order ID*)
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.

0x0007 Said(O:Object*,I:Dialog ID*)
NT

0x0008 TurnedBy(O:Object*)
NT Returns true only if the active CRE was turned by the specified priest or paladin.

0x0009 Unusable(S:ResRef*)
NT Returns true only if the specified item is unusable by the active CRE.

0x400A Alignment(O:Object*,I:Alignment*Align)
Returns true only if the alignment of the specified object matches that in the second parameter.

0x400B Allegiance(O:Object*,I:Allegience*EA)
Returns true only if the Enemy/Ally status of the specified object matches that in the second parameter.

0x400C Class(O:Object*,I:Class*Class)
Returns true only if the Class of the specified object matches that in the second parameter.

0x400D Exists(O:Object*)
Returns true only if the specified object exists in the current area (note that dead creatures can still be counted as existing).

0x400E General(O:Object*,I:General*General)
Returns true only if the General category of the specified object matches that in the second parameter.

0x400F Global(S:Name*,S:Area*,I:Value*)
Returns true only if the variable with name 1st parameter of type 2nd parameter has value 3rd parameter.

0x4010 HP(O:Object*,I:Hit Points*)
Returns true only if the current hitpoints of the specified object are equal to the 2nd parameter.

0x4011 HPGT(O:Object*,I:Hit Points*)
Returns true only if the current hitpoints of the specified object are greater than the 2nd parameter.

0x4012 HPLT(O:Object*,I:Hit Points*)
Returns true only if the current hitpoints of the specified object are less than the 2nd parameter.

0x4013 LOS(O:Object*,I:Range*)
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 (see below). Range seems limited to the default visual range (30).

0x4014 Morale(O:Object*,I:Morale*)
Returns true only if the morale of the specified object is equal to the second parameter.

0x4015 MoraleGT(O:Object*,I:Morale*)
Returns true only if the morale of the specified object is greater than thesecond parameter.

0x4016 MoraleLT(O:Object*,I:Morale*)
Returns true only if the morale of the specified object is less than the second parameter.

0x4017 Race(O:Object*,I:Race*Race)
Returns true only if the Race of the specified object is the same as that specified by the 2nd parameter.

0x4018 Range(O:Object*,I:Range*)
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.

0x4019 Reputation(O:Object*,I:Reputation*)
Returns true only if the reputation of the specified object is equal to the second parameter.

0x401A ReputationGT(O:Object*,I:Reputation*)
Returns true only if the reputation of the specified object is greater than the second parameter.

0x401B ReputationLT(O:Object*,I:Reputation*)
Returns true only if the reputation of the specified object is greater than the second parameter.

0x401C See(O:Object*)
Returns true only if the active CRE can see the specified object which must not be hidden or invisible.

0x401D Specifics(O:Object*,I:Specifics*Specific)
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.

0x401E Time(I:Time*Time)
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.

0x401F TimeOfDay(I:Time Of Day*TimeODay)
As above but less specific and uses TimeODay.ids.

0x0020 HitBy(O:Object*,I:DameType*Damages)
Returns true only if the active CRE was hit by the specifed 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.

0x0021 HotKey(I:Key*HotKey)
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.

0x0022 TimerExpired(I:ID*)
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.

0x4023 True()
Always returns true.

0x0024 Trigger(I:TriggerNum*)
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.

0x0025 Die()
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

0x0026 TargetUnreachable(O:Object*)
NT Returns true only if the object specified cannot be reached by normal walking by the active CRE.

0x4027 Delay(I:Delay*)
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.

0x4028 NumCreature(O:Object*,I:Number*)
Returns true only if the number of creatures of the type specified in sight of the active CRE are equal to the 2nd parameter.

0x4029 NumCreatureLT(O:Object*,I:Number*)
As above except for less than.

0x402A NumCreatureGT(O:Object*,I:Number*)
As above except for greater than.

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

0x402C HPPercent(O:Object*,I:Hit Points*)
See HP(O:Object*,I:Hit Points*) except this is for a percentage.

0x402D HPPercentLT(O:Object*,I:Hit Points*)
See HPLT(O:Object*,I:Hit Points*) except this is for a percentage.

0x402E HPPercentGT(O:Object*,I:Hit Points*)
See HPGT(O:Object*,I:Hit Points*) except this is for a percentage.

0x002F Heard(O:Object*,I:ID*SHOUTIDS)
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.

0x4030 False()
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.

0x4031 HaveSpell(I:Spell*Spell)
0x4031 HaveSpellRES(S:Spell*)
Returns true only if the active CRE has the specified spell (either as symbolic value or resource string) memorised.

0x4032 HaveAnySpells()
Returns true if the active CRE has at least one spell memorised.

0x0033 BecameVisible()
NT Returns true only if the active CRE turned visible in the last script round.

0x4034 GlobalGT(S:Name*,S:Area*,I:Value*)
See Global(S:Name*,S:Area*,I:Value*) except the variable must be greater than the value specified to be true.

0x4035 GlobalLT(S:Name*,S:Area*,I:Value*)
As above except for less than.

0x0036 OnCreation()
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).

0x4037 StateCheck(O:Object*,I:State*State)
Returns true only if the specified object is in the state specified.

0x4038 NotStateCheck(O:Object*,I:State*State)
Exact opposite of above.

0x4039 NumTimesTalkedTo(I:Num*)
0x4039 NumberOfTimesTalkedTo(I:Num*)
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 PCinitiates conversion 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.

0x403A NumTimesTalkedToGT(I:Num*)
Returns true only if the player's party has spoken to the active CRE more than the number of times specified.

0x403B NumTimesTalkedToLT(I:Num*)
Returns true only if the player's party has spoken to the active CRE less than the number of times specified.

0x403C Reaction(O:Object*,I:Value*Reaction)
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).

0x403D ReactionGT(O:Object*,I:Value*Reaction)
Returns true 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).

0x403E ReactionLT(O:Object*,I:Value*Reaction)
Returns true 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).

0x403F GlobalTimerExact(S:Name*,S:Area*)
NT

0x4040 GlobalTimerExpired(S:Name*,S:Area*)
Returns true only if the timer with the name specified and of the type in the 2nd parameter has run and expired.

0x4041 GlobalTimerNotExpired(S:Name*,S:Area*)
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 :) .

0x4042 PartyHasItem(S:Item*)
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).

0x4043 InParty(O:Object*)
Returns true only if the specifed object is in the player's party.

0x4044 CheckStat(O:Object*,I:Value*,I:StatNum*Stats)
Returns true only if the specified object has the statistic in the 3rd parameter at the value of the 2nd parameter.

0x4045 CheckStatGT(O:Object*,I:Value*,I:StatNum*Stats)
Returns true only if the specified object has the statistic in the 3rd parameter greater than the value of the 2nd parameter.

0x4046 CheckStatLT(O:Object*,I:Value*,I:StatNum*Stats)
Returns true only if the specified object has the statistic in the 3rd parameter less than the value of the 2nd parameter.

0x4047 RandomNum(I:Range*,I:Value*)
Generates a random number between 1 and Range. Returns true only if the random number equals the 2nd parameter.

0x4048 RandomNumGT(I:Range*,I:Value*)
NT As above except returns true only if the random number is greater than the 2nd parameter.

0x4049 RandomNumLT(I:Range*,I:Value*)
NT As above except returns true only if the random number is less than the 2nd parameter.

0x004A Died(O:Object*)
Returns true only if the specifed object died in the last script round.

0x004B Killed(O:Object*)
NT Returns true if the active CRE killed the specified object in the last script round.

0x004C Entered(O:Object*)
Only for trigger regions in areas. Returns true only if the specified object entered the trigger region in the last script round.

0x404D Gender(O:Object*,I:Sex*Gender)
Returns true only if the gender of the specified object is that given in the 2nd parameter.

0x404E PartyGold(I:Amount*)
Returns true only if the player's party has the amount of gold specified in the 2nd parameter.

0x404F PartyGoldGT(I:Amount*)
Returns true only if the player's party has more gold than specified in the 2nd parameter.

0x4050 PartyGoldLT(I:Amount*)
Returns true only if the player's party has less gold than specified in the 2nd parameter.

0x4051 Dead(S:Name*)
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.

0x0052 Opened(O:Object*)
Only for door scripts. Returns true only if the specified object opened the active door in the last script round.

0x0053 Closed(O:Object*)
Only for door scripts. Returns true only if the specified object closed the active door in the last script round.

0x0054 Detected(O:Object*)
Only for trap scripts. Returns true only if the specified object detected this trap in the last script round.

0x0055 Reset(O:Object*)
NT Only for trap scripts? Returns true only if this trap or trigger was reset in the last script round by the object specified.

0x0056 Disarmed(O:Object*)
Only for trap/trigger region scripts. Returns true only if the specified object disarmed this trap in the last script round.

0x0057 Unlocked(O:Object*)
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.

0x4058 OutOfAmmo()
0x4058 HaveUsableWeapon()
Seems to be broken. Returns true only if the active CRE has no ammunition for the current ranged weapon.

0x4059 NumTimesInteracted(I:NPC*NPC,I:Num*)
NT Returns true only if the specified NPC has interacted with the party a number of times equal to the 2nd parameter.

0x405A NumTimesInteractedGT(I:NPC*NPC,I:Num*)
NT Returns true only if the specified NPC has interacted with the party a number of times greater than the 2nd parameter.

0x405B NumTimesInteractedLT(I:NPC*NPC,I:Num*)
NT Returns true only if the specified NPC has interacted with the party a number of times less than the 2nd parameter.

0x005C BreakingPoint()
Checks the current creatures happiness value. Note that this trigger is only evaluated when the happiness value is checked (at all other times this trigger returns false).

0x005D PickPocketFailed(O:Object*)
Checks if a pickpocket attempt on the specified creature has failed in the last round.

0x005E StealFailed(O:Object*)
For shopkeepers. Returns true if the specified object failed to steal from the shop in the last script round.

0x005F DisarmFailed(O:Object*)
NT Not used in any existing scripts.

0x0060 PickLockFailed(O:Object*)
NT Not used in any existing scripts.

0x4061 HasItem(S:ResRef*,O:Object*)
0x4061 HasItemType(O:Object*,I:Type*ITEMFLAG,I:IgnoreDestructible*BOOLEAN)
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).

0x4062 InteractingWith(O:Object*)
NT Returns true only if the active CRE is interacting (dialogue?) with the specified object.

0x4063 InWeaponRange(O:Object*)
Returns true only if the specified object is within the range of the active CRE's currently equipped weapon.

0x4064 HasWeaponEquiped(O:Object*)
Returns true only if the specified object has a weapon in a quickslot.

0x4065 Happiness(O:Object*,I:Amount*Happy)
NT Returns true only if the specified object has the specified happiness value.

0x4066 HappinessGT(O:Object*,I:Amount*Happy)
NT Returns true only if the specified object has greater than the specified happiness value.

0x4067 HappinessLT(O:Object*,I:Amount*Happy)
NT Returns true only if the specified object has less than the specified happiness value.

0x4068 TimeGT(I:Time*Time)
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.

0x4069 TimeLT(I:Time*Time)
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.

0x406A NumInParty(I:Num*)
Returns true only if the number of party members (dead ones also count) is equal to the number specified.

0x406B NumInPartyGT(I:Num*)
Returns true only if the number of party members (dead ones also count) is greater than the number specified.

0x406C NumInPartyLT(I:Num*)
Returns true only if the number of party members (dead ones also count) is less than the number specified.

0x406D UnselectableVariable(I:Num*)
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().

0x406E UnselectableVariableGT(I:Num*)
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().

0x406F UnselectableVariableLT(I:Num*)
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().

0x0070 Clicked(O:Object*)
Only for trigger regions. Returns true if the specified object clicked on the trigger region running this script.

0x4071 NumDead(S:Name*,I:Num*)
Returns true only if the number of creatures with script name "Name" that have been killed is equal to the 2nd parameter.

0x4072 NumDeadGT(S:Name*,I:Num*)
Returns true only if the number of creatures with script name "Name" that have been killed is greater than the 2nd parameter.

0x4073 NumDeadLT(S:Name*,I:Num*)
Returns true only if the number of creatures with script name "Name" that have been killed is less than the 2nd parameter.

0x4074 Detect(O:Object*)
Returns true if the the specified object is detected by the active CRE in any way (hearing or sight). Neither Move Silently and Hide in Shadows prevent creatures being detected via Detect(). Detect ignores Protection from Creature type effects for static objects.

0x4075 Contains(S:ResRef*,O:Object*)
Returns true only if the item specified in parameter 1 is in the container specified in parameter 2.

0x4076 OpenState(O:Object*,I:Open*BOOLEAN)
NT Returns true only if the open state of the specified door matches the state specified in the 2nd parameter.

0x4077 NumItems(S:ResRef*,O:Object*,I:Num*)
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.

0x4078 NumItemsGT(S:ResRef*,O:Object*,I:Num*)
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.

0x4079 NumItemsLT(S:ResRef*,O:Object*,I:Num*)
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.

0x407A NumItemsParty(S:ResRef*,I:Num*)
Returns true only if the party has a total number of items of the type specified equal to the 2nd parameter.

0x407B NumItemsPartyGT(S:ResRef*,I:Num*)
Returns true only if the party has a total number of items of the type specified greater than the 2nd parameter.

0x407C NumItemsPartyLT(S:ResRef*,I:Num*)
Returns true only if the party has a total number of items of the type specified less than the 2nd parameter.

0x407D IsOverMe(O:Object*)
Only for trigger regions. Returns true only if the specified object is over the trigger running the script.

0x407E AreaCheck(S:ResRef*)
Returns true only if the active CRE is in the area specified.

0x407F HasItemEquiped(S:ResRef*,O:Object*)
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 of an amulet etc. This trigger does not work for Melf's Minute Meteors.

0x4080 NumCreatureVsParty(O:Object*,I:Number*)
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.

0x4081 NumCreatureVsPartyLT(O:Object*,I:Number*)
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.

0x4082 NumCreatureVsPartyGT(O:Object*,I:Number*)
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.

0x4083 CombatCounter(I:Number*)
This trigger does 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 chck has been failed.

0x4084 CombatCounterLT(I:Number*)
Returns true only if the combat counter (counts down from 150 after each attack) is less than the value specified.

0x4085 CombatCounterGT(I:Number*)
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.

0x4086 AreaType(I:Number*AREATYPE)
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.

0x0087 TrapTriggered(O:Triggerer*)
NT Only for trigger regions/traps. Returns true if this trap was triggered by the object specified.

0x0088 PartyMemberDied(O:Object*)
NT Returns true only if the party member specified died in the last script round.

0x4089 OR(I:OrCount*)
Returns true if any of the next 'OrCount' triggers returns true.

0x4090 InPartySlot(O:Object*,I:Slot*)
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.

0x0091 SpellCast(O:Object*,I:Spell*Spell)
0x0091 SpellCastRES(S:Spell*,O:Object*)
Returns true only if the specified object cast the spell in the 2nd paramater in the last script round.

0x4092 InLine(S:Target*,O:Object*)
InLine(S:Target*,O:Object*) seems to have no effect.
InLine(O:Object*) returns true if the active creature can see the target creature.

0x0093 PartyRested()
Returns true if the party has just finished resting.

0x4094 Level(O:Object*,I:Level*)
Returns true only if the experience level of the specified object equals the 2nd parameter.

0x4095 LevelGT(O:Object*,I:Level*)
Returns true only if the experience level of the specified object is greater than the 2nd parameter.

0x4096 LevelLT(O:Object*,I:Level*)
Returns true only if the experience level of the specified object is less than the 2nd parameter.

0x0097 Summoned(O:Object*)
NT Returns true only if the active CRE summoned the specified object in the last script round.

0x4098 GlobalsEqual(S:Name1*,S:Name2*)
Returns true only if the 2 global variables specified have equal values.

0x4099 GlobalsGT(S:Name1*,S:Name2*)
Returns true only if the 1st global variable has a value greater than the 2nd one.

0x409A GlobalsLT(S:Name1*,S:Name2*)
Returns true only if the 1st global variable has a value less than the 2nd one.

0x409B LocalsEqual(S:Name1*,S:Name2*)
Returns true only if the 2 local variables specified have equal values.

0x409C LocalsGT(S:Name1*,S:Name2*)
Returns true only if the 1st local variable has a value less than the 2nd one.

0x409D LocalsLT(S:Name1*,S:Name2*)
Returns true only if the 1st local variable has a value less than the 2nd one.

0x409E ObjectActionListEmpty(O:Object*)
Returns true only if the specified object has no actions waiting to be performed.

0x409F OnScreen(O:Object*)
Returns true if the specified object is on the screen.

0x40A0 InActiveArea(O:Object*)
Returns true only if specified object is in the active area. The active area is that in which player 1 is. This trigger will crash the game if the specified creature is not in the active area and is not a global object.

0x00A1 SpellCastOnMe(O:Caster*,I:Spell*Spell)
0x00A1 SpellCastOnMeRES(S:Spell*,O:Caster*)
Returns true only if the specified object cast the specified spell on the active CRE in the last scriptround.

0x40A2 CalanderDay(I:Day*)
NT Returns true only if the current day is the day specified.

0x40A3 CalanderDayGT(I:Day*)
NT Returns true only if the current day is after the day specified.

0x40A4 CalanderDayLT(I:Day*)
NT Returns true only if the current day is before the day specified.

0x40A5 Name(S:Name*,O:Object*)
Returns true only if the object in the 2nd parameter has the scriptname specified.

0x00A6 SpellCastPriest(O:Object*,I:Spell*Spell)
0x00A6 SpellCastPriestRES(S:Spell*,O:Object*)
Returns true only if the specified object cast the specified priest spell in the last script round.

0x00A7 SpellCastInnate(O:Object*,I:Spell*Spell)
0x00A7 SpellCastInnateRES(S:Spell*,O:Object*)
Returns true only if the specified object cast the specified innate spell in the last script round.
NB. The spell level must match the spells definition (in spell.ids) for the trigger to return true.

0x40A8 IsValidForPartyDialog(O:Object*)
0x40A8 IfValidForPartyDialog(O:Object*)
0x40A8 IsValidForPartyDialogue(O:Object*)
0x40A8 IfValidForPartyDialogue(O:Object*)
Returns true only if that specifed party member can take part in party dialogue.

0x40A9 PartyHasItemIdentified(S:ResRef*)
Returns true only if the party has the item specified and it is identified.

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

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.

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.