Index  •  2DA  •  Effects  •  File Formats  •  Actions  •  Identifiers  •  Triggers  •  Appendices  •  Site Info  •  Legal

BG2: ToB Script Actions

This action can be used to do nothing - many characters walk around randomly or stand in one place doing nothing:

  IF
    True()
  THEN
    RESPONSE #50
      RandomWalk()
    RESPONSE #50
      NoAction()
  END
  

This command also sets a creatures ModalState to 0, and so can be used to stop other modal actions (e.g. Bard Song).

  IF
    ModalState(BATTLESONG)
  THEN
    RESPONSE #100
      NoAction()
  END
  

NoAction() is also commonly used as a hanging action in targeting blocks. This is a matter of good practice rather than necessary. The NoAction() action will never be rum since the block always returns false, but the having an action in the scripting block allows scripting programs to accurately check for errors.

  IF
    See(NearestEnemyOf(Myself))
    False()
  THEN
    RESPONSE #100
      NoAction()
  END
  

This action can be used to control another creature. A creature referenced as the result of SetTokenObject is not a valid target for the ActionOverride action. The following is from the Irenicus cutscene after leaving his abode in chapter 1.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      Wait(1)
      FadeToColor([20.0],0)
      Wait(2)
      JumpToPoint([869.340])
      MoveViewPoint([909.346],INSTANT)
      ActionOverride(Player2,JumpToPoint([825.370]))
      ActionOverride(Player3,JumpToPoint([886.384]))
      ActionOverride(Player4,JumpToPoint([952.386]))
      ActionOverride(Player5,JumpToPoint([987.362]))
      ActionOverride(Player6,JumpToPoint([1005.404]))
      Face(10)
      ActionOverride(Player2,Face(10))
      ActionOverride(Player3,Face(10))
      ActionOverride(Player4,Face(8))
      ActionOverride(Player5,Face(6))
      ActionOverride(Player6,Face(6))
      ActionOverride("Anomen",JumpToPoint([909.346]))
      ActionOverride("Anomen",Face(10))
      Wait(1)
      FadeFromColor([20.0],0)
      Wait(2)
      ActionOverride("Anomen",StartDialogueNoSet(Player1))
  END
  

This action is used to set waypoints for a creature to move between; it is commonly used from area scripts to script barmaids moving in a route around the bar. The point parameter represents the X and Y coordinates of the waypoint to add.

  IF
    Global("KRNEWWAY","GLOBAL",0)
  THEN
    RESPONSE #100
      SetGlobal("KRNEWWAY","GLOBAL",1)
      AddWayPoint([100.200])
      AddWayPoint([200.300])
  END
  

