DRPG Scripts
PROPHESSOR edited this page Nov 3, 2018
·
1 revision
s.a(IIIII)Z = executeScriptCommand
Commands:
1: Change Location
arg1: Orientation (bits 23-20) (N: - S: - E: - W: 8)
Location Y,X on coarse grid (bits 15-0)
2: Change Level
arg1: Flags, level
Completed current level (bit 31)
unknown (bits 30-8)
Level filename (local string index, bits 7-0)
3: Run Event Script
arg1: Event location Y,X (bits 15-0)
4: Show Status Bar Message
arg1: Message (string index, bits 15-8)
5: Damage player and show 'Pain!' message ~~Not Used~~
arg1: Damage amount (bits 15-8)
6: Not Used
7: Show Thing
arg1: Thing state (bits 15-8) (state 0: normal, state 2: dead)
Thing id (bits 7-0)
8: Show Message
arg1: Message (string index, bits 15-8)
9: Get Map Data
10: Enter Passcode (Halt on failure)
arg1: Prompt (string index, bits 15-8)
11: Set Event Variable
arg1: Value (bits 31-16)
Event Variable to Modify (bits 15-0, coarse grid Location)
12: Lock Door
arg1: Door (line segment index)
13: Unlock Door
arg1: Door (line segment index)
14: Not Used
15: Open Door
arg1: Door line segment index
16: Close Door
arg1: Door line segment index
17: Not Used
18: Hide Things at Location
arg1: coarse grid Location (bits 15-0)
19: Increment Event Variable (maximum is 9 (???))
arg1: event variable (bits 15-0)
(increases by 2x after zero: 0, 1, 2, 4, 8, etc.)
20: Decrement Event Variable (minimum is 0 (???))
arg1: event variable (bits 15-0)
(increases by 2x after zero: 0, 1, 2, 4, 8, etc.)
21: Increase Status Item Count
arg1: Amount to gain (bits 11-8)
Status item (bits 7-0) health: 0, armor: 1, credits: 2
22: Decrease Status Item Count
arg1: Amount to lose (bits 11-8)
Status item (bits 7-0) health: 0, armor: 1, credits: 2
23: Show Message and Halt IF Status Item Count is less than Amount
arg1: Message string index (bits 31-16)
Amount (bits 15-8)
Status item (bits 7-0) health: 0, armor: 1, credits: 2
24: Show Status Bar Message
arg1: Message (string index, bits 15-8)
25: Explosion
arg1: type? (bits 31-24), location on coarse grid (bits 23-0)
26: Show Message (there's some difference from #8)
arg1: Message (string index, bits 15-8)
27: Change Level Parameters (called before command 2)
arg1: unknown (bits 31-24)
Start Level At coarse grid Location Y,X (bits 23-8)
unknown (bits 7-0)
28: Freezes player for 1 turn.
29: Shake Effect
arg1: Intensity (bits 31-24), duration in ms (bits 23-0)
30: Set Floor Color
arg2: Color BGR888 (bits 23-0)
31: Set Ceiling Color
arg1: Color BGR888 (bits 23-0)
32: Give/Take All Collected Weapons
arg1: 0 - Take, 1 - Give
33: Open Store
arg1: store id (0, 1, 2, or 3)
34: Set State of Thing at coarse grid Location (used only to kill humans)
arg1: State (Bits 23-16) (state 2: dead)
unknown (bits 15-10)
Human coarse grid location Y (bits 9-5)
Human coarse grid location X (bits 4-0)
35: Particle Effect
arg1: effect (bits 31-24)
color BGR888 (bits 23-0)
(Effects: 0x20 blood spurt, 0x23 teleport/transformation)
36: Draw Frame
37: Wait
arg1: time to wait in ms (bits 23-0)
38: Unknown. Used Only Once (in reactor.bsp in the "gate lift" script) Related to the portal?
39: Show message IF [some level] not complete
arg1: Level id (bits 31-24) from bsp header
Message (string index, bits 15-8)
40: Add Notebook Entry
arg1: Note (string index, bits 15-8)
41: Halt IF missing keycard
arg1: Keycard id (bits 1-0)
(Green: 0, Yellow: 1, Blue: 2, Red: 3)