-
Notifications
You must be signed in to change notification settings - Fork 0
/
dock_attack.ts
283 lines (248 loc) · 6.94 KB
/
dock_attack.ts
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
#prelock dock-attack script
:vars
setVar $count 1
setvar $script "(burstkill)"
setVar $scriptname "burstkill"
setVar $version "v. 0.1"
setVar $federals 0
setVar $empty_sector 0
if ($saved)
loadVar $target_name
loadVar $target_pos
loadVar $fig_Wave
loadVar $extra_waves
loadvar $autoland
loadVar $continuous
else
setVar $target_name ""
setVar $target_pos 0
setVar $fig_wave 9999
setVar $extra_waves "OFF"
setvar $autoland "ON"
setVar $continuous "OFF"
end
:main
getWord CURRENTLINE $test_prompt 1
if ($test_prompt <> "Command")
echo "*not at command prompt*"
halt
end
:get_current_sector
setVar $line CURRENTLINE
getText $line $sector "]:[" "] (?"
if ($sector = STARDOCK)
setVar $location "DOCK"
elseif ($sector = "1")
setVar $location "TERRA"
else
setVar $location "PORT"
end
:quick_menu
killalltriggers
echo ansi_15 "*---( $playerName's burstkill-mod " $version " )---*"
echo ansi_14 "1." ansi_15 " trader name : " ansi_9 "[" ansi_6 $target_name ansi_9 "]*"
echo ansi_14 "2." ansi_15 " target pos : " ansi_9 "[" ansi_6 $target_pos ansi_9 "]*"
echo ansi_14 "3." ansi_15 " figs per wave: " ansi_9 "[" ansi_6 $fig_wave ansi_9 "]*"
echo ansi_14 "4." ansi_15 " 2nd wave : " ansi_9 "[" ansi_6 $extra_waves ansi_9 "]*"
echo ansi_14 "5." ansi_15 " auto land : " ansi_9 "[" ansi_6 $autoland ansi_9 "]*"
echo ansi_14 "6." ansi_15 " continuous : " ansi_9 "[" ansi_6 $continuous ansi_9 "]*"
echo ansi_14 "C." ansi_15 " run script **"
getConsoleInput $choice SINGLEKEY
if ($choice = "1")
echo ansi_15 "*Enter target name : "
getConsoleInput $target_name
echo "*"
goto :quick_menu
elseif ($choice = "2")
echo ansi_15 "*Enter target pos (in player list) : "
getConsoleInput $target_pos
echo "*"
goto :quick_menu
elseif ($choice = "3")
echo ansi_15 "*How many figs per attack : "
getConsoleInput $fig_wave
echo "*"
goto :quick_menu
elseif ($choice = "4")
if ($extra_waves = "OFF")
setVar $extra_waves "ON"
else
setVar $extra_waves "OFF"
end
echo "*"
goto :quick_menu
elseif ($choice = "5")
if ($autoland = "ON")
setVar $autoland "OFF"
else
setVar $autoland "ON"
end
echo "*"
goto :quick_menu
elseif ($choice = "6")
if ($continuous = "OFF")
setVar $continuous "ON"
else
setVar $continuous "OFF"
end
echo "*"
goto :quick_menu
elseif ($choice = "c")
echo "*"
goSub :save_var
goto :check_sector
else
echo "*"
goto :quick_menu
end
:check_sector
killalltriggers
send "d"
:fed_triggers
setTextLineTrigger feds1 :federals "Captain Zyrain"
setTextLineTrigger feds2 :federals "Admiral Clausewitz"
setTextLineTrigger feds3 :federals "Admiral Nelson"
setTextLineTrigger donesearch :done_fed_search "Warps to Sector(s)"
pause
:federals
killalltriggers
setVar $federals ($federals + 1)
goto :fed_triggers
:done_fed_search
killalltriggers
setVar $unmanned SECTOR.SHIPCOUNT[$sector]
:set_pos
setVar $player_pos $target_pos
setVar $target_pos ($target_pos + $federals)
setVar $target_pos ($target_pos + $unmanned)
setVar $lock_pos ($target_pos - 1)
setVar $count 1
:lock_on
killalltriggers
setVar $count 1
send "a"
if ($lock_pos = 0)
setVar $empty_sector 1
end
while ($count <= $lock_pos)
send "n"
add $count 1
end
setVar $count 1
goto :locked
:locked
send "'" $script " target : [" $target_name "] location : [" $location "]*"
:create_triggers
killalltriggers
setVar $trigger_line_1 $trader_name & " lifts"
setVar $trigger_line_2 $trader_name & " blasts"
setVar $trigger_line_3 $trader_name & " appears"
setVar $trigger_line_4 $trader_name & " warps into"
setVar $trigger_flee $trader_name & " warps out"
:lock_triggers
killalltriggers
setTextLineTrigger 1 :attack $trigger_line_1
setTextLineTrigger 2 :attack $trigger_line_2
setTextLineTrigger 3 :attack $trigger_line_3
setTextLineTrigger 4 :attack $trigger_line_4
pause
:attack
killalltriggers
if ($empty_sector = 1)
send "a"
end
send "ny " $fig_wave "*"
sound mrlif.wav
:post_attack_triggers
killalltriggers
setTextLineTrigger miss :miss "You notice the un-Godly bulk of the Intrepid"
setTextLineTrigger cap :cap "The ship is abandoned! Its all yours!"
setTextLineTrigger pod :pod_flee "An Escape Pod warps out of this sector!"
setTextLineTrigger trap :pod_trap "tried to warp out of the sector"
pause
:miss
killalltriggers
if ($extra_waves = "ON")
goto :follow_up_attack
end
if ($continuous = "ON")
send "'" $script " resetting...*"
goto :check_sector
else
halt
end
:cap
killalltriggers
setVar $target_pos ($target_pos + 1)
setVar $count 1
:follow_up_attack
send "a"
while ($count <= $target_pos)
send "n"
add $count 1
end
send " y " $fig_wave " *"
:post_cap_triggers
killalltriggers
setTextLineTrigger cap :cap "The ship is abandoned! Its all yours!"
setTextLineTrigger pod :pod_flee "An Escape Pod warps out of this sector!"
setTextLineTrigger trap :pod_trap "tried to warp out of the sector"
setTextLineTrigger podkill :pod_kill "you have obliterated the target!"
setTextLineTrigger miss :miss_post_cap "You notice the un-Godly bulk of the Intrepid"
pause
:pod_kill
killalltriggers
goto :done
:miss_post_cap
killalltriggers
if ($continuous = "ON")
send "'" $script " resetting...*"
goto :check_sector
else
goto :done
end
:pod_flee
killalltriggers
if ($continuous = "ON")
send "'" $script " resetting...*"
goto :check_sector
else
goto :done
end
:pod_trap
killalltriggers
setVar $count 1
goto :follow_up_attack
:done
killalltriggers
if ($auto_land = "ON")
goto :land
else
send "'" $script " shutting down*"
halt
end
:land
killalltriggers
if ($location = "DOCK")
send "ps"
setTextTrigger 2 :safe "<StarDock> Where"
pause
:safe
killalltriggers
send "'" $script " safely landed : [" $location "]*"
halt
elseif ($location = "TERRA")
send "l1*"
setTextTrigger 3 :safe "Do you wish to (L"
pause
#---------------------------SUBROUTINES------------------------#
:save_var
saveVar $target_name
saveVar $target_pos
saveVar $fig_wave
saveVar $extra_waves
savevar $autoland
saveVar $continous
setVar $saved 1
saveVar $saved
return