The following script, showing how to move to waypoints preset in the area file, is taken from the barmaid at the Copper Coronet.

  IF
    Detect([PC])
    Allegiance(Myself,NEUTRAL)
    Global("quest1","LOCALS",0)
  THEN
    RESPONSE #100
      MoveToObject("Way3")
      ActionOverride("DRUNK2",DisplayStringHead(Myself,4592)
      Wait(1)
      DisplayStringHead(Myself,4604)
      Wait(2)
      MoveToObject("Way4")
      Wait(1)
      MoveToObject("Way3")
      DisplayStringHead(Myself,4611)
      Wait(2)
      SetGlobal("quest1","LOCALS",1)
  END
  

This action instructs the active creature to continually attack the target, i.e. the active creature will not switch targets until its target is dead.

  IF
    See([EVILCUTOFF])
    Class(LastSeenBy(),MAGE_ALL)
    !InParty(LastSeenBy())
   THEN
     RESPONSE #100
       Attack(LastSeenBy())
  END
  

This action instructs the active creature to backstab the specified target. Note that some creatures (notably dragons and golems) are immune to being backstabbed, that not all weapons are valid to backstab with, and that the active creature must be hidden to make a successful backstab. This action causes the game to crash. As long as the correct conditions are met, the first attack of a hidden creature will count as a backstab attack.

  IF
   See(NearestEnemyOf())
   Range(NearestEnemyOf(),4)
   !Race(NearestEnemyOf(),DRAGON)
   !Race(NearestEnemyOf(),GOLEM)
   !InParty(NearestEnemyOf(Myself))
   OR(2)
     StateCheck(Myself,STATE_INVISIBLE)
     StateCheck(Myself,STATE_IMPROVEDINVISIBLITY)
  THEN 
    RESPONSE #100
      Attack(NearestEnemyOf())
  END
  

This action is used to create a creature - either an NPC, a neutral creature or an enemy. NewObject is the filename of the creature to create, Location is the coordinates to create the creature at ([x.y] format) and direction being the direction the creature is facing (0-15, 0 being south and the facing values increasing as the character turns clockwise). Note that a coordinate of [-1.-1] will create the creature next to the active creature.

This script is from the area script for the Copper Coronet (AR0406) and creates extra guards when the Player is discovered in the off limits area.

  IF
    Global("CopperGuards","GLOBAL",1)
  THEN
    RESPONSE #100
      CreateCreature("ccguard1",[2338.412],14)
      CreateCreature("ccguard2",[2318.457],14)
      CreateCreature("ccguard1",[2749.793],6)
      CreateCreature("ccguard2",[2791.831],6)
      CreateCreature("ccguard1",[1981.762],14)
      CreateCreature("ccguard1",[1286.1500],14)
  END
  

8 Dialog(O:Object*)
This action instructs the active creature to initiate dialog with the target creature. Dialog will not be initiated if the creature using this action has been assigned a dialog that has all top level conditions returning false.

  IF
    GlobalTimerExpired("Yeslick","GLOBAL")
    Global("FLOODED","GLOBAL",0)
  THEN
    RESPONSE #100
      Dialogue([PC])
  END
  

This action instructs the active creature to drop the specified item at the specified location (relative to the active creature). The active creature must have the item to be dropped. Note that a coordinate of [-1.-1] will drop the item next to the active creature.

  IF
    Clicked([ANYONE])
    Range(LastTrigger,12)
  THEN
    RESPONSE #100
      DropItem("SCRL1B",[345.1210])
  END
  

This action is used to change the allegiance of the active creature to enemy (making them hostile to the PC). This example script, from a peasant, will turn the creature hostile if it is attacked.

  IF
    AttackedBy([GOODCUTOFF],Myself)
    Allegiance(Myself,NEUTRAL)
  THEN
    RESPONSE #100
      Enemy()
  END
  

This action instructs the active creature to equip the specified item. The item needs to be in one of the creatures quickslots.

  IF
    HasItem("Sw1h01",Myself)
    !HasItemEquipedReal("Sw1h01",Myself)
  THEN
    RESPONSE #100
      Equip("Sw1h01",Myself)
  END
  

This action instructs the active creature to enter Detect Traps modal state. This action can be used for any creature (not just thieves) though success in detecting traps is dependent on points in the Find Traps skill.

  IF
    ActionListEmpty()
    !Exists([EVILCUTOFF])
    !ModalState( Myself,DETECTTRAPS)
    OR(2)
    !StateCheck(Myself,STATE_INVISIBLE)
    !StateChe ck(Myself,STATE_IMPROVEDINVISIBILITY)
  THEN
    RESPONSE #100
      FindTraps()
  END
  

This action has not been seen to produce any results.

  IF
    See([ANYONE])
    !HasItem("Sw1h01",Myself)
    HasItem("Sw1h01",LastSeenBy ())
  THEN
    RESPONSE #100
      MoveToObject(LastSeenBy())
      GetItem("Sw1h01",LastSeenBy())
  END
  

This action instructs the active creature to give the specified item (parameter 1) to the specified target (parameter 2). The active creature must possess the item to pass it. The sample script makes uses of modified IDS files (action, instant, trigger and svtiobj) though such modification are not necessary to use the GiveItem action itself.

  IF
    HPPercentLT(Myself,40)
    !HasItem("potn52",Myself)
  THEN
    RESPONSE #100
      GlobalShout(3015)
      SetGlobal("KRNEEDITEM","GLOBAL",1)
  END
  
  IF
    Heard([GOODCUTOFF],3015)
    HasItem("potn52",Myself)
    HPPercentGT(Myself,40)
    Global("KRNEEDITEM","GLOBAL",1)
  THEN
    RESPONSE #100
      MoveToObject(LastHeardBy())
      GiveItem("potn52",LastHeardBy())
      SetGlobal("KRNEEDITEM","GLOBAL",0)
  END
  

This action is used in conjunction with the ReceivedOrder trigger, and works in a similar way to a global shout. The action passes a numeric order to the specified creature. Only one creature at a time responds to an order, and creatures to not detect their own orders.

  IF
    See([EVILCUTOFF])
    OR(3)
    Class(Myself,FIGHTER_ALL)
    Class(Myself,RANGER_ALL)
    Class(Myse lf,PALADIN_ALL)
  THEN
    RESPONSE #100
      GiveOrder([PC.0.0.THIEF_ALL],100)
  END
  
  IF
    ReceivedOrder(Myself,100)
    Class(Myself,THIEF_ALL)
  THEN
    RESPONSE #100
      RunAwayFrom([EVILCUTOFF],120)
      Hide()
  END
  

This action acts similar to shout, but does not accept values. The range of the Help action is slightly larger than the default visual radius of NPCs.

  IF
    HitBy([ANYONE],CRUSHING)
  THEN
    RESPONSE #50
      Help()
      Attack(NearestEnemyOf(Myself))
    RESPONSE #50
      RunAwayFrom(NearestEnemyOf(Myself),75)
  END
  
  IF
    Help([0.0.GIBBERLING])
  THEN
    RESPONSE #100
      Attack(NearestEnemyOf(LastHelp(Myself)))
  END
  
  IF
    See(NearestEnemyOf(Myself))
  THEN
    RESPONSE #100
      Help()
      AttackReevaluate(NearestEnemyOf(Myself),30)
  END
  

This action instructs the active creature to attempt to Hide in Shadows. This action can be used for any creature (not just thieves) though success in hiding is dependent on points in the Stealth skill.

  IF
    !See([EVILCUTOFF])
    OR(2)
    !StateCheck(Myself,STATE_INVISIBLE)
    !StateCheck(Myself,STATE_IMPROVEDINVISIBLITY)
  THEN
    RESPONSE #100
      Hide()
  END
  

This action adds the active creature to the party. If the party is currently full the 'select party members' dialog is shown. JoinParty clears the ActionQueue of the active creature.

  IF
    See([PC])
    Global("KRJOINPARTY","GLOBAL",0)
  THEN
    RESPONSE #100
      JoinParty()
  END
  

This action is a leftover from BG1 - it does not work in BG2.

This action causes the active creature to leave the party.

  IF
    HappinessLT(Myself,-299)
  THEN
    RESPONSE #100
      ChangeAIScript("",DEFAULT)
      SetLeavePartyDialogFile()
      LeaveParty()
      EscapeArea()
  END

This action instructs the active creature to move to the specified object. The action does not update the current position of the actor, saved in ARE files. The example script shows the creature moving towards the nearest enemy.

  IF
    See(NearestEnemyOf())
    !Range(NearestEnemyOf(),4)
  THEN
    RESPONSE #100
      MoveToObject(NearestEnemyOf())
  END
  

This action causes the active creature to move to the specified coordinates. The action will update the position of creatures as stored in ARE files (first by setting the coordinates of the destination point, then by setting the coordinates of the current point once the destination is reached).

  IF
    True()
  THEN
    RESPONSE #100
      MoveToPoint([526.1193])
      Wait(3)
      RandomWalk()
      Wait(5)
      RandomWalk()
  END
  

This action causes the active creature to move randomly around the screen.

  IF
    HPPercentLT(Myself,15)
  THEN
    RESPONSE #100
     Panic()
  END
  

This action instructs the active creature to attempt to pickpocket the target. This action can be used for any creature (not just thieves) though success in pick pocketing is dependent on points in the Pickpocket skill. Note that a failed pickpocket attempt is treated as an attack, hence the Attacked() trigger will return true if a pickpocket attempt is failed.

  IF
    See([ANYONE])
    OR(2)
    Class(Myself,THIEF_ALL)
    Class(Myself,BARD_ALL)
  THEN
    RESPONSE #100
      PickPockets([ANYONE])
  END
  

This action will cause the active creature to play the specified sound. Both WAV and WAVC files can be played by the action.

  IF
    True()
  THEN
    RESPONSE #100
      PlaySound("CAS_M06")
  END
  

This action causes the active creature to guard the specified point, staying within the specified range.

  IF
    True()
  THEN
    RESPONSE #100
      ProtectPoint([1738.543],10)
  END
  

This action causes the active creature to attempt to disarm the specified trap. This action can be used for any creature (not just thieves) though success in disarming is dependent on points in the Disarm Trap skill.

  IF
    See("Trap01")
    Class(Myself,THIEF_ALL)
  THEN
    RESPONSE #100
      RemoveTraps("Trap01")
  END
  

This action causes the active creature to run away from the specified creature, for the specified time. The time parameter is measured in AI updates, which default to 15 updates per second. Occasionally, fleeing creatures stop to attack another creature.

  IF
    HPPercentLT(Myself,30)
  THEN
    RESPONSE #100
      RunAwayFrom(LastAttackerOf(Myself),180)
  END
  

This action sets a variable (specified by name) in the scope (specified by area) to the value (specified by value). See the variable type appendix for details on variables.

  IF
    Global("KRINAREA","AR0400",0)
  THEN
    RESPONSE #100
      CreateCreature("ORC01",[1738.543],0)
      SetGlobal("KRINAR EA","AR0400",1)
  END
  

This action causes the active creature to cast the specified spell at the target object. The spell must currently be memorised by the caster, and may be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable.

  IF
    See([EVILCUTOFF])
    !InParty([EVILCUTOFF])
    !HasBounceEffects([ EVILCUTOFF])//like cloak of mirroring or spell deflection
    !HasImmunityEffects([EVILCUTOFF])//
    HaveSpell(WIZARD_MAGIC_MISSILE)
    OR(2)
    !StateCheck([EVILCUTOFF],STATE_INVISIBLE)
    !StateCheck([EVILCUTOFF],STATE_IMPROVEDINVISIBLITY)
    CheckStatLT([EVILCUTOFF], 30,RESISTMAGIC)
    !Race([EVILCUTOFF],LICH)
    !Race([EVILCUTOFF],RAKSHASA)
  THEN
    RESPONSE #100
      Spell([EVILCUTOFF],WIZARD_MAGIC_MISSILE)
  END
  

This action turns any undead creatures within range of the active creature. This action can be used for any creature (not just paladins/clerics) though success in turning is dependent on the Turn Undead level of the creature, which is only calculated for paladins and clerics. The chance to successfully turn undead is based on creatures level and class. Paladins turn at 2 levels less than clerics of the same level. Evil clerics gain control of undead rather than turning them.

  IF
    See([EVILCUTOFF])
    General([EVILCUTOFF],UNDEAD)
    LevelGT(Mysel f,12)
    OR(2)
    Class(Myself,PALADIN_ALL)
    Class(Myself,CLERIC_ALL)
  THEN
    RESPONSE #100
      Turn()
  END
  

34 UseItem(S:Object*,O:Target*)
34 UseItemSlot(O:Target*, I:Slot*)
This action instructs the active creature to use the specified item (object) on the specified target (target). This action is most often used to allow use of potions and wands. The item to be used must exist in the active creature's inventory (though it need not be equipped).

  IF
    HPPercentLT(Myself,50)
    HasItem("potn52",Myself)
  THEN
    RESPONSE #100
      DisplayStringHead(Myself,46150) //quaffs a potion
      UseItem("potn52",Myself)
      Continue()
  END
  

This action instructs the script parser to continue looking for actions in the active creatures action list. This is mainly included in scripts for efficiency. Continue should also be appended to any script blocks added to the top of existing scripts, to ensure correct functioning of any blocks which include the OnCreation trigger. Continue may prevent actions being completed until the script parser has finished its execution cycle.

  IF
    See(NearestEnemyOf())
    !InParty(NearestEnemyOf())
  THEN
    RESPONSE #100
      AttackOneRound(NearestEnemyOf())
      Continue()
  END
  

Unknown

This action instructs the active creature to play the swing weapon animation. Note that some objects do not have this animation.

  IF
    True()
  THEN
    RESPONSE #100
      Swing()
  END
  

This action instructs the active creature to play the recoil animation. Note that some objects do not have this animation.

  IF
    TookDamage()
  THEN
    RESPONSE #100
      Recoil()
  END
  

This action instructs the active creature to "play dead", i.e. to lay on the ground, for the specified interval (measured in AI updates per second (AI updates default to 15 per second). If used on a PC, the player can override the action by issuing a standard move command.

  IF
    HPPercentLT(Myself,30)
  THEN
    RESPONSE #100
      PlayDead(240)
  END
  

This action can used to make the active creature follow the creature specified by the leader parameter, maintain a relative position determined by the offset parameter.

  IF
    CombatCounter(0)
    Allegiance(Myself,NEUTRAL)
  THEN
    RESPONSE #100
      Formation("QSLMAGE1",[-2.-5])
  END
  

This action instantly moves the active creature to the specified point.

  IF
    True()
  THEN
    RESPONSE #100
      ClearAllActions()
      FadeToColor([20.0],0)
      MoveViewPoint([1738.543],INSTANT)
      JumpToPoint([1738.543])
      Wait(1)
      CreateVisualEffectObject("SPCLOUD1",Player1)
      Wait(1)
      CreateVisualEffectObject("SPFLESHS",Player1)
  END
  

This action scrolls the view point (i.e. the area of the current map being displayed onscreen) to the target point ([x.y] at the specified speed. Speeds are taken from scroll.ids (VERY_FAST is equivalent to normal walking speed).

This action scrolls the view point (i.e. the area of the current map being displayed onscreen) to the target object ([x.y] at the specified speed. Speeds are taken from scroll.ids (VERY_FAST is equivalent to normal walking speed). The example script is from a cutscene; CUT03C.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      FadeToColor([20.0],0)
      Wait(1)
      ActionOverride("SPY406",DestroySelf())
      MoveViewObject(Myself,INSTANT)
      Wait(1)
      FadeFromColor([20.0],0)
      ActionOverride("cpchick1",DestroySelf())
      ActionOverride("cpchick2",DestroySelf())
      Wait(1)
      ActionOverride("Surly",StartDialogueNoSet(Player1))
  END
  

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action has not been seen to produce any results.

This action changes the assigned script file for the active creature. The new script name is specified in the scriptfile parameter. The level parameter dictates the script level to change - values are from scrlev.ids

  IF
    See([EVILCUTOFF.0.DOG])
  THEN
    RESPONSE #100
      ChangeAIScript("DOGFIGHT",DEFAULT)
  END
  

This action starts a timer local to the active creature. The timer is measured in seconds, and the timer value is not saved in save games. The timer is checked with the TimerExpired trigger.

  IF
    Global("KRDEAD","LOCALS",0 )
    Dead("Shadra01")
  THEN
    RESPONSE #100
      StartTimer("SPAWNMON",12)
      SetGlobal("KRDEAD","LOCALS",1)
  END
  
  IF
    Timer Expired("SPAWNMON")
    Global("KRDEAD","LOCALS",1)
  THEN
    RESPONSE #100
      CreateCreature("Grothgar",[700.700],0)
  END
  

This action is used as a form of script communication, in conjunction with the Trigger() trigger. The action has the same range as GiveOrder and affects only one creature at a time. Note that the LastTrigger() object does not get set after receiving a trigger.

This action causes a delay in script processing. The time is measured in seconds.

  IF
    See(Player1)
    See(Player6)
  THEN
    RESPONSE #100
      MoveToObject(Player1)
      Wait(2)
      MoveToObject(Player6)
      Wait(4)
  END
  

This action resets the fog of war for the area the active creature is in.

  IF
    True()
  THEN
    RESPONSE #100
      UndoExplore()
  END
  

This action removes the fog of war for the area the active creature is in.

  IF
    True()
  THEN
    RESPONSE #100
      Explore()
  END
  

This action changes the time of day. The time parameter is taken from time.ids, though a direct number can be specified. The example script is from when Irenicus leaves his dungeon.

  IF
    Global("AmaWaukeen","GLOBAL",1)
  THEN
    RESPONSE #100
      DayNight(MIDNIGHT)
      SetGlobal("AmaWaukeen","GLOBAL",2)
      FadeToColor([20.0],0)
      CreateCreature("shthass1",[877.898],7)
      StartCutSceneMode()
      StartCutScene("cut24a")
  END
  

This action changes the weather. The action only works in outdoors areas that have weather enabled in the ARE file. Values for the weather parameter are from weather.ids. Note that the fog weather type does not work.

  IF
    Global("KRSTORM","GLOBAL",0)
  THEN
    RESPONSE #100
      Weather(RAIN)
      SetGlobal("KRSTORM","GLOBAL",1)
  END
  

This action calls lightning from the sky against the specified target, causing immediate death (unless the target has the MinHP effect applied). The lightning does not always show, and if it does, it is not always in the expected location.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId("DRUID12a")
      CallLightning("Orc05")
      CallLightning("Orc06")
  END
  

This action will sequentially change the visual representation of armour the active creature is wearing. The action cycles from the lowest (none) to the highest (plate mail) armour level.

This action has not been seen to produce any results.

This action creates the specified item (resref) on the active creature. The usage parameters determine the number of items created or the number of charges on the item, depending on the item type being created. The example script is from AR0602.

  IF
    Global("BG1Pantaloons","GLOBAL",0)
    PartyHasItem("MISC47")
  THEN
    RESPONSE #100
      SetGlobal("BG1Pantaloons","GLOBAL",1)
      ActionOverride("Picture1",CreateItem("MISC47",0,0,0))
      Continue()
  END
  

This action is similar to Wait(), it causes a delay in script processing. The time is measured in AI updates (which default to 15 per second)

  IF
    See(NearestEnemyOf())
  THEN
    RESPONSE #100
      DisplayStingHead(Myself,50712)// Attack!! Attack!!
      SmallWait(120)
      Attack(NearestEnemyOf())
  END
  

This action instructs the active creature to face the specified direction. Directions run from 0-15 with 0 being south and moving clockwise. Negative values act as relative directions to the current direction.

  IF
    Global("BeholderBehavior","LOCALS",0)
    See([PC])
    HPGT(Myself,65)
  THEN
    RESPONSE #100
      FaceObject([PC])
      ForceSpell([PC],BEHOLDER_CHARM_PERSON)
      Continue()
  END
  

This action causes the active creature to walk randomly. The example script is blbear.bcs; it instructs bears to walk rather than fight if the nearest enemy is a druid.

  IF
    Delay(5)
    See(NearestEnemyOf(Myself))
    Class(NearestEnemyOf(Myself),DRUID)
    NumCreatureGT([ENEMY],1)
  THEN
    RESPONSE #100
      RandomWalk()
  END
  

This action sets whether a creature can be interrupted while carrying out script actions.

  IF
    See(Player2)
    !Range(Player2,4)
  THEN
    RESPONSE #100
      SetInterrupt(FALSE)
      MoveToObject("Player2")
      SetInterrupt (TRUE)
  END
  

This action instructs the active creature to protect the specified creature (i.e. attack any enemies of the creature), while staying within the specified range. The example script is from IWD, 4003bsg.bcs and controls the zombies guarding Presio.(4003BSG.bcs).

  IF
    True()
  THEN
    RESPONSE #100
      ProtectObject("Presio",100)
  END
  

This action instructs the active creature to move to the specified point and marks the creature as a leader. The following example script sets Player1 walking to [3363.2954] and sets Player2 and Player3 to "follow" to [3363.2954] in a line and with minimal walking into each other. This action is not fully understood, and is not particularly reliable.

  IF
   HotKey(E)
  THEN
   RESPONSE #100
     ActionOverride(Player1,Leader([3363.2954]))
     ActionOverride(Player2,Follow([3363.2954]))
     ActionOverride(Player3,Follow([3363.2954]))
  END
  

This action instructs the active creature to move to the specified point following the marked Leader.

This action has not been seen to produce any results.

This action instructs the active creature to leave the current area.

This action instructs the active creature to select the specified slot, and use the ability in the extended header specified by the ability parameter. The example script is from ankheg.bcs.

  IF
    See(NearestEnemyOf(Myself))
    Range(NearestEnemyOf(Myself),5)
    Delay(12)
  THEN
    RESPONSE #40
      SelectWeaponAbility(SLOT_WEAPON,0)
      RunAwayFrom(NearestEnemyOf(Myself),45)
      AttackReevaluate(NearestEnemyOf(Myself),15)
    RESPONSE #60
      SelectWeaponAbility(SLOT_WEAPON1,0)
      AttackReevaluate(NearestEnemyOf(Myself),15)
  END
  

This action has not been seen to produce any results.

This action causes the active creature to cast the specified spell at the specified point ([x.y]). The spell must currently be memorised by the caster, and may be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. The example script is from andris.bcs.

  IF
    Global("AndrisBehavior","AR1009",0)
    See(NearestEnemyOf(Myself))
  THEN
    RESPONSE #100
      ForceSpellPoint([2002.1554],WIZARD_DIMENSION_DOOR)
      Wait(1)
      SpellNoDec(NearestEnemyOf(Myself),WIZARD_CONFUSION)
      SetGlobal("AndrisBehavior","AR1009",1)
  END
  

This action applies the benefits of resting (i.e. healing, restoring spells and restoring abilities) to the active creature. The action does not play the rest movie or advance game time. The example script is from cut28a.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      StorePartyLocations()
      FadeToColor([30.0],0)
      Wait(1)
      Rest()
      ActionOverride(Player2,Rest())
      ActionOverride(Player3,Rest())
      ActionOverride(Player4,Rest())
      ActionOverride(Player5,Rest())
      ActionOverride(Player6,Rest())
  (cut short for brevity)
  

97 UseItemPointSlot(P:Target*,I:Slot*)
This action has not been seen to produce any results.

This action instructs the active creature to attack the target, without sounding a battlecry.

This action gives the appearance of flying - the active creature is able to pass over impassable areas. The example script is from randfly.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      RandomFly()
  END
  

This action sets the morale of the active creature.

This action alters the morale of the target by the specified amount. The change amount can be positive or negative. The example script is from bardsh.bcs.

  IF
    AttackedBy([GOODCUTOFF],DEFAULT)
    Allegiance(Myself,NEUTRAL)
    Global("PlayerAttackedActors","GLOBAL",0)
  THEN
    RESPONSE #100
      SetGlobal("PlayerAttackedActors","GLOBAL",1)
      MoraleInc(Myself,-5)
      Enemy()
  END
  

This action alters the morale of the target by the specified amount. The change amount can be positive or negative.

This action instructs the active creature to attack the specified target for one round.

  IF
    See(NearestEnemyOf())
  THEN
    RESPONSE #100
      AttackOneRound(NearestEnemyOf())
  END
  

This action is used to shout the specified number. The action is used in conjunction with the Heard trigger. A silenced creature cannot shout.

  IF
    StateCheck(Myself,STATE_POISONED)
  THEN
    RESPONSE #100
      Shout(4010)
  END
  

  IF
    Heard([GOODCUTOFF],4010)
    HaveSpell(CLERIC_SLOW_POISON)
  THEN
    RESPONSE #100
      Spell(LastHeardBy(),CLERIC_SLOW_POISON)
  END
  

This action instructs the active creature to move a certain distance from its current location; i.e. the point is relative to the creatures current location.

108 EscapeAreaMove(S:Area*,I:X*,I:Y*,I:Face*)
This action, in its first form, instructs the active creature to leave the current area, either by walking, or, if the path is blocked, by simply disappearing. In the actions second form the action functions as a combination of EscapeAreaDestroy() and MoveBetweenAreas(). The parameters are similar to MoveBetweenAreas(), in that it takes in all the same information, but unlike MoveBetweenAras(), the character will search for the nearest travel trigger, move to that, then execute his movement to the specified area. If he cannot find a travel trigger, he will execute the movement.

  IF
    HPPercentLT(Myself,35)
  THEN
    RESPONSE #100
      EscapeArea()
  END
  

This action alters the specified variable, in the specified scope, by the amount indicated. The amount can be positive or negative. Variables in the local scope cannot be changed with this action.

  IF
    See([EVILCUTOFF]
    !Specifics(LastSeenBy(),4000)
    !Inparty(LastSeenBy())
    !Allegiance(LastSeenBy([GOODCUTOFF])
  THEN
    RESPONSE #100
      ChangeSpecifics(LastSeenBy(),4000)
      IncrementGlobal("KR_MONSTER_COUNTER_ALIVE","GLOBAL",1)
  END
  

This action changes the current area.

  IF
    Global("MissionPackSave","GLOBAL",0)
  THEN
    RESPONSE #100
      TextScreen("toscst")
      ActionOverride(Player1,LeaveAreaLUA("AR1000","",[3048.831],4))
      ActionOverride(Player2,LeaveAreaLUA("AR1000","",[3055.917],4))
      ActionOverride(Player3,LeaveAreaLUA("AR1000","",[2990.913],4))
      ActionOverride(Player4,LeaveAreaLUA("AR1000","",[2992.812],4))
      ActionOverride(Player5,LeaveAreaLUA("AR1000","",[3079.737],4))
      ActionOverride(Player6,LeaveAreaLUA("AR1000","",[3005.742],4))
  END
  

This action removes the active creature from the game. No death variable is set. The example script is from the Irenicus cutscene at the beginning of the game.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId("CSCowl7")
      ForceSpell("CSIren",0)
      Wait(1)
      DestroySelf()
  END
  

This action has not been seen to produce any results.

113 ForceSpellRES(S:RES*, O:Target)
This action causes the active creature to cast the specified spell at the target object. The spell need not currently be memorised by the caster, and will not be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable. The example script is from suelfw9.bcs.

  IF
    Global("Scene2","AR2800",2)
    See([ENEMY])
    Global("Fight","LOCALS",2)
  THEN
    RESPONSE #100
      IncrementGlobal("Fight","LOCALS",1)
      ForceSpell([ENEMY],WIZARD_POWER_WORD_SLEEP)
  END
  

114 ForceSpellPointRES(S:RES*, P:Target)
This action causes the active creature to cast the specified spell at the specified point ([x.y]). The spell need not currently be memorised by the caster, and will not be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long.

  IF
    Global("AndrisBehavior","AR1009",0)
    See(NearestEnemyOf(Myself))
  THEN
    RESPONSE #100
      ForceSpellPoint([2002.1554],WIZARD_DIMENSION_DOOR)
      Wait(1)
      SpellNoDec(NearestEnemyOf(Myself),WIZARD_CONFUSION)
      SetGlobal("AndrisBehavior","AR1009",1)
  END
  

This action sets a global timer. The timer is checked by the GlobalTimerExpired trigger or GlobalTimerNotExpired trigger.

  IF
    GlobalTimerExpired("Areana","GLOBAL")
    !Exists("TorLobo")
    !Dead("TorLobo")
  THEN
    RESPONSE #100
      ActionOverride("Areana",DestroySelf())
      CreateCreature("TORLOB",[349.474],0)
  END
  

This action takes a single instance of the specified item from the party (unless the item exists in a stack, in which case the entire stack is taken). The item is transferred to the inventory of the active creature. The example is from AR0516.bcs.

  IF
    Global("ThrallOrb","GLOBAL",2)
    PartyHasItem("MISC7Y")
  THEN
    RESPONSE #100
      TakePartyItem("MISC7Y")
  END
  

This action takes the specified amount of gold from the party. If performed by a party member, the gold is transferred to that characters gold stat (in the CRE file) and re-added to the party pot when the character re-joins the party.
The example script is from AR0602.bcs.

  IF
    Global("TakeImportItems","AR0602",0)
  THEN
    RESPONSE #100
      SetGlobal("TakeImportItems","AR0602",1)
      SetGlobal("Chapter","GLOBAL",1)
      ActionOverride("Malaaq",MoveBetweenAreas("AR0601",[345.591],14))
      ActionOverride("DuegarClanChief",TakeItemListPartyNum("IMPORT01",1))
      ActionOverride("Shelf1",TakeItemListPartyNum("IMPORT03";,1))
      SmallWait(4)
      TakePartyGold(2147483647)
  (cut short for brevity)
  

This action gives the specified amount of gold to the party. The active creature must have the gold in its "money variable".

  IF
    G("KRGIVEGOLD",0)
  THEN
    RESPONSE #100
      GivePartyGold(500)
      SG("KRGIVEGOLD",1)
  END
  

This action causes the active creature to drop all its inventory items. The example script is from the cutscene with Mazzy fighting the ogre; cut16a.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      FadeToColor([20.0],0)
      Wait(1)
      ActionOverride("mazzy",DropInventory())
      Wait(2)
  (cut short for brevity)
  

This action starts a cutscene; a cinematic sequence that removes the GUI and player control. The cutscene parameter is the script name to run. The example script is from the Irenicus cutscene cut01.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      LeaveAreaLUAPanic("AR0700","",[2753.868],4)
      LeaveAreaLUA("AR0700","",[2753.868],4)
      ActionOverride(Player2,LeaveAreaLUA("AR0700","",[2805.882],4))
      ActionOverride(Player3,LeaveAreaLUA("AR0700","",[2791.820],4))
      ActionOverride(Player4,LeaveAreaLUA("AR0700","",[2764.788],2))
      ActionOverride(Player5,LeaveAreaLUA("AR0700","",[2781.716],0))
      ActionOverride(Player6,LeaveAreaLUA("AR0700","",[2763.668],0))
      Wait(1)
      Explore()
      MultiPlayerSync()
      SetGlobal("EnteredWaukeen","AR0700",1)
      TextScreen("SCENE01")
      ActionOverride("Imoen",SetDialog("None"))
      ActionOverride("Imoen",LeaveParty())
      ActionOverride("Imoen",GivePartyAllEquipment())
      ActionOverride("Imoen",DestroySelf())
      CreateCreature("CSIMOEN",[2732.831],2)
      CreateCreature("CSIREN",[2557.935],0)
      CreateCreature("CSTHIEF1",[2740.1009],6)
      CreateCreature("CSTHIEF2",[2678.1043],6)
      CreateCreature("CSTHIEF3",[2579.1075],8)
      CreateCreature("CSTHIEF4",[2488.1078],10)
      CreateCreature("CSGAYL",[2671.1101],6)
      CreateCreature("AMNG1",[2736.1260],0)
      SmallWait(1)
      MoveViewPoint([2576.908],INSTANT)
      DayNight(DAWN_END)
      FadeFromColor([40.0],0)
      StartCutScene("Cut01a")
  END
  

This action starts a cutscene. Player control is removed, and scripts stop running. Note that actions already in the action list are not cleared without an explicit call to ClearAllActions. The example script is from are0507.bcs.

  IF
    Global("AmsiHouse","GLOBAL",3)
    !Dead("amsi")
  THEN
    RESPONSE #100
      ClearAllActions()
      StartCutSceneMode()
      ActionOverride("amsi",StartDialogueNoSet(Player1))
  END
  

This action ends a cutscene, and restores the GUI and player control. The example script is from ar0800.bcs.

  IF
    GlobalGT("BodhiJob","GLOBAL",0)
    Global("Movie02","GLOBAL",0)
  THEN
    RESPONSE #100
      ClearAllActions()
      SetGlobal("Movie02","GLOBAL",1)
      StartCutSceneMode()
      FadeToColor([30.0],0)
      Wait(2)
      EndCutSceneMode()
      TextScreen("SCENE04")
      SmallWait(1)
      StartCutSceneMode()
      StartCutScene("Movie02a")
  END
  

This action clears any queued actions for all creatures in the area. The example script is from ar0507.bcs.

  IF
    Global("AmsiHouse","GLOBAL",3)
    !Dead("amsi")
  THEN
    RESPONSE #100
      ClearAllActions()
      StartCutSceneMode()
      ActionOverride("amsi",StartDialogueNoSet(Player1))
  END
  

This action has not been seen to produce any results.

This action deactivates the target creature. The creature remains in the area, but is removed from play - i.e. it is invisible and cannot be interacted with.

This action activates the target creature. The creature is returned to play - i.e. it is visible and can be interacted with.

This action is used internally in a cutscene to make the object with the specified death variable perform actions. The action appears to only work from a creature script. The example script is from cut01.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      CutSceneId(Player1)
      LeaveAreaLUAPanic("AR0700","",[2753.868],4)
      LeaveAreaLUA("AR0700","",[2753.868],4)
  (cut short for brevity)
  

This action is likely called directly by the engine, and is used to give ankegs give the appearance of emerging from the ground. Calling the action from script has no effect.

This action is likely called directly by the engine, and is used to give ankegs give the appearance of burrowing into the ground. Calling the action from script has no effect.

This action causes the active creature to turn in a random direction. The example script is from waitturn.bcs.

  IF
    True()
  THEN
    RESPONSE #100
      RandomTurn()
  END
  

This action causes the target creature to die, dropping any droppable items they are carrying.

  IF
    Global("KillArntra04","AR0307",1)
  THEN
    RESPONSE #100
      SetGlobal("KillArntra04","AR0307",2)
      ActionOverride("arntra04",Face(10))
      Wait(1)
      ForceSpell("arntra04",CLERIC_FLAME_STRIKE)
      Wait(1)
      Kill("arntra04")
      CreateCreature("Arntra05",[3213.485],0)
  END
  

This action plays a sound linked to the object.

  IF
    Delay(2)
    HPPercentLT(Myself,35)
  THEN
    RESPONSE #95
      Shout(HURT)
      Continue()
    RESPONSE #5
      VerbalConstant(Myself,HURT)
      Shout(HURT)
      Continue()
  END

This action clears the action list of the specified object. The example script is from ar2400.bcs.

  IF
    GlobalTimerExpired("udWaitOgreDoor","GLOBAL")
    Global("HaveOgreOpenDoor","AR2400",0)
    Global("udGithDead","AR2400",0)
    !Global("udMind","GLOBAL",30)
  THEN
    RESPONSE #100
      SetInterrupt(FALSE)
      SetGlobal("HaveOgreOpenDoor","AR2400",1)
      ClearActions(Player1)
      ClearActions(Player2)
      ClearActions(Player3)
      ClearActions(Player4)
      ClearActions(Player5)
      ClearActions(Player6)
      SetInterrupt(TRUE)
      StartCutSceneMode()
      StartCutScene("Cut44i")
  END
  

This action instructs the active creature to attack the target for the specified time (ReevaluationPeriod) which is measured in AI updates (which default to 15 per second).The script will then run again, checking for other true conditions.

  IF
    See([EVILCUTOFF])
    Range(LastSeenBy(),4)
    !InParty(LastSeenBy())
    !Allegiance(LastSeenBy(Myself),GOODCUTOFF)
    !Class(LastSeenBy(Myself),INNOCENT)
    InWeaponRange(LastSeenBy())
    HasWeaponEquiped()
  THEN
    RESPONSE #100
      AttackReevaluate(LastSeenBy(),30)
  END
  

This action locks the screen on the active creature, preventing the screen from being scrolled away. The action only works from a creature script.

  IF
    CombatCounter(0)
  THEN
    RESPONSE #100
      LockScroll()
  END
  

This action unlocks the screen if it has been locked.

  IF
    OR(2)
    HotKey(H)
    !CombatCounter(0)
  THEN
    RESPONSE #100
      UnlockScroll()
  END
  

137 StartDialogue(S:DialogFile*,O:Target*)
This action instructs the active creature to start the specified dialog with the specified target. The dialog can be initiated from a distance and must have at least one state with all its top level conditions true else it will not initiate.

  IF
   See([PC])
   NumTimesTalkedTo(0)
  THEN
    RESPONSE #100
      StartDialog("andris",[PC])
  END
  

138 SetDialogue(S:DialogFile*)
This action sets the dialog file of the active creature to the specified file. SetDialogue("") will set the dialog file to nothing.

  IF
    AttackedBy([GOODCUTOFF],DEFAULT)
    Global("KR_CHANGE_DIALOG","LOCALS",0)
  THEN
    RESPONSE #100
      SetDialogue("")
      SetGlobal("KR_CHANGE_DIALOG","LOCALS",1)
  END
  

This action instructs the active creature to start a dialog with the target creature, from any distance. If the target is invalid, no action will be taken.

This action creates the item specified by the resref parameter on the creature specified by the object parameter, with quantity/charges controlled by the usage parameters.

  IF
    GlobalTimerExpired("dwVith","GLOBAL")
    Global("dwVithal","GLOBAL",3)
  THEN
    RESPONSE #100
      CreateVisualEffectObject("SPPLANAR","udvith")
      Wait(2)
      Activate("udvith")
      GiveItemCreate("scrl8z","udvith",1,1,0)
      GiveItemCreate("scrl9g","udvith",1,1,0)
      GiveItemCreate("scrl9e","udvith",1,1,0)
      GiveItemCreate("scrl9v","udvith",1,1,0)
      GiveItemCreate("scrl9r","udvith",1,1,0)
      SetGlobal("dwVithal","GLOBAL",4)
  END
  

This action gives the party a sum of gold corresponding to the given global variable. The gold amount is deducted from the active creature. The example script will give the party 50gp.
  IF
    Global("Cash","GLOBAL",50)
  THEN
    RESPONSE #100
      GivePartyGoldGlobal("Cash","GLOBAL")
  END
  

This action has not been seen to produce any results.

This action will open the specified door. If the door is locked the creature must possess the correct key or have sufficient strength to bash the door. Some doors central to the plot doors cannot be opened. The active creature can stick on this action if it fails.

  IF
    See("Door01"
    OpenState("Door01",FALSE)
    !See([GOODCUTOFF])
    !TargetUnreachable("Door01")
  THEN
    RESPONSE #100
      MoveToObjectNoInterrupt("Door01")
      Unlock("Door01" )
      OpenDoor("Door01")
  END
  

This action closes the specified door. The example script is from ar0300.bcs.

  IF
    OR(2)
    Global("LyrosJob","GLOBAL",3)
    Dead("lyros")
    Exists("Rylock")
    Global("RylockLeavesHarperDoor","AR0300",0)
  THEN
    RESPONSE #100
      SetGlobal("RylockLeavesHarperDoor","AR0300",1)
      CloseDoor("DOOR0308")
      Lock("DOOR0308")
      ActionOverride("Rylock",EscapeArea())
  END
  

This action has not been seen to produce any results.

This action causes the active creature to change animation to the specified animation (values from animate.ids)

  IF
    !InPartyAllowDead("Aerie")
    !Dead("Aerie")
    !GlobalGT("AerieTransform","GLOBAL",0)
    Global("Aerie","AR0607",0)
    Global("KalahI","AR0607",0)
  THEN
    RESPONSE #100
      MoveGlobal("Ar0607","Aerie",[318.378])
      ChangeEnemyAlly("Aerie",NEUTRAL)
      SetGlobal("Aerie","AR0607",1)
      ActionOverride("Aerie",Polymorph(MAGE_FEMALE_ELF))
      ActionOverride("Aerie",SetBeenInPartyFlags())
      SetGlobal("AerieTransform","GLOBAL",2)
  END
  

This action removes the specified spell from the spellbook of the active creature. The spell can be an innate ability, a priest spell or a wizard spell, but must be listed in spell.ids. Any memorised copies of the spell will not be removed.

  IF
    Global("KR_ANTI_PALADIN_CHANGE","LOCALS",1)
  THEN
    RESPONSE #100
      RemoveSpell(PALADIN_LAY_ON_HANDS)
      RemoveSpell(PALADIN_DETECT_EVIL)
      RemoveSpell(PALADIN_PROTECTION_FROM_EVIL)
      SetGlobal("KR_ANTI_PALADIN_CHANGE","LOCALS",2)
  END
  

This action has not been seen to produce any results.

This action instructs the active creature to equip the most damaging melee weapon from those available in the quickslots. Damage is calculated on the THAC0 bonus and damage - special bonuses versus creature types and elemental damages are not checked.

  IF
    See([EVILCUTOFF])
  THEN
    RESPONSE #100
      EquipMostDamagingMelee()
      Attack([EVILCUTOFF])
  END
  

This action starts the specified store with the specified object.

  IF
    Global("KRSTART_STORE","LOCALS",1)
  THEN
    RESPONSE #100
      StartStore("Tem4802",LastTalkedToBy())
  END
  

This action displays the strref specified by the StrRef parameter in the message window, attributing the text to the specified object.

  IF
    HasItem("potn52",Myself)
    HPPercentLT((),50)
  THEN
    RESPONSE #100
      UseItem("potn52",Myself)
      DisplayString(Myself,46150)
  END
  

This action changes the IDS identifiers for the active creature to the values specified. The object parameter must be in the IDS object form (i.e [EA.GENERAL.RACE.CLASS.SPECIFIC.GENDER.ALIGN]). If parameters are missing, they will default to 0. If a symbolic object is passed, all identifiers will be cleared and the IDS identifier bytes will be filled. ChangeAIType(NearestEnemyOf(LastSeenBy(LastTalkedToBy(LastTrigger())))) would zero Allegiance, General, Race, Class, Specific, Gender, and Alignment, set spec 1 to "Myself" (the object.ids value, 1), 2 to LastTrigger, 3 to LastTalkedToBy, 4 to LastSeenBy, and 5 to NearestEnemyOf.

This action changes the EA status of the target creature to the specified value. Values are from ea.ids.

  IF
    Global"KR_ENEMYALLY_CHANGE","LOCALS",0)
  THEN
    RESPONSE #100
     SetGlobal"KR_ENEMYALLY_CHANGE","LOCALS",1)
      ChangeEnemyAlly(Myself,NEUTRAL)
  END
  

This action changes the general status of the target creature to the specified value. Values are from general.ids.

  IF
    Global"KR_GENERAL_CHANGE","LOCALS" ,0)
  THEN
    RESPONSE #100
      SetGlobal"KR_GENERAL_CHANGE","LOCALS",1)
      ChangeGeneral(Myself,UNDEAD)
  END
  

This action changes the race of the target creature to the specified value. Values are from race.ids.

  IF
    Global"KR_RACE_CHANGE","LOCALS",0)
  THEN
    RESPONSE #100
      SetGlobal"KR_RACE_CHANGE","LOCALS",1)
      ChangeRace(Myself,DRAGON)
  END
  

This action changes the class of the target creature to the specified value. Values are from class.ids.

  IF
    Global"KR_CLASS_CHANGE","LOCALS",0)< br>
  THEN
    RESPONSE #100
      SetGlobal"KR_CLASS_CHANGE","LOCALS",1)
      ChangeClass(Myself,FIGHTER)
  END
  

