ielib 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bg1/index.d.ts +6 -0
- package/bg2/actions.d.ts +3509 -0
- package/bg2/align.ids.ts +2 -0
- package/bg2/animate.ids.ts +2 -0
- package/bg2/areaflag.ids.ts +2 -0
- package/bg2/areatype.ids.ts +2 -0
- package/bg2/astyles.ids.ts +9 -0
- package/bg2/class.ids.ts +2 -0
- package/bg2/damages.ids.ts +2 -0
- package/bg2/difflev.ids.ts +2 -0
- package/bg2/dmgtype.ids.ts +2 -0
- package/bg2/ea.ids.ts +3 -0
- package/bg2/gender.ids.ts +2 -0
- package/bg2/general.ids.ts +2 -0
- package/bg2/gtimes.ids.ts +2 -0
- package/bg2/happy.ids.ts +2 -0
- package/bg2/hotkey.ids.ts +2 -0
- package/bg2/index.ts +86 -0
- package/bg2/jourtype.ids.ts +2 -0
- package/bg2/kit.ids.ts +2 -0
- package/bg2/mflags.ids.ts +2 -0
- package/bg2/modal.ids.ts +2 -0
- package/bg2/npc.ids.ts +2 -0
- package/bg2/object.d.ts +366 -0
- package/bg2/object.ts +71 -0
- package/bg2/race.ids.ts +2 -0
- package/bg2/reaction.ids.ts +2 -0
- package/bg2/scrlev.ids.ts +2 -0
- package/bg2/scroll.ids.ts +2 -0
- package/bg2/seq.ids.ts +2 -0
- package/bg2/shoutids.ids.ts +13 -0
- package/bg2/slots.ids.ts +2 -0
- package/bg2/sndslot.ids.ts +2 -0
- package/bg2/soundoff.ids.ts +2 -0
- package/bg2/specific.ids.ts +2 -0
- package/bg2/spell.ids.ts +2008 -0
- package/bg2/state.ids.ts +122 -0
- package/bg2/stats.ids.ts +2 -0
- package/bg2/time.ids.ts +2 -0
- package/bg2/timeoday.ids.ts +2 -0
- package/bg2/triggers.d.ts +1088 -0
- package/bg2/weather.ids.ts +2 -0
- package/index.ts +82 -0
- package/package.json +8 -0
|
@@ -0,0 +1,1088 @@
|
|
|
1
|
+
import type { ObjectPtr, SpellID, ItmRef } from "../index";
|
|
2
|
+
|
|
3
|
+
import type { Align } from "./align.ids";
|
|
4
|
+
import type { AreaTypeID as AreaType } from "./areatype.ids";
|
|
5
|
+
import type { AStyles } from "./astyles.ids";
|
|
6
|
+
import type { ClassID as Class } from "./class.ids";
|
|
7
|
+
import type { Damages } from "./damages.ids";
|
|
8
|
+
import type { DiffLev } from "./difflev.ids";
|
|
9
|
+
import type { EA } from "./ea.ids";
|
|
10
|
+
import type { GenderID as Gender } from "./gender.ids";
|
|
11
|
+
import type { GeneralID as General } from "./general.ids";
|
|
12
|
+
import type { Happy } from "./happy.ids";
|
|
13
|
+
import type { HotKeyID as HotKey } from "./hotkey.ids";
|
|
14
|
+
import type { KitID as Kit } from "./kit.ids";
|
|
15
|
+
import type { NPC } from "./npc.ids";
|
|
16
|
+
import type { Modal } from "./modal.ids";
|
|
17
|
+
import type { RaceID as Race } from "./race.ids";
|
|
18
|
+
import type { ReactionID as Reaction } from "./reaction.ids";
|
|
19
|
+
import type { ShoutID } from "./shoutids.ids";
|
|
20
|
+
import type { Slots } from "./slots.ids";
|
|
21
|
+
import type { Specific } from "./specific.ids";
|
|
22
|
+
import type { State } from "./state.ids";
|
|
23
|
+
import type { Stats } from "./stats.ids";
|
|
24
|
+
import type { TimeID as Time } from "./time.ids";
|
|
25
|
+
import type { TimeODay } from "./timeoday.ids";
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* NT Returns true only if the current CRE obtained the specified item in the last script round. Trigger appears to be broken?
|
|
32
|
+
*/
|
|
33
|
+
declare function Acquired(resRef: string): boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 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).
|
|
37
|
+
*/
|
|
38
|
+
declare function AttackedBy(object: ObjectPtr, style: AStyles): boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Returns true if the specified object shouted for Help() in the two script rounds. Help() has a range of approximately 40.
|
|
42
|
+
*/
|
|
43
|
+
declare function Help(object: ObjectPtr): boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if the specified object has joined the party in the last script round. This trigger is only sent to player characters.
|
|
47
|
+
*/
|
|
48
|
+
declare function Joins(object: ObjectPtr): boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns true if the specified object has left the party in the last script round. This trigger is only sent to player characters.
|
|
52
|
+
*/
|
|
53
|
+
declare function Leaves(object: ObjectPtr): boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*/
|
|
58
|
+
declare function ReceivedOrder(object: ObjectPtr, orderID: number): boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* NT
|
|
62
|
+
*/
|
|
63
|
+
declare function Said(object: ObjectPtr, dialogID: number): boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* NT Returns true only if the active CRE was turned by the specified priest or paladin.
|
|
67
|
+
*/
|
|
68
|
+
declare function TurnedBy(object: ObjectPtr): boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* NT Returns true only if the specified item is unusable by the active CRE.
|
|
72
|
+
*/
|
|
73
|
+
declare function Unusable(resRef: string): boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Returns true only if the alignment of the specified object matches that in the second parameter.
|
|
77
|
+
*/
|
|
78
|
+
declare function Alignment(object: ObjectPtr, alignment: Align): boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Returns true only if the Enemy/Ally status of the specified object matches that in the second parameter.
|
|
82
|
+
*/
|
|
83
|
+
declare function Allegiance(object: ObjectPtr, allegiance: EA): boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Returns true only if the Class of the specified object matches that in the second parameter.
|
|
87
|
+
*/
|
|
88
|
+
declare function Class(object: ObjectPtr, classID: Class): boolean;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Returns true only if the specified object exists in the current area (note that dead creatures can still be counted as existing).
|
|
92
|
+
*/
|
|
93
|
+
declare function Exists(object: ObjectPtr): boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns true only if the General category of the specified object matches that in the second parameter.
|
|
97
|
+
*/
|
|
98
|
+
declare function General(object: ObjectPtr, general: General): boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Returns true only if the variable with name 1st parameter of type 2nd parameter has value 3rd parameter.
|
|
102
|
+
*/
|
|
103
|
+
declare function Global(name: string, area: string, value: number): boolean;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns true only if the current hitpoints of the specified object are equal to the 2nd parameter.
|
|
107
|
+
*/
|
|
108
|
+
declare function HP(object: ObjectPtr, hitPoints: number): boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns true only if the current hitpoints of the specified object are greater than the 2nd parameter.
|
|
112
|
+
*/
|
|
113
|
+
declare function HPGT(object: ObjectPtr, hitPoints: number): boolean;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns true only if the current hitpoints of the specified object are less than the 2nd parameter.
|
|
117
|
+
*/
|
|
118
|
+
declare function HPLT(object: ObjectPtr, hitPoints: number): boolean;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 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).
|
|
122
|
+
*/
|
|
123
|
+
declare function LOS(object: ObjectPtr, range: number): boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Returns true only if the morale of the specified object is equal to the second parameter.
|
|
127
|
+
*/
|
|
128
|
+
declare function Morale(object: ObjectPtr, morale: number): boolean;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns true only if the morale of the specified object is greater than thesecond parameter.
|
|
132
|
+
*/
|
|
133
|
+
declare function MoraleGT(object: ObjectPtr, morale: number): boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Returns true only if the morale of the specified object is less than the second parameter.
|
|
137
|
+
*/
|
|
138
|
+
declare function MoraleLT(object: ObjectPtr, morale: number): boolean;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Returns true only if the Race of the specified object is the same as that specified by the 2nd parameter.
|
|
142
|
+
*/
|
|
143
|
+
declare function Race(object: ObjectPtr, race: Race): boolean;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 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.
|
|
147
|
+
*/
|
|
148
|
+
declare function Range(object: ObjectPtr, range: number): boolean;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Returns true only if the reputation of the specified object is equal to the second parameter.
|
|
152
|
+
*/
|
|
153
|
+
declare function Reputation(object: ObjectPtr, reputation: number): boolean;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Returns true only if the reputation of the specified object is greater than the second parameter.
|
|
157
|
+
*/
|
|
158
|
+
declare function ReputationGT(object: ObjectPtr, reputation: number): boolean;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Returns true only if the reputation of the specified object is greater than the second parameter.
|
|
162
|
+
*/
|
|
163
|
+
declare function ReputationLT(object: ObjectPtr, reputation: number): boolean;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Returns true only if the active CRE can see the specified object which must not be hidden or invisible.
|
|
167
|
+
*/
|
|
168
|
+
declare function See(object: ObjectPtr): boolean;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 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.
|
|
172
|
+
*/
|
|
173
|
+
declare function Specifics(object: ObjectPtr, specifics: Specific): boolean;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 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.
|
|
177
|
+
*/
|
|
178
|
+
declare function Time(time: Time): boolean;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* As above but less specific and uses TimeODay.ids.
|
|
182
|
+
*/
|
|
183
|
+
declare function TimeOfDay(timeOfDay: TimeODay): boolean;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 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.
|
|
187
|
+
*/
|
|
188
|
+
declare function HitBy(object: ObjectPtr, dameType: Damages): boolean;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 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.
|
|
192
|
+
*/
|
|
193
|
+
declare function HotKey(key: HotKey): boolean;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 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.
|
|
197
|
+
*/
|
|
198
|
+
declare function TimerExpired(id: number): boolean;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Always returns true.
|
|
202
|
+
*/
|
|
203
|
+
declare function True(): boolean;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 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.
|
|
207
|
+
*/
|
|
208
|
+
declare function Trigger(triggerNum: number): boolean;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 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
|
|
212
|
+
*/
|
|
213
|
+
declare function Die(): boolean;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Returns true only if an action from the Attack, Spell or UseItem families that targeted the object specified cannot work with that target any more. That can happen from it not being in the area, deactivation, imprisonment, invisibility and sanctuary (provided true seeing options are not in play).
|
|
217
|
+
*/
|
|
218
|
+
declare function TargetUnreachable(object: ObjectPtr): boolean;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 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.
|
|
222
|
+
*/
|
|
223
|
+
declare function Delay(delay: number): boolean;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Returns true only if the number of creatures of the type specified in sight of the active CRE are equal to the 2nd parameter.
|
|
227
|
+
*/
|
|
228
|
+
declare function NumCreature(object: ObjectPtr, number: number): boolean;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* As above except for less than.
|
|
232
|
+
*/
|
|
233
|
+
declare function NumCreatureLT(object: ObjectPtr, number: number): boolean;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* As above except for greater than.
|
|
237
|
+
*/
|
|
238
|
+
declare function NumCreatureGT(object: ObjectPtr, number: number): boolean;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Returns true only if the active CRE has no actions waiting to be performed, i.e. is idle.
|
|
242
|
+
*/
|
|
243
|
+
declare function ActionListEmpty(): boolean;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* See HP(O:Object*,I:Hit Points*) except this is for a percentage.
|
|
247
|
+
*/
|
|
248
|
+
declare function HPPercent(object: ObjectPtr, hitPoints: number): boolean;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* See HPLT(O:Object*,I:Hit Points*) except this is for a percentage.
|
|
252
|
+
*/
|
|
253
|
+
declare function HPPercentLT(object: ObjectPtr, hitPoints: number): boolean;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* See HPGT(O:Object*,I:Hit Points*) except this is for a percentage.
|
|
257
|
+
*/
|
|
258
|
+
declare function HPPercentGT(object: ObjectPtr, hitPoints: number): boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* 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.
|
|
262
|
+
*/
|
|
263
|
+
declare function Heard(object: ObjectPtr, id: ShoutID): boolean;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* 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.
|
|
267
|
+
*/
|
|
268
|
+
declare function False(): boolean;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Returns true only if the active CRE has the specified spell memorised.
|
|
272
|
+
*/
|
|
273
|
+
declare function HaveSpell(spell: SpellID): boolean;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Returns true if the active CRE has at least one spell memorised.
|
|
277
|
+
*/
|
|
278
|
+
declare function HaveAnySpells(): boolean;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* NT Returns true only if the active CRE turned visible in the last script round.
|
|
282
|
+
*/
|
|
283
|
+
declare function BecameVisible(): boolean;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* See Global(S:Name*,S:Area*,I:Value*) except the variable must be greater than the value specified to be true.
|
|
287
|
+
*/
|
|
288
|
+
declare function GlobalGT(name: string, area: string, value: number): boolean;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* As above except for less than.
|
|
292
|
+
*/
|
|
293
|
+
declare function GlobalLT(name: string, area: string, value: number): boolean;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* 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).
|
|
297
|
+
*/
|
|
298
|
+
declare function OnCreation(): boolean;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Returns true only if the specified object is in the state specified.
|
|
302
|
+
*/
|
|
303
|
+
declare function StateCheck(object: ObjectPtr, state: State): boolean;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Exact opposite of above.
|
|
307
|
+
*/
|
|
308
|
+
declare function NotStateCheck(object: ObjectPtr, state: State): boolean;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* 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.
|
|
312
|
+
*/
|
|
313
|
+
declare function NumTimesTalkedTo(num: number): boolean;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Returns true only if the player's party has spoken to the active CRE more than the number of times specified.
|
|
317
|
+
*/
|
|
318
|
+
declare function NumTimesTalkedToGT(num: number): boolean;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Returns true only if the player's party has spoken to the active CRE less than the number of times specified.
|
|
322
|
+
*/
|
|
323
|
+
declare function NumTimesTalkedToLT(num: number): boolean;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* 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).
|
|
327
|
+
*/
|
|
328
|
+
declare function Reaction(object: ObjectPtr, value: Reaction): boolean;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* 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).
|
|
332
|
+
*/
|
|
333
|
+
declare function ReactionGT(object: ObjectPtr, value: Reaction): boolean;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* 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).
|
|
337
|
+
*/
|
|
338
|
+
declare function ReactionLT(object: ObjectPtr, value: Reaction): boolean;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* NT
|
|
342
|
+
*/
|
|
343
|
+
declare function GlobalTimerExact(name: string, area: string): boolean;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Returns true only if the timer with the name specified and of the type in the 2nd parameter has run and expired.
|
|
347
|
+
*/
|
|
348
|
+
declare function GlobalTimerExpired(name: string, area: string): boolean;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* 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 :) .
|
|
352
|
+
*/
|
|
353
|
+
declare function GlobalTimerNotExpired(name: string, area: string): boolean;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* 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).
|
|
357
|
+
*/
|
|
358
|
+
declare function PartyHasItem(item: ItmRef): boolean;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Returns true only if the specifed object is in the player's party.
|
|
362
|
+
*/
|
|
363
|
+
declare function InParty(object: ObjectPtr): boolean;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Returns true only if the specified object has the statistic in the 3rd parameter at the value of the 2nd parameter.
|
|
367
|
+
*/
|
|
368
|
+
declare function CheckStat(object: ObjectPtr, value: number, statNum: Stats): boolean;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Returns true only if the specified object has the statistic in the 3rd parameter greater than the value of the 2nd parameter.
|
|
372
|
+
*/
|
|
373
|
+
declare function CheckStatGT(object: ObjectPtr, value: number, statNum: Stats): boolean;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Returns true only if the specified object has the statistic in the 3rd parameter less than the value of the 2nd parameter.
|
|
377
|
+
*/
|
|
378
|
+
declare function CheckStatLT(object: ObjectPtr, value: number, statNum: Stats): boolean;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Generates a random number between 1 and Range. Returns true only if the random number equals the 2nd parameter.
|
|
382
|
+
*/
|
|
383
|
+
declare function RandomNum(range: number, value: number): boolean;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* NT As above except returns true only if the random number is greater than the 2nd parameter.
|
|
387
|
+
*/
|
|
388
|
+
declare function RandomNumGT(range: number, value: number): boolean;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* NT As above except returns true only if the random number is less than the 2nd parameter.
|
|
392
|
+
*/
|
|
393
|
+
declare function RandomNumLT(range: number, value: number): boolean;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Returns true only if the specifed object died in the last script round.
|
|
397
|
+
*/
|
|
398
|
+
declare function Died(object: ObjectPtr): boolean;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* NT Returns true if the active CRE killed the specified object in the last script round.
|
|
402
|
+
*/
|
|
403
|
+
declare function Killed(object: ObjectPtr): boolean;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Only for trigger regions in areas. Returns true only if the specified object entered the trigger region in the last script round.
|
|
407
|
+
*/
|
|
408
|
+
declare function Entered(object: ObjectPtr): boolean;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Returns true only if the gender of the specified object is that given in the 2nd parameter.
|
|
412
|
+
*/
|
|
413
|
+
declare function Gender(object: ObjectPtr, sex: Gender): boolean;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Returns true only if the player's party has the amount of gold specified in the 2nd parameter.
|
|
417
|
+
*/
|
|
418
|
+
declare function PartyGold(amount: number): boolean;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Returns true only if the player's party has more gold than specified in the 2nd parameter.
|
|
422
|
+
*/
|
|
423
|
+
declare function PartyGoldGT(amount: number): boolean;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Returns true only if the player's party has less gold than specified in the 2nd parameter.
|
|
427
|
+
*/
|
|
428
|
+
declare function PartyGoldLT(amount: number): boolean;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* 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.
|
|
432
|
+
*/
|
|
433
|
+
declare function Dead(name: string): boolean;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Only for door scripts. Returns true only if the specified object opened the active door in the last script round.
|
|
437
|
+
*/
|
|
438
|
+
declare function Opened(object: ObjectPtr): boolean;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Only for door scripts. Returns true only if the specified object closed the active door in the last script round.
|
|
442
|
+
*/
|
|
443
|
+
declare function Closed(object: ObjectPtr): boolean;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Only for trap scripts. Returns true only if the specified object detected this trap in the last script round.
|
|
447
|
+
*/
|
|
448
|
+
declare function Detected(object: ObjectPtr): boolean;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Only for trap scripts? Returns true only if this trap or trigger was reset in the last script round by the object specified.
|
|
452
|
+
*/
|
|
453
|
+
declare function Reset(object: ObjectPtr): boolean;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Only for trap/trigger region scripts. Returns true only if the specified object disarmed this trap in the last script round.
|
|
457
|
+
*/
|
|
458
|
+
declare function Disarmed(object: ObjectPtr): boolean;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* 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.
|
|
462
|
+
*/
|
|
463
|
+
declare function Unlocked(object: ObjectPtr): boolean;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Seems to be broken. Returns true only if the active CRE has no ammunition for the current ranged weapon.
|
|
467
|
+
*/
|
|
468
|
+
declare function OutOfAmmo(): boolean;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* NT Returns true only if the specified NPC has interacted with the party a number of times equal to the 2nd parameter.
|
|
472
|
+
*/
|
|
473
|
+
declare function NumTimesInteracted(nPC: NPC, num: number): boolean;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* NT Returns true only if the specified NPC has interacted with the party a number of times greater than the 2nd parameter.
|
|
477
|
+
*/
|
|
478
|
+
declare function NumTimesInteractedGT(nPC: NPC, num: number): boolean;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* NT Returns true only if the specified NPC has interacted with the party a number of times less than the 2nd parameter.
|
|
482
|
+
*/
|
|
483
|
+
declare function NumTimesInteractedLT(nPC: NPC, num: number): boolean;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* 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).
|
|
487
|
+
*/
|
|
488
|
+
declare function BreakingPoint(): boolean;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Seems to be broken. Not used in any existing scripts.
|
|
492
|
+
*/
|
|
493
|
+
declare function PickPocketFailed(object: ObjectPtr): boolean;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* For shopkeepers. Returns true if the specified object failed to steal from the shop in the last script round.
|
|
497
|
+
*/
|
|
498
|
+
declare function StealFailed(object: ObjectPtr): boolean;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* NT Not used in any existing scripts.
|
|
502
|
+
*/
|
|
503
|
+
declare function DisarmFailed(object: ObjectPtr): boolean;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* NT Not used in any existing scripts.
|
|
507
|
+
*/
|
|
508
|
+
declare function PickLockFailed(object: ObjectPtr): boolean;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* 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).
|
|
512
|
+
*/
|
|
513
|
+
declare function HasItem(item: ItmRef, object: ObjectPtr): boolean;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* NT Returns true only if the active CRE is interacting (dialogue?) with the specified object.
|
|
517
|
+
*/
|
|
518
|
+
declare function InteractingWith(object: ObjectPtr): boolean;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Returns true only if the specified object is within the range of the active CRE's currently equipped weapon.
|
|
522
|
+
*/
|
|
523
|
+
declare function InWeaponRange(object: ObjectPtr): boolean;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Returns true only if the specified object has a weapon in a quickslot.
|
|
527
|
+
*/
|
|
528
|
+
declare function HasWeaponEquiped(object: ObjectPtr): boolean;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* NT Returns true only if the specified object has the specified happiness value.
|
|
532
|
+
*/
|
|
533
|
+
declare function Happiness(object: ObjectPtr, amount: Happy): boolean;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* NT Returns true only if the specified object has greater than the specified happiness value.
|
|
537
|
+
*/
|
|
538
|
+
declare function HappinessGT(object: ObjectPtr, amount: Happy): boolean;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* NT Returns true only if the specified object has less than the specified happiness value.
|
|
542
|
+
*/
|
|
543
|
+
declare function HappinessLT(object: ObjectPtr, amount: Happy): boolean;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* 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.
|
|
547
|
+
*/
|
|
548
|
+
declare function TimeGT(time: Time): boolean;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* 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.
|
|
552
|
+
*/
|
|
553
|
+
declare function TimeLT(time: Time): boolean;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Returns true only if the number of party members (dead ones also count) is equal to the number specified.
|
|
557
|
+
*/
|
|
558
|
+
declare function NumInParty(num: number): boolean;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Returns true only if the number of party members (dead ones also count) is greater than the number specified.
|
|
562
|
+
*/
|
|
563
|
+
declare function NumInPartyGT(num: number): boolean;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Returns true only if the number of party members (dead ones also count) is less than the number specified.
|
|
567
|
+
*/
|
|
568
|
+
declare function NumInPartyLT(num: number): boolean;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* 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().
|
|
572
|
+
*/
|
|
573
|
+
declare function UnselectableVariable(num: number): boolean;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* 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().
|
|
577
|
+
*/
|
|
578
|
+
declare function UnselectableVariableGT(num: number): boolean;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* 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().
|
|
582
|
+
*/
|
|
583
|
+
declare function UnselectableVariableLT(num: number): boolean;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Only for trigger regions. Returns true if the specified object clicked on the trigger region running this script.
|
|
587
|
+
*/
|
|
588
|
+
declare function Clicked(object: ObjectPtr): boolean;
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Returns true only if the number of times the party has spoken to this creature is equal to the number specified.
|
|
592
|
+
*/
|
|
593
|
+
declare function NumberOfTimesTalkedTo(num: number): boolean;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Returns true only if the number of creatures with script name "Name" that have been killed is equal to the 2nd parameter.
|
|
597
|
+
*/
|
|
598
|
+
declare function NumDead(name: string, num: number): boolean;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Returns true only if the number of creatures with script name "Name" that have been killed is greater than the 2nd parameter.
|
|
602
|
+
*/
|
|
603
|
+
declare function NumDeadGT(name: string, num: number): boolean;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Returns true only if the number of creatures with script name "Name" that have been killed is less than the 2nd parameter.
|
|
607
|
+
*/
|
|
608
|
+
declare function NumDeadLT(name: string, num: number): boolean;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* 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.
|
|
612
|
+
*/
|
|
613
|
+
declare function Detect(object: ObjectPtr): boolean;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Returns true only if the item specified in parameter 1 is in the container specified in parameter 2.
|
|
617
|
+
*/
|
|
618
|
+
declare function Contains(resRef: string, object: ObjectPtr): boolean;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* NT Returns true only if the open state of the specified door matches the state specified in the 2nd parameter.
|
|
622
|
+
*/
|
|
623
|
+
declare function OpenState(object: ObjectPtr, open: Boolean): boolean;
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* 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.
|
|
627
|
+
*/
|
|
628
|
+
declare function NumItems(resRef: string, object: ObjectPtr, num: number): boolean;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* 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.
|
|
632
|
+
*/
|
|
633
|
+
declare function NumItemsGT(resRef: string, object: ObjectPtr, num: number): boolean;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* 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.
|
|
637
|
+
*/
|
|
638
|
+
declare function NumItemsLT(resRef: string, object: ObjectPtr, num: number): boolean;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Returns true only if the party has a total number of items of the type specified equal to the 2nd parameter.
|
|
642
|
+
*/
|
|
643
|
+
declare function NumItemsParty(resRef: string, num: number): boolean;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Returns true only if the party has a total number of items of the type specified greater than the 2nd parameter.
|
|
647
|
+
*/
|
|
648
|
+
declare function NumItemsPartyGT(resRef: string, num: number): boolean;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Returns true only if the party has a total number of items of the type specified less than the 2nd parameter.
|
|
652
|
+
*/
|
|
653
|
+
declare function NumItemsPartyLT(resRef: string, num: number): boolean;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Only for trigger regions. Returns true only if the specified object is over the trigger running the script.
|
|
657
|
+
*/
|
|
658
|
+
declare function IsOverMe(object: ObjectPtr): boolean;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Returns true only if the active CRE is in the area specified.
|
|
662
|
+
*/
|
|
663
|
+
declare function AreaCheck(resRef: string): boolean;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Returns true if the specified object has the specified item outside the general inventory slots (does not check for equipped status). This trigger does not work for Melf's Minute Meteors or other magically created weapons.
|
|
667
|
+
*/
|
|
668
|
+
declare function HasItemEquiped(item: ItmRef, object: ObjectPtr): boolean;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* 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.
|
|
672
|
+
*/
|
|
673
|
+
declare function NumCreatureVsParty(object: ObjectPtr, number: number): boolean;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* 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.
|
|
677
|
+
*/
|
|
678
|
+
declare function NumCreatureVsPartyLT(object: ObjectPtr, number: number): boolean;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* 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.
|
|
682
|
+
*/
|
|
683
|
+
declare function NumCreatureVsPartyGT(object: ObjectPtr, number: number): boolean;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* 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.
|
|
687
|
+
*/
|
|
688
|
+
declare function CombatCounter(number: number): boolean;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Returns true only if the combat counter (counts down from 150 after each attack) is less than the value specified.
|
|
692
|
+
*/
|
|
693
|
+
declare function CombatCounterLT(number: number): boolean;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* 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.
|
|
697
|
+
*/
|
|
698
|
+
declare function CombatCounterGT(number: number): boolean;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* 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.
|
|
702
|
+
*/
|
|
703
|
+
declare function AreaType(number: AreaType): boolean;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* NT Only for trigger regions/traps. Returns true if this trap was triggered by the object specified.
|
|
707
|
+
*/
|
|
708
|
+
declare function TrapTriggered(triggerer: ObjectPtr): boolean;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* NT Returns true only if the party member specified died in the last script round.
|
|
712
|
+
*/
|
|
713
|
+
declare function PartyMemberDied(object: ObjectPtr): boolean;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Returns true if any of the next 'OrCount' triggers returns true.
|
|
717
|
+
*/
|
|
718
|
+
declare function OR(orCount: number): boolean;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* 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.
|
|
722
|
+
*/
|
|
723
|
+
declare function InPartySlot(object: ObjectPtr, slot: number): boolean;
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Returns true only if the specified object cast the spell in the 2nd paramater in the last script round.
|
|
727
|
+
*/
|
|
728
|
+
declare function SpellCast(object: ObjectPtr, spell: SpellID): boolean;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* InLine(S:Target*,O:Object*) seems to have no effect. InLine(O:Object*) returns true if the active creature can see the target creature.
|
|
732
|
+
*/
|
|
733
|
+
declare function InLine(target: string, object: ObjectPtr): boolean;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Returns true if the party has just finished resting.
|
|
737
|
+
*/
|
|
738
|
+
declare function PartyRested(): boolean;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Returns true only if the experience level of the specified object equals the 2nd parameter.
|
|
742
|
+
*/
|
|
743
|
+
declare function Level(object: ObjectPtr, level: number): boolean;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Returns true only if the experience level of the specified object is greater than the 2nd parameter.
|
|
747
|
+
*/
|
|
748
|
+
declare function LevelGT(object: ObjectPtr, level: number): boolean;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Returns true only if the experience level of the specified object is less than the 2nd parameter.
|
|
752
|
+
*/
|
|
753
|
+
declare function LevelLT(object: ObjectPtr, level: number): boolean;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* NT Returns true only if the active CRE summoned the specified object in the last script round.
|
|
757
|
+
*/
|
|
758
|
+
declare function Summoned(object: ObjectPtr): boolean;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Returns true only if the 2 global variables specified have equal values.
|
|
762
|
+
*/
|
|
763
|
+
declare function GlobalsEqual(name1: string, name2: string): boolean;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Returns true only if the 1st global variable has a value greater than the 2nd one.
|
|
767
|
+
*/
|
|
768
|
+
declare function GlobalsGT(name1: string, name2: string): boolean;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Returns true only if the 1st global variable has a value less than the 2nd one.
|
|
772
|
+
*/
|
|
773
|
+
declare function GlobalsLT(name1: string, name2: string): boolean;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Returns true only if the 2 local variables specified have equal values.
|
|
777
|
+
*/
|
|
778
|
+
declare function LocalsEqual(name1: string, name2: string): boolean;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Returns true only if the 1st local variable has a value less than the 2nd one.
|
|
782
|
+
*/
|
|
783
|
+
declare function LocalsGT(name1: string, name2: string): boolean;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Returns true only if the 1st local variable has a value less than the 2nd one.
|
|
787
|
+
*/
|
|
788
|
+
declare function LocalsLT(name1: string, name2: string): boolean;
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Returns true only if the specified object has no actions waiting to be performed.
|
|
792
|
+
*/
|
|
793
|
+
declare function ObjectActionListEmpty(object: ObjectPtr): boolean;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Returns true if the specified object is on the screen.
|
|
797
|
+
*/
|
|
798
|
+
declare function OnScreen(object: ObjectPtr): boolean;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* 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.
|
|
802
|
+
*/
|
|
803
|
+
declare function InActiveArea(object: ObjectPtr): boolean;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Returns true only if the specified object cast the specified spell on the active CRE in the last scriptround. Returns false for spells whose Ability target (offset 0xC) is 4 (Any point within range).
|
|
807
|
+
*/
|
|
808
|
+
declare function SpellCastOnMe(caster: ObjectPtr, spell: SpellID): boolean;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* NT Returns true only if the current day is the day specified.
|
|
812
|
+
*/
|
|
813
|
+
declare function CalanderDay(day: number): boolean;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* NT Returns true only if the current day is after the day specified.
|
|
817
|
+
*/
|
|
818
|
+
declare function CalanderDayGT(day: number): boolean;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* NT Returns true only if the current day is before the day specified.
|
|
822
|
+
*/
|
|
823
|
+
declare function CalanderDayLT(day: number): boolean;
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Returns true only if the object in the 2nd parameter has the scriptname specified.
|
|
827
|
+
*/
|
|
828
|
+
declare function Name(name: string, object: ObjectPtr): boolean;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Returns true only if the specified object cast the specified priest spell in the last script round.
|
|
832
|
+
*/
|
|
833
|
+
declare function SpellCastPriest(object: ObjectPtr, spell: SpellID): boolean;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* 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.
|
|
837
|
+
*/
|
|
838
|
+
declare function SpellCastInnate(object: ObjectPtr, spell: SpellID): boolean;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
*
|
|
842
|
+
*/
|
|
843
|
+
declare function IsValidForPartyDialog(object: ObjectPtr): boolean;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
*
|
|
847
|
+
*/
|
|
848
|
+
declare function IfValidForPartyDialog(object: ObjectPtr): boolean;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
*
|
|
852
|
+
*/
|
|
853
|
+
declare function IsValidForPartyDialogue(object: ObjectPtr): boolean;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Returns true only if that specifed party member can take part in party dialogue.
|
|
857
|
+
*/
|
|
858
|
+
declare function IfValidForPartyDialogue(object: ObjectPtr): boolean;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Returns true only if the party has the item specified and it is identified.
|
|
862
|
+
*/
|
|
863
|
+
declare function PartyHasItemIdentified(item: ItmRef): boolean;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Returns true if any of the specified object is currently affected by any of the listed effects: 0xc5 Bounce Projectile 0xc6 Bounce Opcode 0xc7 Bounce Spell Level 0xc8 0xca Bounce Spell School 0xcb Bounce Secondary Type 0xcf Bounce Specified School 0xe3 Bounce School Decrement 0xe4 Bounce Secondary Type Decrement
|
|
867
|
+
*/
|
|
868
|
+
declare function HasBounceEffects(object: ObjectPtr): boolean;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Returns true if any of the specified object is currently affected by any of the listed effects: 0x53 Protection from projectiles 0x65 Protection from effects 0xa9 Protection from portrait icon (this is a subtype of 0x65) 0x10b Protection from display string (also a subtype of 0x65) 0x128 Protection from visual effect (also a subtype of 0x65) 0x66 Immunity to spell level 0xc9 Decrementing spell level immunity 0xcc Immunity to primary type (school) 0xcd Immunity to secondary type 0xdf Decrementing immunity to primary type 0xe2 Decrementing immunity to secondary type
|
|
872
|
+
*/
|
|
873
|
+
declare function HasImmunityEffects(object: ObjectPtr): boolean;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Returns true only if the specified object has an item in the specified slot. This trigger does not work for Melf's Minute Meteors.
|
|
877
|
+
*/
|
|
878
|
+
declare function HasItemSlot(object: ObjectPtr, slot: Slots): boolean;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* NT Returns true if the specified object exactly as far away from the active CRE as the 2nd parameter specifies.
|
|
882
|
+
*/
|
|
883
|
+
declare function PersonalSpaceDistance(object: ObjectPtr, range: number): boolean;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Returns true only if the specifics value of the specified object is the same as that of the active CRE.
|
|
887
|
+
*/
|
|
888
|
+
declare function InMyGroup(object: ObjectPtr): boolean;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* NT
|
|
892
|
+
*/
|
|
893
|
+
declare function RealGlobalTimerExact(name: string, area: string): boolean;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* 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.
|
|
897
|
+
*/
|
|
898
|
+
declare function RealGlobalTimerExpired(name: string, area: string): boolean;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* NT Returns true only if the timer with the specified name of the specified area has been set and has not yet expired.
|
|
902
|
+
*/
|
|
903
|
+
declare function RealGlobalTimerNotExpired(name: string, area: string): boolean;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Returns true only if the number of party members alive is equal to the number specified.
|
|
907
|
+
*/
|
|
908
|
+
declare function NumInPartyAlive(num: number): boolean;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Returns true only if the number of party members alive is greater than the number specified.
|
|
912
|
+
*/
|
|
913
|
+
declare function NumInPartyAliveGT(num: number): boolean;
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Returns true only if the number of party members alive is less than the number specified.
|
|
917
|
+
*/
|
|
918
|
+
declare function NumInPartyAliveLT(num: number): boolean;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* NT Returns true only if the specified object is of the kit specified. NB. A creature's assigned kit is stored as a dword, however the Kit() trigger only checks the upper word. This, in conjunction with various incorrect values in the game cre files, and an incorrect kits.ids file, means the Kit() trigger can often fail. For optimal usage, the default kit.ids file should be replaced with the updated one listed in the BG2: ToB ids page.
|
|
922
|
+
*/
|
|
923
|
+
declare function Kit(object: ObjectPtr, kit: Kit): boolean;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Returns true only if the specified object is the current speaker (in a dialog).
|
|
927
|
+
*/
|
|
928
|
+
declare function IsGabber(object: ObjectPtr): boolean;
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* 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.
|
|
932
|
+
*/
|
|
933
|
+
declare function IsActive(object: ObjectPtr): boolean;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* NT Returns true only if the specified object has the character name specified.
|
|
937
|
+
*/
|
|
938
|
+
declare function CharName(name: string, object: ObjectPtr): boolean;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* NT Returns true only if the specified object is a fallen ranger.
|
|
942
|
+
*/
|
|
943
|
+
declare function FallenRanger(object: ObjectPtr): boolean;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* NT Returns true only if the specified object is a fallen ranger.
|
|
947
|
+
*/
|
|
948
|
+
declare function FallenPaladin(object: ObjectPtr): boolean;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Returns true only if the specified object can carry no more items.
|
|
952
|
+
*/
|
|
953
|
+
declare function InventoryFull(object: ObjectPtr): boolean;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Returns true if the specified object has the specified item outside the general inventory slots. Unlike HasItemEquiped it only checks the equipped weapon slot, not all of them. This trigger does not work for Melf's Minute Meteors or other magically created weapons.
|
|
957
|
+
*/
|
|
958
|
+
declare function HasItemEquipedReal(item: ItmRef, object: ObjectPtr): boolean;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Returns true if the specified object has experience points equal to the number specified.
|
|
962
|
+
*/
|
|
963
|
+
declare function XP(object: ObjectPtr, xP: number): boolean;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Returns true if the specified object has experience points greater than the number specified.
|
|
967
|
+
*/
|
|
968
|
+
declare function XPGT(object: ObjectPtr, xP: number): boolean;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Returns true if the specified object has experience points less than the number specified.
|
|
972
|
+
*/
|
|
973
|
+
declare function XPLT(object: ObjectPtr, xP: number): boolean;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* This trigger acts as a shortcut for Global(). The trigger can only check global variables.
|
|
977
|
+
*/
|
|
978
|
+
declare function G(resRef: string, num: number): boolean;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* This trigger acts as a shortcut for GlobalGT(). The trigger can only check global variables.
|
|
982
|
+
*/
|
|
983
|
+
declare function GGT(resRef: string, num: number): boolean;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* This trigger acts as a shortcut for GlobalLT(). The trigger can only check global variables.
|
|
987
|
+
*/
|
|
988
|
+
declare function GLT(resRef: string, num: number): boolean;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Returns true only if the active CRE is in the state/mode specified. e.g. detecting traps.
|
|
992
|
+
*/
|
|
993
|
+
declare function ModalState(state: Modal): boolean;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Returns true only if the specified object is in the same area as the active CRE.
|
|
997
|
+
*/
|
|
998
|
+
declare function InMyArea(object: ObjectPtr): boolean;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Returns true if some type of damage was caused to the active CRE (and HP were lost) in the last script round.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function TookDamage(): boolean;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* 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.
|
|
1007
|
+
*/
|
|
1008
|
+
declare function DamageTaken(amount: number): boolean;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* 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).
|
|
1012
|
+
*/
|
|
1013
|
+
declare function DamageTakenGT(amount: number): boolean;
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* See above and HPLT.
|
|
1017
|
+
*/
|
|
1018
|
+
declare function DamageTakenLT(amount: number): boolean;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* NT Returns true only if the game difficulty setting is of the level specified.
|
|
1022
|
+
*/
|
|
1023
|
+
declare function Difficulty(amount: DiffLev): boolean;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* NT Returns true only if the game difficulty setting is greater than the level specified.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function DifficultyGT(amount: DiffLev): boolean;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* NT Returns true only if the game difficulty setting is less than the level specified.
|
|
1032
|
+
*/
|
|
1033
|
+
declare function DifficultyLT(amount: DiffLev): boolean;
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* NT Returns true if the specified object which can be dead or alive is in the party.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function InPartyAllowDead(object: ObjectPtr): boolean;
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns true if the specified object is in the area specified. This trigger can cause a crash if the specified area is not loaded.
|
|
1042
|
+
*/
|
|
1043
|
+
declare function AreaCheckObject(resRef: string, object: ObjectPtr): boolean;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Returns true if combat counter is greater than 0. Confirmed as working in SoA.
|
|
1047
|
+
*/
|
|
1048
|
+
declare function ActuallyInCombat(): boolean;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* NT Only for trigger regions. Returns true if the specified object has walked to this trigger.
|
|
1052
|
+
*/
|
|
1053
|
+
declare function WalkedToTrigger(object: ObjectPtr): boolean;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* 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.
|
|
1057
|
+
*/
|
|
1058
|
+
declare function LevelParty(num: number): boolean;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* 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.
|
|
1062
|
+
*/
|
|
1063
|
+
declare function LevelPartyGT(num: number): boolean;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* 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.
|
|
1067
|
+
*/
|
|
1068
|
+
declare function LevelPartyLT(num: number): boolean;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Returns true if any of the party members have the specified spell memorised.
|
|
1072
|
+
*/
|
|
1073
|
+
declare function HaveSpellParty(spell: SpellID): boolean;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* ToB only. Returns true if the active CRE has the specified (by the string parameter) spell memorised.
|
|
1077
|
+
*/
|
|
1078
|
+
declare function HaveSpellRES(spell: string): boolean;
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* ToB only. Returns true only if the active CRE is in a Watcher's Keep (i.e. the current area begins with AR30).
|
|
1082
|
+
*/
|
|
1083
|
+
declare function AmIInWatchersKeepPleaseIgnoreTheLackOfApostophe(): boolean;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* ToB only. Returns true only if the active CRE is in a Watcher's Keep (i.e. the current area begins with AR30).
|
|
1087
|
+
*/
|
|
1088
|
+
declare function InWatchersKeep(): boolean;
|