-
Notifications
You must be signed in to change notification settings - Fork 3
/
gnostair.tsct
233 lines (217 loc) · 5.49 KB
/
gnostair.tsct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
/*
* This file was auto-generated using 'silver-reversing-sct' tool
* to better understand the scripts presented, one is encouraged to
* view the catalogs at:
* https://github.com/nadavshemesh/silver-reversing-sct/blob/master/docs/index.md
*
* Any further information and support of this project please visit:
* https://github.com/nadavshemesh/silver-reversing-sct
*/
._DATA
VAR_0 { -2371, -1003, -1381 }
DAVID1 0
init_position1 { -1998, 3, -2593 }
init_position { -1928, 1003, -1586 }
init_position2 { -2231, 3, -2470 }
VAR_11 { -2936, 3, -2484, -3127, 3, -2473, -3176, 3, -2033, -3171, 3, -2994, -2538, 3, -2940, -1934, 3, -2922, -2035, 3, -2671, -2241, 3, -2483 }
ai_script { 17, 8, VAR_11, 1, 1, DAVID1, 11, 30, 80, 7, 8 }
ai_script1 { 17, 8, VAR_11, 0, 1, DAVID1, 11, 30, 80, 7, 8 }
VAR_22 { 0, 1, 8, VAR_11, 8, 2, 4, 0, 9, 0, 1, 10, 107, -1, 2, 1, 3, 2, 5, 0, 50, 6, 1, 7, 1, 4, -1 }
VAR_27 -1
._on_load
call load_sound_set(int 62)
call load_sound_set(int 63)
/* play the sound 'gnoamb1' */
call play_loaded_sound(int 1, int -1, int 63, int 0)
/* play the sound 'fbird1' */
call play_loaded_sound(int 1, int -1, int 62, int 0)
/* play the sound 'imptalk1' */
call play_loaded_sound(int 7, int -1, int 62, int 0)
call load_sound_set(int 0)
call func_ec(int 228, int -1, int 0, var &VAR_0)
if(gamevar room_state != int 1)
{
call play_bgm("GNO")
}
execute SCRIPT_10
if(gamevar is_room_cleared)
{
execute SCRIPT_5
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_6
break
case 2
execute SCRIPT_8
break
case 0
call func_108("ARSE")
break
}
}
._infinite_loop
execute SCRIPT_3
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_7
break
case 2
execute SCRIPT_9
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
if(call is_char_handle_in_level(int 4194304 /* IMPBOSS */ ))
{
gamevar room_state ++
}
else
{
gamevar room_state = int 0
}
break
case 2
if(var VAR_3)
{
gamevar room_state = int 0
}
else
{
if(call ! is_char_handle_in_level(int 4194304 /* IMPBOSS */ ))
{
gamevar room_state = int 0
}
}
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
if(gamevar script_time > var VAR_30)
{
var VAR_30 = gamevar script_time + int 300 + call randomize_int(int 0, int 200)
var VAR_28 = int 2 + call randomize_int(int 0, int 3)
call play_loaded_sound(var VAR_28, int 0, int 63, int 0)
}
if(gamevar script_time > var VAR_29)
{
var VAR_29 = gamevar script_time + int 60 + call randomize_int(int 0, int 40)
var VAR_28 = int 2 + call randomize_int(int 0, int 5)
call play_loaded_sound(var VAR_28, int 0, int 62, int 0)
}
._SCRIPT_4
if(call is_char_handle_in_level(int 65536 /* DAVID */ ))
{
var DAVID1 = call get_char_handle(int 65536)
}
._SCRIPT_5
._SCRIPT_6
call play_bgm("DVDSADP1")
call func_114(int 1)
call func_5a(int -1)
var htyronis = call create_char(var &init_position, "htyronis.", int 125, int 13)
call char_unfollow_char(var htyronis)
gamevar script_object = var htyronis
gamevar *object_p+6 |= int 53687091
gamevar script_object = var htyronis
gamevar *object_p+6 |= int 8388608
var btreasure = call create_char(var &init_position1, "btreasure", int 270, int 14)
call add_item_to_char(var btreasure, int 85 /* moneybag */ , int 3277313, int 0)
call add_item_to_char(var btreasure, int 40 /* apple */ , int 1, int 0)
call add_item_to_char(var btreasure, int 40 /* apple */ , int 1, int 0)
call add_item_to_char(var btreasure, int 41 /* veggies */ , int 1, int 0)
var fimpboss = call create_char(var &init_position2, "fimpboss", int -90, int 13)
call func_50(var fimpboss, int 8192)
call play_char_ai_script(var fimpboss, var &ai_script)
execute SCRIPT_4
._SCRIPT_7
if(var VAR_17 == int 0)
{
if(var VAR_18 > int 80)
{
call chars_face_opposite(var DAVID1, var htyronis)
var VAR_17 ++
var VAR_18 = int 0
}
}
if(var VAR_17 == int 1)
{
if(var VAR_18 > int 30)
{
call start_dialog("DVDGRA", "NULL")
var VAR_17 ++
var VAR_18 = int 0
}
}
if(var VAR_17 == int 2)
{
if(call get_input_sys() != int 4)
{
call func_53(var htyronis, int 15)
call char_follow_char(var htyronis, var DAVID1)
var VAR_17 ++
var VAR_18 = int 0
}
}
var VAR_18 ++
._SCRIPT_8
var fimpboss = call create_enemy(int 129, int 0, var &init_position2, int -90)
call func_50(var fimpboss, int 8192)
call play_char_ai_script(var fimpboss, var &ai_script1)
execute SCRIPT_4
call load_char("imp")
call func_108("ARSE")
._SCRIPT_9
if(var VAR_27 != var VAR_25)
{
var VAR_27 = var VAR_25
call log_var(var VAR_25)
}
switch(var VAR_25)
{
case 0
if(call func_6f() == int 3)
{
var VAR_26 = int 0
var VAR_25 ++
}
break
case 1
if(var VAR_26 > int 100)
{
if(call is_char_handle_in_level(int 4194304 /* IMPBOSS */ ))
{
call func_106(var fimpboss, int 3, int 1, var &VAR_22)
}
var VAR_25 ++
}
break
case 2
if(call get_num_of_enemies() == int 0)
{
var VAR_3 = int 1
var VAR_25 ++
}
break
}
var VAR_26 ++
._SCRIPT_10
call set_door_particle_effect(int 0, int 4, int 0, int -1)