This action changes the specific status of the target creature to the specified value. Values are from specific.ids. The action produces inconsistent results when used on player characters in multiplayer games. The specific value is represented by one byte, and so is limited to values 0-255. The example script assigns a script to a newly created simulacrum.

  IF
    See([ALLY])
    !InParty(LastSeenBy(Myself))
    !Gender(LastSeenBy(Myself),SUMMONED)
    !General(LastSeenBy(Myself),ANIMAL)
    !General(LastSeenBy(Myself),MONSTER)
    !General(LastSeenBy(Myself),UNDEAD)
    !General(LastSeenBy (Myself),GIANTHUMANOID)
    !Race(LastSeenBy(Myself),ELEMENTAL)
    !Race(LastSeenBy(Myself),MEPHIT)
    !Race(LastSeenBy(Myself),IMP)
    !HasItem("IMOENHP1&q uot;,LastSeenBy(Myself))
    !HasItem("MINHP1",LastSeenBy(Myself))
    !Specifics(LastSeenBy(Myself),100)
  THEN
    RESPONSE #100
      DisplayStringHead(LastSeenBy(Myself),26234) // 'Simulacrum'
      ActionOverride(LastSeenBy(Myself), ChangeAIScript("gbSim&quot;,DEFAULT))
      ChangeSpecifics(LastSeenBy(Myself),100)
  END
  

This action changes the gender of the target creature to the specified value. Values are from gender.ids. The example script changes the gender of summoned creatures to neither, to bypass the 5 concurrent summoned creatures limit.

  IF
    See([ALLY])
    !InParty(LastSeenBy(Myself))
    Gender(LastS eenBy(Myself),SUMMONED)
    !Specifics(LastSeenBy(Myself),3001)
  THEN
    RESPONSE #100
      ChangeGender(LastSeenBy(),NEITHER)
      ChangeSpecifics(LastSeenBy(Myself), 3001)
  END
  

This action changes the alignment of the target creature to the specified value. Values are from align.ids.

  IF
    Global"KR_ALIGN_CHANGE","LOCALS",0)<
  THEN
    RESPONSE #100
      SetGlobal"KR_ALIGN_CHANGE","LOCALS",1)
      ChangeAlignment(LastSeenBy(Myself),CHAOTIC_GOOD)
  END
  

This action causes the active creature to cast the specified spell at the target object. The spell is applied instantly; no casting animation is played. The spell cannot be interrupted. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. Note that for normal spellcasting the probability dice values for effects are rolled for each spell, whereas spells applied in the same scripting block by ApplySpell use a single dice value. The example script is used to mimic a contingency from mage18y.bcs.

  IF
    See(NearestEnemyOf(Myself))
    Global("Prep","LOCALS",0)
  THEN
    RESPONSE #100
      ApplySpell(Myself,WIZARD_STONE_SKIN)
      ApplySpell(Myself,WIZARD_SPELL_TRAP)
      ApplySpell(Myself,WIZARD_MIRROR_IMAGE)
      ApplySpell(Myself,WIZARD_SPELL_TURNING)
      ApplySpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
      ApplySpell(SixthNearestEnemyOf(Myself),WIZARD_MONSTER_SUMMONING_4)
      SetGlobal("Prep","LOCALS",1)
  END
  

This action is used to increment the chapter, and display a text screen (specified by the resref parameter - a 2DA file). The example script is from ar1803.bcs.

  IF
    Dead("Davaeorn")
    Global("Chapter","GLOBAL",4)
  THEN
    RESPONSE #100
      RevealAreaOnMap("AR0900")
      IncrementChapter("Chptxt5")
      AddJournalEntry(15839,USER)
  END
  

This action sets the reputation to the specified value.
  IF
    Global("KRGOODDEED","GLOBAL",0)
  THEN
    RESPONSE #100
      SetReputation(20)
      SG("KRGOODDEED",1)
  END
  

This action alters the reputation by the specified value (which can be either negative or positive). The example script is from baldur.bcs.

  IF
    InParty("Viconia")
    Global("ViconiaJoinedParty","GLOBAL",0)
  THEN
    RESPONSE #100
      ReputationInc(-2)
      SetGlobal("ViconiaJoinedParty","GLOBAL",1)
  END
  

This action gives the specified amount of experience to the party. The XP amount is distributed among all current living party members. The example script is from ar1300.bcs.
  IF
    OpenState("Bridge01",TRUE)
    Global("BridgeOpen","GLOBAL",0)
    !Dead("Torgal")
  THEN
    RESPONSE #100
    SetGlobal("BridgeOpen","GLOBAL",1)
    DisplayString(Myself,'The drawbridge has been lowered.')
    CreateCreature("KPCAPT03",[2400.1592],6)
    CreateCreature("KPSOLD03",[2425.1676],6)
    CreateCreature("KPSOLD04",[2371.1754],6)
    CreateCreature("KPSOLD05",[2315.1805],6)
    CreateCreature("TROLGI01",[2391.1592],0)
    CreateCreature("TROLGI02",[2282.1742],0)
    CreateCreature("KPYUAN01",[2251.1731],0)
    AddexperienceParty(29750)
  (cut short for brevity)
  

This action adds experience to the party, with the amount corresponding to a global variable.

  IF
    Global("MyXP","GLOBAL",0)
  THEN
    RESPONSE #100
      SetGlobal("MyXP","GLOBAL",50)
      AddExperiencePartyGlobal("MyXP","GLOBAL")
  END
  

This action sets the number of times the active creature has been talked to (by player characters). The example script is from ar0103.bcs.

  IF
    Global("BrielbaraMove","GLOBAL",1)
    !Exists("Brielbara")
    !Dead("Brielbara")
  THEN
    RESPONSE #100
      CreateCreature("BRIELB",[418.376],0)
      ActionOverride("Brielbara",SetNumTimesTalkedTo(1))
  END
  

This action is used to a play a movie (MVE file). The example script is from ar108.bcs.

  IF
    Global("EnteredPalace","GLOBAL",0)
  THEN
    RESPONSE #100
      StartMovie("PALACE")
      SetGlobal("EnteredPalace","GLOBAL",1)
  END
  

This action is used to initiate banter between NPCs. The example script is from edwin.bcs.

  IF
    InParty(Myself)
    Gender(Myself,FEMALE)
    InParty("Aerie")
    See("Aerie")
    !Dead("Aerie")
    !StateCheck("Aerie",STATE_SLEEPING)
    Range("Aerie",10)
    CombatCounter(0)
    !Range(SecondNearest([PC]),10)
    Global("EdwinW1","LOCALS",0)
  THEN
    RESPONSE #100
      Interact("Aerie")
  END
  

This action removes a single instance of the specified item from the active creature, unless the item exists in a stack, in which case the entire stack is removed. The example script is from ar1000.bcs.

  IF
    Global("CerndBaby","GLOBAL",1)
    Global("CerndBabyTake","AR1000",0)
  THEN
    RESPONSE #100
      SetGlobal("CerndBabyTake","AR1000",1)
      TakePartyItem("misc8t")
      DestroyItem("misc8t")
  END
  

This action reveals an area on the worldmap, enabling travelling to it.

  IF
    Dead("Davaeorn")
    Global("Chapter","GLOBAL",4)
  THEN
    RESPONSE #100
      RevealAreaOnMap("AR0900")
      IncrementChapter("Chptxt5")
      AddJournalEntry(15839,USER)
  END
  

This action gives the specified amount of gold to the party. The active creature need not have the gold in its "money variable". A negative amount will remove gold from the active creature.

  IF
    NumTimesTalkedTo(30)
  THEN
    RESPONSE #100
      SetNumTimesTalkedTo(31)
      GiveGoldForce(300)
  END
  

This action sets the open/closed graphic of a tile in a WED file.

This action adds an entry into the journal. The entry parameter is the strref to add, and the JourType is the type of entry (i.e. the location within the journal to add the entry to) - values are from jourtype.ids. The example script is from ar0511.bcs.

  IF
    Dead("JanGith1")
    Dead("JanGith2")
    Global("ThumbSeeker","GLOBAL",2)
    Global("HiddenJournal","AR0511",0)
  THEN
    RESPONSE #100
      SetGlobal("HiddenJournal","AR0511",1)
      AddJournalEntry(34726,QUEST)
  END
  

This action instructs the active creature to a ranged weapon from the weapons available in the quickslots.

  IF
    See([EVILCUTOFF])
    !Range([EVILCUTOFF],4)
    OR(28)
    !HasItemEquiped("Bow01",())
    !HasItemEquiped("Bow02",())
    !HasItemEquiped("Bow03",())
    !HasItemEquiped("Bow04",())
    !HasItemEquipedReal("Bow05",())
    !HasItemEquipedReal("Bow06",())
    !HasItemEquipedReal("Bow07",())
    !HasItemEquipedReal("Bow08",())
    !HasItemEquipedReal("Bow09",())
    !HasItemEquipedReal("Bow10",())
    !HasItemEquipedReal("Bow11",())
    !HasItemEquipedReal("Bow12",())
    !HasItemEquipedReal("Bow13",())
    !HasItemEquipedReal("Bow14",())
    !HasItemEquipedReal("Bow15",())
    !HasItemEquipedReal("Bow16",())
    !HasItemEquipedReal("Bow17",())
    !HasItemEquipedReal("Bow18",())
    !HasItemEquipedReal("Bow19",())
    !HasItemEquipedReal("Bow20",())
    !HasItemEquipedReal("Bow21",())
    !HasItemEquipedReal("Bow22",())
    !HasItemEquipedReal("Bow23",())
    !HasItemEquipedReal("Bow24",())
    !HasItemEquipedReal("Bow25",())
    !HasItemEquipedReal("Bow26",())
    !HasItemEquipedReal("Bow98",())
    !HasItemEquipedReal("Bow99",())
  THEN
    RESPONSE #100
      EquipRanged()
      AttackReevaluate([EVILCUTOFF],30)
  END
  

175 SetLeavePartyDialogueFile()
This action sets the dialog for the active creature to their leave dialog.

  IF
    !InParty(Myself)
    HPGT(Myself,0)
  THEN
    RESPONSE #100
      SetLeavePartyDialogFile()
      Dialogue(Player1)
      ChangeAIScript("",DEFAULT)
  END
  

This action instructs the active creature to search for the nearest travel trigger point for the specified time (measured in second) before giving up and just disappearing.

This action is used in conjunction with trigger region in ARE files. The action sets the activation state a trigger region (specified by the object parameter).

This action has not been seen to produce any results.

This action sets the interrupt state of the active creature. When set to false the creature cannot receive dialog requests or issue verbal constants. The interrupt state of a creature is not saved.

This action instructs the active creature to move to the specified object. Once the active creature reaches the object, it will follow the target if it moves. This behaviour continues until a different action is issued or until the target creature travels between areas.

This action causes the active creature to cast the specified spell at the target object. The spell need not currently be memorised by the caster, and will not be interrupted while being cast. The spell is cast instantly (i.e. with a casting time of 0). The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable. The example script is from suelfw9.bcs.

This action changes the active creature's selection circle to purple - making it unselectable. Creatures made unselectable stop processing scripts.

This action is used in multiplayer games to ensure that players are at the same point before continuing.

This action causes the active creature to run away from the specified creature, for the specified time. The time parameter is measured in AI updates, which default to 15 updates per second. Occasionally, fleeing creatures stop to attack another creature. Conditions are not checked until the time has expired.

This action adds the specified area to the top of the area script processing stack. When the player enters an area that is not in the mastarea.2da the associated script is added to the bottom of the area script processing stack. When the player enters an area that is in mastarea.2da the associated script is added to the top of the area script processing stack.

This action shows the ending credits.

This action tarts playing a music track. The slot parameter refers to the music slots contained in the ARE header. The flag parameter indicates how the music should be played - values are from mflags.ids.

This action removes all instances of the specified item from the party. The items are placed in the inventory of the active creature. Items contained in containers (e.g. Bag of Holding) are not taken.

This action changes the current area.

This action saves the game in the specified save slot.

191SpellNoDecRES(S:RES*,O:Target*)
This action causes the active creature to cast the specified spell at the target object. The spell need not be currently be memorised by the caster, and may be interrupted while being cast. The caster must meet the level requirements of the spell. The spell will not be removed from the casters memory after casting. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable.

192 SpellPointNoDecRES(S:RES*,P:Target*)
This action causes the active creature to cast the specified spell at the specified point ([x.y]). The spell must currently be memorised by the caster, and may be interrupted while being cast. The caster must meet the level requirements of the spell. The spell will be removed from the casters memory. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. The example script is from andris.bcs.

This action instructs the active creature to take the specified item from the party, if they are nearby. A range for the action cannot be specified.

This action will change the animation of the active creature to match that of the specified CRE file. If the active creature is in the party, the action will create the specified creature.

This action will lock the specified door/container.

This action will unlock the specified door/container.

This action will move the specified object to the target area, at the indicated point. The action will only work for creatures in the GAM file - i.e. NPCs or that have been added via MakeGlobal.

This action instructs the active creature to initiate dialog with the target object, using its currently assigned dialog file. This action can be used from a distance and will work whether the target creature is in sight or not. Dialog will not be initiated if the creature using this action has been assigned a dialog that has all top level conditions returning false. If the target is invalid, the active creature will initiate dialog with Player1.

This action displays a textscreen, showing text and graphics from the specified 2DA file.

200 RandomWalkContinuous()
This action causes the active creature to walk randomly, without pausing.

201 DetectSecretDoor(O:Object*)
This action will highlight the specified secret door in purple, to indicate it has been detected.

202 FadeToColor(P:Point*,I:Blue*)
This action will fade the screen. The point parameter is given in [x.y] format with the x coordinate specifying the number of AI updates (which default to 15 per second) to take to complete the fade action.

203 FadeFromColor(P:Point*,I:Blue*)
This action will unfade the screen. The point parameter is given in [x.y] format with the x coordinate specifying the number of AI updates (which default to 15 per second) to take to complete the fade action.

204 TakePartyItemNum(S:ResRef*,I:Num*)
This action will remove a number of instances (specified by the Num parameter) of the specified item from the party. The items will be removed from players in order, for example; Player1 has 3 instances of "MYITEM" in their inventory, Player2 has 2 instance of "MYITEM," and Player3 has 1 instance. If the action TakePartyItemNum("MYITEM", 4) is run, all 3 instances of "MYITEM" will be taken from Player1, and 1 instance will be taken from Player2. This leaves Player2 and Player3 each with one instance of "MYITEM." If the last item of an item type stored in a container STO file is removed by this action, the amount becomes zero. Items with zero quantities cannot be seen in-game, cannot be removed by TakePartyItem, and will not count toward a container's current item load. If the item to be taken is in a stack, and the stack is in a quickslot, the item will be removed, and the remaining stack will be placed in the inventory. If the inventory is full, the stack item will be dropped on the ground.

This action functions the same as Wait.

207 MoveToPointNoInterrupt(P:Point*)
This action causes the active creature to move to the specified coordinates. The action will update the position of creatures as stored in ARE files (first by setting the coordinates of the destination point, then by setting the coordinates of the current point once the destination is reached). Conditions are not checked until the destination point is reached.

208 MoveToObjectNoInterrupt(O:Object*)
This action instructs the active creature to move to the specified object. The action does not update the current position of the actor, saved in ARE files. Conditions are not checked until the destination point is reached.

209 SpawnPtActivate(O:Object*)
As it says, this action will activate a spawn point in an area. The Object should be the name of the spawn point as written in the ARE file.

210 SpawnPtDeactivate(O:Object*)
This action is used in conjunction with spawn points in ARE files. The action sets the enabled state of a spawn point (specified by the object parameter).

211 SpawnPtSpawn(O:Object*)
This action causes an activated spawn point to spawn creatures, regardless of whether the time for spawning has expired. The Object should be the name of the spawn point as written in the ARE file.

212 GlobalShout(I:ID*SHOUTIDS)
This action acts like Shout() without the range limit.

213 StaticStart(O:Object*)
This action is used in conjunction with animations in ARE files. The action will start the specified animation.

214 StaticStop(O:Object*)
This action is used in conjunction with animations in ARE files. The action will stop the specified animation.

215 FollowObjectFormation(O:Object*,I:Formation*,I:Position*)
This action instructs the active creature to follow the target object, in the specified formation, taking up the specified position. The Formation parameter represents the formation type (e.g. two lines, arrowhead, single line). The position should be in the range [0,5]. The example script is from dlsctc02.bcs.

  IF
    !Range("DLSCTC02",12)
    Global("DontFollow","DL0302",0)
  THEN
    RESPONSE #100
      FollowObjectFormation("DLSCTC02",1,6)
    RESPONSE #100
      FollowObjectFormation("DLSCTC02",1,5)
    RESPONSE #100
      FollowObjectFormation("DLSCTC02",2,6)
    RESPONSE #100
      FollowObjectFormation("DLSCTC02",2,5)
  END
  
  IF
    Global("FollowTheLeader","LOCALS",1)
    Range("DLSCTC02",6)
    Global("DontFollow","DL0302",0)
  THEN
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",0)
  END
  
  IF
    OR(2)
    !Range("DLSCTC02",9)
    Range("DLSCTC02",1)
    Global("DontFollow","DL0302",0)
  THEN
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",1,2)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",1,3)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",1,4)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",1,5)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",1,1)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",2,1)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",2,2)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",2,3)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",2,4)
    RESPONSE #100
      SetGlobal("FollowTheLeader","LOCALS",1)
      FollowObjectFormation("DLSCTC02",2,5)
  END
  

