Jump to content

IWD -TotL Action descriptions


Guest Grog

Recommended Posts

I noticed some of the TotL actions didn't have descriptions, so I thought I'd post some of them.

 

-- 236 SetSavedLocation() --

 

Sets the creature's saved location to its current location (?)

 

-- 237 ReturnToSavedLocation() --

 

Used in creature scripts to return it to, its saved location

 

IF
!NearSavedLocation(7)
THEN
RESPONSE #100
 ReturnToSavedLocation()
END

 

-- 239 SetInternal(O:Object*, I:Index*, I:Value*) --

 

Each creature in IWD has a set of 5 internal varibles. They are indexed from 0-4. Each index can contain an integer (IIRC it singel-digit only)

 

Example:

//*****Give Potions*****//

//Potion fo Healing -- Heal 9 HP
IF
Heard([PC],NEED_POTION)
!Range(LastHeardBy(Myself),0)
!HaveSpell(CLERIC_CURE_LIGHT_WOUNDS)
!HaveSpell(CLERIC_CURE_MODERATE_WOUNDS)
!HaveSpell(CLERIC_CURE_SERIOUS_WOUNDS)
!HaveSpell(CLERIC_CURE_CRITICAL_WOUNDS)
HasItem("POTN08",Myself)
HPPercentGT(Myself,50)
Internal(Myself,0,0)
THEN
RESPONSE #100
 GiveItem("POTN08",LastHeardBy(Myself))
 SetInternal(Myself,0,1)
END


IF
Heard([PC],RECIEVED_POTION)
!Range(LastHeardBy(Myself),0)
   Internal(Myself,0,1)
THEN
RESPONSE #100
 SetInternal(Myself,0,0)
END

 

-- 240 IncrementInternal(O:Object*, I:Index*, I:Value*) --

 

increases the value stored at index[X] by stated value. Value can be negative IIRC

 

 

-- 241 FloatMessage(O:Object*, I:STRREF*) --

 

DisplayStringHead() with a different name

 

 

-- 249 SetSavedLocationPoint(I:X*,I:Y*,I:Direction*Dir) --

 

Like SetSavedLocation, except sets it to a specific point

 

Example:

IF
!BitGlobal(":CREATURE_STATE_VAR","LOCALS",512,AND)
GlobalGT("MIREK_QUEST","GLOBAL",3)
THEN
RESPONSE #100
 SetSavedLocationPoint(2084,1714,SE)
 SetStartPos([2084.1714])
 BitGlobal(":CREATURE_STATE_VAR","LOCALS",512,OR)
 Continue()
END

 

 

-- 251 DropInventoryEX(O:Object) --

 

Drops all items in the creature's inventory (except items with the undroppable flag?)

 

-- 255 SetBestWeapon(O:Object*,I:Range*) --

 

If the target Object is inside range the character equips their most damaging melee weapon. If the target is outside the specified range a ranged weapon is equiped (most damaging ranged weapon?)

 

Example:

IF
See(NearestEnemyOf(Myself))
!Allegiance(NearestEnemyOf(Myself),PC)
THEN
RESPONSE #100
 Shout(ATTACKING)
 SetBestWeapon(NearestEnemyOf(Myself),6)
 AttackReevaluate(NearestEnemyOf(Myself),105)
END

 

-- 256 SetDialogueRange(I:Range*) --

 

Set the range that the object in Dialogue() or DialogueNoSet() must withing for those commands to trigger

 

Example:

IF
NumTimesTalkedTo(0)
See([PC])
!Allegiance(Myself,ENEMY)
!Dead(Myself)
THEN
RESPONSE #100
 SetDialogueRange(75)
 Dialogue([PC])
END

 

-- 258 RestUntilHealed() --

 

party rests until all PCs are fully healed. Healing Spells are cast??

 

-- 265 ExpansionEndCredits() --

 

Plays the HoW end credits

 

-- 266 TomsStringDisplayer(I:StrRef*) --

 

Works like FloatMessage() IIRC

 

-- 273 HideGUI() --

 

Same as BG2

 

-- 274 UnhideGUI() --

 

Same as BG2

 

-- 276 PlayBardSong(I:BardSong*bardsong) --

 

Character uses their Bard Song ability to the song specified (see BardSong.ids for more).

 

Example:

IF
   ActionListEmpty()
   CheckStatGT(Myself,2,LEVEL)
OR(2)
  !Global("grCurrentSongPlaying","LOCALS",1)
  !ModalState(Myself,BATTLESONG)
OR(6)
     StateCheck(Player1,STATE_PANIC)
     StateCheck(Player2,STATE_PANIC)
     StateCheck(Player3,STATE_PANIC)
     StateCheck(Player4,STATE_PANIC)
     StateCheck(Player5,STATE_PANIC)
     StateCheck(Player6,STATE_PANIC)
THEN
   RESPONSE #100
 SetGlobal("grCurrentSongPlaying","LOCALS",1)
       PlayBardSong(THE_TALE_OF_CURRAN_STRONGHEART)
END

 

Cheers,

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...