-
Notifications
You must be signed in to change notification settings - Fork 3
/
s_boxrup.tsct
184 lines (167 loc) · 4.47 KB
/
s_boxrup.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
/*
* 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_5 -1
VAR_7 { 1301, -1100, -3612 }
init_position1 { 1801, -1100, -2024 }
DAVID 0
init_position { 1216, -1100, -3146 }
VAR_14 { 1414, -1100, -3573, 2317, -1100, -2799, 1516, -1100, -1894, 673, -1100, -2738 }
ai_script { 14, 17, 4, VAR_14, 1, 17, 4, VAR_14, 1, 30, 143, 29, DAVID, 11, 100, 200, 7, 8 }
VAR_20 { 1151672320, -997621760, -991494144 }
VAR_21 { 1151369216, -997621760, -983363584 }
VAR_22 { 1158852608, -997621760, -986918912 }
arr { VAR_20, VAR_21, VAR_22 }
._on_load
var VAR_1 = var &VAR_7
var VAR_2 = int 355
execute SCRIPT_10
var VAR_3 = int 13
execute SCRIPT_11
var VAR_3 = int 13
execute SCRIPT_11
var VAR_3 = int 13
execute SCRIPT_11
var VAR_3 = int 36
execute SCRIPT_11
var VAR_3 = int 36
execute SCRIPT_11
var VAR_3 = int 34
execute SCRIPT_11
var VAR_3 = int 55
execute SCRIPT_11
execute SCRIPT_9
call load_sound_set(int 46)
/* play the sound 'palamb1' */
call play_loaded_sound(int 4, int -1, int 46, int 0)
if(gamevar is_room_cleared)
{
execute SCRIPT_8
}
else
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_5
break
case 2
execute SCRIPT_7
break
case 0
break
}
}
._infinite_loop
execute SCRIPT_3
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
execute SCRIPT_4
break
case 2
execute SCRIPT_6
break
case 0
break
}
}
._on_exit
if(gamevar !is_room_cleared)
{
switch(gamevar room_state)
{
case 1
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 2
gamevar room_state ++
gamevar is_room_cleared = int 1
break
case 0
break
default
gamevar room_state = int 0
break
}
}
._SCRIPT_3
if(gamevar script_time > var VAR_17)
{
var VAR_17 = gamevar script_time + int 70 + call randomize_int(int 0, int 110)
var index = call randomize_int(int 0, int 3)
/* play the sound 'flayamb1' */
call play_loaded_sound(int 5, int 0, int 46, @arr[var VAR_19])
}
if(gamevar script_time > var VAR_18)
{
var VAR_18 = gamevar script_time + int 100 + call randomize_int(int 0, int 200)
var index = call randomize_int(int 0, int 3)
/* play the sound 'torches2' */
call play_loaded_sound(int 6, int 0, int 46, @arr[var index])
}
._SCRIPT_4
._SCRIPT_5
var hellcat = call create_enemy(int 143, int 0, var &init_position, int 103)
gamevar script_object = var hellcat
gamevar *character_stats_p+15 = int 2000
call freeze_enemy(var hellcat)
call func_50(var hellcat, int 8192)
call play_char_ai_script(var hellcat, var &ai_script)
var DAVID = call get_char_handle(int 65536)
var btreasure = call create_char(var &init_position1, "btreasure", int 215, int 14)
call add_item_to_char(var btreasure, int 72 /* keyg */ , int 1, int 0)
call add_item_to_char(var btreasure, int 38 /* potbrown */ , int 1, int 0)
call add_item_to_char(var btreasure, int 32 /* potwhite */ , int 1, int 0)
call add_item_to_char(var btreasure, int 32 /* potwhite */ , int 1, int 0)
call add_item_to_char(var btreasure, int 35 /* potpurpl */ , int 1, int 0)
call add_item_to_char(var btreasure, int 35 /* potpurpl */ , int 1, int 0)
._SCRIPT_6
._SCRIPT_7
._SCRIPT_8
._SCRIPT_9
gamevar SMACKER_X = int 280
gamevar SMACKER_Y = int 200
call play_2d_anim("s_boxrup", int 1, int 0, int 0)
._SCRIPT_10
var is_BTREASURE_exist = call is_char_handle_in_level(int 1507337)
if(var ! is_BTREASURE_exist)
{
var is_BTREASURE_exist = call create_char(var VAR_1, "btreasure9", var VAR_2, int 14)
call func_aa(var is_BTREASURE_exist)
}
else
{
var VAR_4 = int 1
gamevar script_object = var is_BTREASURE_exist
if(gamevar *object_p+7 == int 4194304)
{
call func_aa(var is_BTREASURE_exist)
}
}
._SCRIPT_11
if(var VAR_3 != int -1)
{
if(var ! VAR_4)
{
if(var VAR_5 != int -1)
{
call add_item_to_char(var is_BTREASURE_exist, int 85 /* moneybag */ , var VAR_5, int 0)
}
else
{
call add_item_to_char(var is_BTREASURE_exist, var VAR_3 /* lightning */ , int 1, int 0)
}
}
}
var VAR_5 = int -1