216 AddFamiliar()
This action causes the active creature to become the players ally. The active creature does not act as a normal familiar (i.e. no HP bonus or Constitution loss on death).

217 RemoveFamiliar()
This action removes the ally flag set by AddFamiliar.

218 PauseGame()
This action pauses the game. Script processing is halted while the game is paused.

219 ChangeAnimationNoEffect(S:ResRef*)
This action will change the animation of the active creature to match that of the specified CRE file. If the active creature is in the party, the action will create the specified creature. No lighting effects are played.

220 TakeItemListParty(S:ResRef*)
This action removes the items listed in the specified 2DA file from the party.

221 SetMoraleAI(I:Morale*MoraleAI)
This action has not been seen to produce any results.

222 IncMoraleAI(I:Morale*MoraleAI)
This action has not been seen to produce any results.

223 DestroyAllEquipment()
This action destroys all items on the active creature.

224 GivePartyAllEquipment()
This action causes the active creature to give all their items to the party.

225 MoveBetweenAreas(S:Area*,P:Location*,I:Face*)
This action will move the active creature to the specified point in the indicated area, facing the appropriate direction.

226 TakeItemListPartyNum(S:ResRef*,I:Num*)
This action will remove the specified number of items from the party, as listed in the specified 2DA file.

227 CreateCreatureObject(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)
This action will create the specified creature next to the specified object. The facing of the creature is controlled by the Usage1 parameter.

