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