-
Notifications
You must be signed in to change notification settings - Fork 0
/
prelock.ts
104 lines (85 loc) · 2.1 KB
/
prelock.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
#choosekill
:vars
setVar $count 1
setVar $script "(ambush'er)"
setvar $scriptname "$playerName's user-target pdrop"
:main
getWord CURRENTLINE $location 1
if ($location <> "Citadel")
echo "*bad prompt*"
halt
end
goSub :getinfo
:input
echo "*Enter fig wave : "
getconsoleinput $figwave
echo "*How many times to fire : "
getconsoleinput $how_many
:choice
echo ansi_15 "*Return home (" ansi_12 "y" ansi_15 "/" ansi_12 "n" ansi_15 ") : "
getconsoleinput $return_choice SINGLEKEY
if ($return_choice = "y")
setVar $return "YES"
elseif ($return_choice = "n")
setVar $return "NO"
else
goto :choice
end
:standby
killalltriggers
echo "*script in standby - press > to activate*"
setTextOutTrigger activate :activate ">"
pause
:activate
killalltriggers
echo "*sector to prelock : "
getconsoleinput $target_sector
:lock
send "p" $target_sector "*"
setTextTrigger locked :locked "All Systems Ready,"
pause
:locked
killalltriggers
send "'" $script " : prelocked on sector " $target_sector "*"
setTextTrigger go :go "Report Sector " & $target_sector & ":"
pause
:go
killalltriggers
send " y "
setVar $count 1
goto :attack
:attack
killalltriggers
if ($count <= $how_many)
send " q q a y y " $figwave " * * l " $planet " * m n t * c "
add $count 1
setDelayTrigger attack_wave :attack 50
pause
end
setVar $count 1
:return
if ($return = "NO")
send "'" $script " : drop_attacked sector [" $target_sector "] - return_home [" $return "]*"
else
send "p" $sector "* y "
send "'" $script " : drop_attacked sector [" $target_sector "] - back at base - paused*"
end
##temp sound
sound mrlif.wav
goto :standby
#-----------------SUBROUTINES-----------------------#
:getinfo
send "/"
waitfor "Ship"
getword CURRENTLINE $ship 3
send "qd"
waitfor "Planet #"
getword CURRENTLINE $planet 2
getword CURRENTLINE $sector 5
striptext $planet "#"
striptext $sector ":"
waitfor "Planet has a level"
getword CURRENTLINE $citlvl 5
send "c"
waitfor "Citadel command (?=help)"
return