228 CreateCreatureImpassable(S:NewObject*,P:Location*,I:Face*)
This action creates the specified creature on a normally impassable surface (e.g. on a wall, on water, on a roof).

229 FaceObject(O:Object*)
This action instructs the active creature to face the target object.

230 RestParty()
This action duplicates the effects of resting. Such resting is not interruptible, and functions even if enemies are nearby.

231 CreateCreatureDoor(S:NewObject*,P:Location*,I:Face*)
This action creates the specified creature at the specified location, and plays the dimension door graphic.

232 CreateCreatureObjectDoor(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)
This action will create the specified creature next to the specified object, and plays the dimension door graphic. The facing of the creature is controlled by the Usage1 parameter.

233 CreateCreatureObjectOffScreen(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)
This action creates the specified creature just off-screen from the current viewpoint (the north/south/east/west direction is random). The facing of the creature is controlled by the Usage1 parameter.

234 MoveGlobalObjectOffScreen(O:Object*,O:Target*)
This action moves the object creature a screen away from the specified target creature. The target object must be stored in the GAM file (i.e. NPC or added explicitly via the MakeGlobal action.

235 SetQuestDone(I:STRREF*)
This action removes the specified strref from the quest section of the journal.

236 StorePartyLocations()
This action stores the current location of party members in the GAM file.

237 RestorePartyLocations()
This action moves the party to the stored locations (previously stored with StorePartyLocations). The action clears the stored locations from the GAM file.

238 CreateCreatureOffScreen(S:ResRef*,I:Face*)
This action creates the specified creature just offscreen from the active creature.

239 MoveToCenterOfScreen(I:NotInterruptableFor*)
This action moves the active creature to the centre of the screen. Script conditions are not checked for the specified duration (measured in seconds) or until the creature has reached the screen centre.

240 ReallyForceSpellDead(O:Target,I:Spell*Spell)
240 ReallyForceSpellDeadRES(S:RES*,O:Target)
This action has not been seen to produce any results.

241 Calm(O:Object)
This action reverses the effect of the Panic action, and may also remove other effects.

242 Ally()
This action changes the active creature's allegiance to ALLY (i.e. a green selection circle).

243 RestNoSpells()
This action rests the party, but doesn't force healing spells to be cast on injured party members.

244 SaveLocation(S:Area*,S:Global*,P:Point*)
This action is similar to StorePartyLocations() but with one object.

245 SaveObjectLocation(S:Area*,S:Global*,O:Object*)
This action stores the location of the specified object in the named variable.

  IF
    Global("SavedMyPos","LOCALS",0)
  THEN
    RESPONSE #50
      SetGlobal("SavedMyPos","LOCALS",1)
      SaveObjectLocation("LOCALS","DefaultLocation",Myself)
  END
  

246 CreateCreatureAtLocation(S:GLOBAL*,S:Area*,S:ResRef*)
This action creates the specified creature at the specified saved location.

247 SetToken(S:Token*,I:STRREF*)
This action sets the specified token to the specified value. Whenever the token is then used within a strref, the current value of the token will be displayed. Values assigned by this action are not saved.

248 SetTokenObject(S:Token*,O:Object)
This action can transfer a token value from the performer of the action to the target. The action can also be used for targeting: using SetTokenObject("MYTARGET",[ENEMY.0.0.MAGE_ALL]) will set a target marker on the nearest enemy mage. You could then use Attack("MYTARGET") to attack that mage. Values assigned by this action are not saved.

249 SetGabber(O:Object)
This action changes the current speaker in the party.

250 CreateCreatureObjectCopy(S:ResRef*,O:Object*,I:Usage1*,I:Usage2*,I:Usage3*)
This action creates the specified creature and sets its animation to that of the active creature.

251 HideAreaOnMap(S:ResRef*)
This action hides an area on the worldmap, preventing travelling to it.

252 CreateCreatureObjectOffset(S:ResRef*,O:Object*,P:Offset*)
This action creates the specified creature at a location offset from the target object point.

253 ContainerEnable(O:Object,I:Bool*BOOLEAN)
This action is used in conjunction with containers in ARE files. The action sets the enabled state of a container (specified by the object parameter).

254 ScreenShake(P:Point*,I:Duration*)
This action shakes the game view. The point parameter dictates how far to shake the screen along the x and y axis. The duration parameter dictates how long the shaking lasts.

255 AddGlobals(S:Name*,S:Name2*)
This action will add the variable specified by parameter 2 onto the variable specified by parameter 1. An example script is below.

  IF
    Global("Var1","GLOBAL",0)
  THEN
    RESPONSE #100
      SetGlobal("Var1","GLOBAL",75) //Var1 = 75
      SetGlobal("Var2","GLOBAL",25) //Var2 = 25
      AddGlobals("Var1","Var2") //Var1 = 100
  END
  

256 CreateItemNumGlobal(S:Global*,S:Area*,S:ResRef*)
256 CreateItemGlobal(S:Global*,S:Area*,S:ResRef*)
This action creates a quantity of items equal to a global variable on the active creature. The example script will create 50 arrows.

  IF
    Global("Arrows","LOCALS",0)
  THEN
    RESPONSE #100
      SetGlobal("Arrows","LOCALS",50)
      CreateItemNumGlobal("Arrows","LOCALS","AROW01")
  END
  

257 PickUpItem(S:ResRef*)
This action instructs the active creature remove the item from the area and put it in their inventory (assuming the inventory has enough room and the item exists).

258 FillSlot(I:Slot*SLOTS)
This action will attempt to fill a slot in the active creature's inventory with the appropriate item type. Using FillSlot(SLOT_WEAPON) will look for any weapon in the inventory, and move the first such item into the weapon slot. Any item already in the slot is destroyed.

259 AddXPObject(O:Object*,I:XP*)
This action adds the specified amount of XP onto the specified object.

260 DestroyGold(I:Gold*)
This action removes the specified amount of gold from the party.

261 SetHomeLocation(P:Point*)
This action stores a "home" location into memory for a creature. The location is not saved.

262 DisplayStringNoName(O:Object*,I:StrRef*)
This action displays the strref specified by the StrRef parameter in the message window, without attributing the text to an object.

263 EraseJournalEntry(I:STRREF*)
This action removes the specified strref from the journal, regardless of the journal section the entry is in - except the user section.

264 CopyGroundPilesTo(S:ResRef*,P:Location*)
This action copies all items lying around on the ground in the current area to the specified point in the target area.

265 DialogueForceInterrupt(O:Object*)
265 DialogForceInterrupt(O:Object*)
266 StartDialogInterrupt(S:DialogFile*,O:Target*)
266 StartDialogueInterrupt(S:DialogFile*,O:Target*)
267 StartDialogueNoSetInterrupt(O:Object*)
267 StartDialogNoSetInterrupt(O:Object*)
These actions work the same as their counterpart dialog actions. The only difference is that they are important enough to interrupt other dialogs already in action.

268 RealSetGlobalTimer(S:Name*,S:Area*,I:Time*GTimes)
This action sets a global timer measured in seconds (of real time).

269 DisplayStringHead(O:Object*,I:StrRef*)
This action displays the specified string over the head on the specified object (on the game-screen). The string may also be shown in the message log, depending on options specified in baldur.ini.

  IF
    HPPercentLT(Myself,50)
    HasItem("Potn52",Myself)
  THEN
    RESPONSE #100
      DisplayStringHead(Myself,46150)
      UseItem("Potn52",Myself)
  END

270 PolymorphCopy(O:Object*)
This action changes the animation of the active creature to match the animation of the target object.

271 VerbalConstantHead(O:Object*,I:Constant*soundOff)
This action plays the specified sound from the character's soundset.

272 CreateVisualEffect(S:Object*,P:Location*)
This action plays the animation specified by the Object parameter at the specified location ([x.y]). Animation preference order is applied, i.e. the engine first looks to play a VVC file of the specified name, if no such a file exists, the engine looks to play a BAM file of the specified.

273 CreateVisualEffectObject(S:DialogFile*,O:Target*)
This action plays the animation specified by the (mis-named) DialogFile parameter on the specified object. Animation preference order is applied, i.e. the engine first looks to play a VVC file of the specified name, if no such a file exists, the engine looks to play a BAM file of the specified.

274 AddKit(I:Kit*KIT)
This action removes the active creature's current kit and adds the specified kit. Abilities from any previous kit are removed. AddKit(0) can be used to remove a creatures current kit without adding a new one. Class restrictions apply for kits. When attempting adding an invalid kit, the existing kit (if any) will be replied.

225 MoveBetweenAreasEffect(S:Area*,S:Graphic*,P:Location*,I:Face*)
This action will move the active creature to the specified point in the indicated area, facing the appropriate direction, and plays the specified graphics when the creature disappears.

275 StartCombatCounter()
This action can be used to manually start the combat counter.

276 EscapeAreaNoSee()
This action has not been seen to produce any results.

277 EscapeAreaObject(O:Object*)
This action instructs the target object to EscapeArea().

277 EscapeAreaObjectMove(S:ResRef*,O:Object*,I:X*,I:Y*,I:Face*)
This action instructs the target object to leave the current area, either by walking, or, if the path is blocked, by simply disappearing. The action functions as a combination of EscapeAreaDestroy() and MoveBetweenAreas(). The parameters are similar to MoveBetweenAreas(), in that it takes in all the same information, but unlike MoveBetweenAras(), the character will search for the nearest travel trigger, move to that, then execute his movement to the specified area. If he cannot find a travel trigger, he will execute the movement.

278 TakeItemReplace(S:Give*,S:Take*,O:Object*)
This action replaces the item in second parameter with the item in first parameter. If the target does not have the item in the second parameter, the item in the first parameter will still be created in the inventory. Note that this action will not automatically equip the item that's created.

279 AddSpecialAbility(S:ResRef*)
This action adds the specified spell to the active creature. The message <creature_name> has gained a special ability: "Ability" is displayed in the message log.

280 DestroyAllDestructableEquipment()
This action destroys all destructible equipment on the active creature. Items flagged as indestructible (magical) will not be destroyed.

281 RemovePaladinHood()
This action changes a Paladin to a Fallen Paladin.

282 RemoveRangerHood()
This action changes a Ranger to a Fallen Ranger.

283 RegainPaladinHood()
This action restores a Fallen Paladin to normal Paladin status. Increments Reputation to 10?

284 RegainRangerHood()
This action restores a Fallen Ranger to normal Ranger status. Increments Reputation to 10?

285 PolymorphCopyBase(O:Object*)
This action copies the base animation (i.e. no armour or colouring) of the target creature to the active creature.

286 HideGUI()
This action hides the docking borders, menus, etc. on the sides of the screen.

287 UnhideGUI()
This action restores the docking borders, menus etc. to the sides of the screen.

288 SetName(I:STRREF*)
This action changes the name of the active creature to the specified strref.

289 AddSuperKit(I:Kit*KIT)
This action sets the active creatures kit to the specified kit . Abilities from any previous kits are kept. Class restrictions apply for kits. When attempting adding an invalid kit, the existing kit (if any) will be replied.

290 PlayDeadInterruptable(I:Time*)
290 PlayDeadInterruptible(I:Time*)
This action instructs the active creature to "play dead", i.e. to lay on the ground, for the specified interval (measured in AI updates per second (AI updates default to 15 per second). If used on a PC, the player can override the action by issuing a standard move command. Other conditions are checked during the play dead period.

291 MoveGlobalObject(O:Object*,O:Target*)
This action says to jump the object in the first parameter to the object in the second parameter. The object in the first parameter does NOT have to be in the same area as the target, but must already be present in the saved game (as either an NPC or MakeGlobal()).

292 DisplayStringHeadOwner(S:Item*,I:STRREF*)
This action displays the specified strref over the head of the creature with the specified item. The action only checks current party members.

293 StartDialogOverride(S:DialogFile*,O:Target*)
This action has not been seen to produce any results.

294 StartDialogOverrideInterrupt(S:DialogFile*,O:Target*)
This action has not been seen to produce any results.

295 CreateCreatureCopyPoint(S:ResRef*,O:Object*,P:Dest*)
This action creates the specified creature at the specified point and sets its animation to that of the active creature.

296 BattleSong()
This action instructs the active creature to play their associated bard song.

297 MoveToSavedLocation(S:GLOBAL*,S:Area*)
297 MoveToSavedLocationn(S:GLOBAL*,S:Area*)
This action instructs the active creature to move to the previously saved specified location.

  IF
    Global("MoveToLocation","LOCALS",0)
  THEN
   RESPONSE #50
      SetGlobal("MoveToLocation","LOCALS",1)
      MoveToSavedLocationn("DefaultLocation","LOCALS")
  END
  

298 ApplyDamage(O:Object*,I:Amount*,I:Type*DMGTYPE)
This action inflicts the specified amount of damage (of the specified type) on the target creature.

299 BanterBlockTime(I:Time*)
This action extends the time taken for the banter timer to expire. The banter timers are hardcoded and every time one expires an NPC's b****.dlg is called.

300 BanterBlockFlag(I:State*Boolean)
This action dictates whether the banter timer can expire.

301 AmbientActivate(O:Object*,I:State*BOOLEAN)
This action is used in conjunction with animations in ARE files. The action sets the enabled state of an animation (specified by the object parameter).


302 AttachTransitionToDoor(S:GLOBAL*,O:Object*)
This action is untested. It is likely that the first parameter refers to a transition trigger and the second parameter refers to a door type in an area. In this manner, the trigger is activated and deactivated based on the open state of the door.

303 DeathMatchPositionGlobal(S:Areaname*,P:Dest*,I:Player*)