-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscombo.lic
289 lines (257 loc) · 8.86 KB
/
scombo.lic
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
284
285
286
287
288
289
=begin
Welcome Combo Script Version 2!
This script will do UCS fighting for you!
It will start with JAB and take advantage of Tier Up opportunities.
Once it has achieved Tier 3, it will always continue with your specified Tier attack.
-Changelog:
v2:
-Completely rewritten to include debug messages
-Now correctly tier's up to Tier 3 instead of getting stuck in one attack
-Will default back to jab to achieve higher Tiers if not at highest Tier.
-Added detection of hit/miss, will continue the vulnerable attack until success
v2.1:
-Added setting of your default tier 3 attack
v2.2:
-Added waiting for RT to end, spam attacks 1 second before rt ends.
v2.3:
-Making it stop after killing one target.
-Added tierup settings and tier3 attack settings.
v2.4:
-Added aiming
v2.5:
-Caught kicking while lying down
-Caught stunned/webbed/generic failures
v2.6:
-Doesn't aim your jabs for faster tier up.
v2.7
-Fixed broken aiming cycling.
v2.8
-Added exiting when the target is dead (probably)
v2.9
-Damn you calm bastards
v3.0
-Added stand check
-Added ability to specify a target
(Alllll untested!!! So use at your own damn risk!!)
v3.1
-Changed pause to sleep for lich 4.6 update
v3.2
-Stance option
v3.3
-The moment Takoa butchered this script!
-Direct all complaints regarding the following issues to Takoa:
-Will focus mstrike using your tier3 attack when possible
-If you have Krynch active, will try to <tier3> your <aim> location first
if mstrike is on cooldown
-Exits if your bigshot ALWAYS FLEE FROM or FLEE COUNT conditions are met
if bigshot is running, ignores otherwise
-Has a new TOOHIGH setting for aimed attacks for taller targets, will go to that
if you get a "cannot reach" message. For instance, if you set your normal
aim location to be "head", and your "toohigh" to be "left leg" it will
always try to punch the head first, if you get the "too high" message it
will then switch to the left leg. Once the head is reachable it will then
hit that again
-Will now only try to mstrike if you have >= 30 ranks of MOC. Noobs.
-Fixed bug that wasn't starting attack routine when krynch not active
v3.4
-Now targets crap with weird names. Thank Genstealer for complaining about it.
-Drafix
=end
before_dying {fput "stance #{CharSettings['stance']}"}
attack = proc {|target|
exit if target.status =~ /dead/
if running? 'bigshot'
exit if GameObj.npcs.any? { |i| UserVars.op['always_flee_from'].split.include?(i.noun) }
exit if GameObj.npcs.length > UserVars.op['flee_count'].to_i
end
fput "stand" unless standing?
put 'stance offensive' unless percentstance(0)
if Skills.multiopponentcombat.to_i >= 30 and !Spell[9005].active? and !Spell[9699].active? and !Spell[506].active?
put "mstrike #{CharSettings['tier3']} ##{target.id}"
@mstrike_taken = true
sleep 0.9
else
@mstrike_taken = false
if CharSettings['aim'] && @action !~ /jab/
put "#{@action} ##{target.id} #{@location}"
else
put "#{@action} ##{target.id}"
end
end
}
changeAction = proc {|action|
@action = action
echo "Action changed to #{@action}" if @debug
}
changePosition = proc {|position|
@position = position
echo "Position Changed to #{@position}" if @debug
}
findTarget = proc{
if script.vars.length == 0
put 'target random'
line = get until line =~ /^You are now targeting <pushBold\/>.* <a exist="(\-?\d+)" noun=".*>\.$|^Could not find a valid target\./
else
put 'target ' + script.vars[0]
line = get until line =~ /^Usage|^You are now targeting <pushBold\/>.* <a exist="(\-?\d+)" noun=".*>\.$|^You do not have a target\.|You can only target creatures and players\.|You can't target/
end
status_tags
GameObj[$1]
}
CharSettings['aim'] ||= false
CharSettings['aim_location'] ||= Array.new
CharSettings['stance'] ||= 'defensive'
if script.vars[1] =~ /^tier(up|3)$/
CharSettings["tier#{$1}"] = script.vars[2]
respond "You have specified #{CharSettings["tier#{$1}"]} as your Tier#{$1} attack"
respond "You can change this setting by typing ;#{script.name} tier#{$1} <jab/punch/grapple/kick>"
exit
elsif script.vars[1] =~ /^aim=(on|off)$/
option = $1
if option == 'on'
CharSettings['aim']=true
elsif option == 'off'
CharSettings['aim']=false
else
respond "Bad option: #{option}"
exit
end
respond "Turning aiming #{option}"
exit
elsif script.vars[1] =~ /^toohigh$|cannot aim that high/
if script.vars[2..-1].length == 0
respond "No body parts specified"
respond "Try ;#{script.name} help"
respond
exit
end
CharSettings['toohigh'] = script.vars[2..-1].join(' ')
respond "Now aiming at:"
respond "#{CharSettings['toohigh']}"
respond "if you can't reach your aiming location"
exit
elsif script.vars[1] =~ /^aim$/
unless CharSettings['aim']
respond "Aiming is turned off."
respond "Please enable aiming before using this option"
respond ";#{script.name} aim=<on/off>"
respond
exit
end
if script.vars[2..-1].length == 0
respond "No body parts specified"
respond "Try ;#{script.name} help"
respond
exit
end
CharSettings['aim_location'].clear
script.vars[2..-1].join(' ').gsub(', ', ',').split(',').reverse.each{|location|
CharSettings['aim_location'].push(location)
}
respond "Now aiming in this order (one body part per line):"
respond CharSettings['aim_location'].reverse
respond
respond "Note: Remember to use a comma to seperate the body parts"
respond
exit
elsif script.vars[1] =~ /^stance$/
CharSettings['stance'] = script.vars[2]
respond "Will now go to stance #{CharSettings['stance']} after combat"
exit
elsif script.vars[1] =~ /^help$/
respond "Setup your tierup and tier3 attacks by typing: "
respond
respond ";#{script.name} tierup <jab/punch/grapple/kick>"
respond ";#{script.name} tier3 <jab/punch/grapple/kick>"
respond
respond ";#{script.name} aim=<on/off>"
respond ";#{script.name} aim <body parts>"
respond " ex: ;#{script.name} aim head, neck, right arm, chest"
respond
respond ";#{script.name} stance <offensive/defensive/neutral/whatever>"
respond "Will set your stance after combat"
respond
exit
end
unless CharSettings['tierup']
respond
respond "Please specify what attack you want to use trying to tier-up"
respond "By typing ;#{script.name} tierup <jab/punch/grapple/kick> [Recommended that you use jab for easy tier-up]"
respond
respond "The script will now exit."
exit
end
unless CharSettings['tier3']
respond
respond "Please specify what attack you want to use when you reach Tier 3"
respond "By typing ;#{script.name} tier3 <punch/grapple/kick>"
respond
respond "The script will now exit."
exit
end
put 'aim clear'
put 'stance off'
@action = CharSettings['tierup']
@position='decent'
@hit=true
@debug=false
status_tags
@target = findTarget.call
if @target.nil?
echo "No target found. Exiting."
exit
end
locations = CharSettings['aim_location'].dup
@location = locations.pop
if Spell[9620].active?
changeAction.call(CharSettings['tier3'])
end
attack.call(@target)
while line = get
if @mstrike_taken
line = reget(10, /You have (decent|good|excellent) positioning|.* = .* d100: .* = \-?(\d+)$|A (hit)!$|Strike leaves foe vulnerable to a followup (.*) attack!|[wW]ait (\d+) sec.*|^What were you referring to\?$/)[-1]
@mstrike_taken = false
end
if line =~ /You have (decent|good|excellent) positioning/
changePosition.call($1)
elsif line =~ /.* = .* d100: .* = \-?(\d+)$|A (hit)!$/
@action_counter[@action] += 1
endroll = $1
if endroll.to_i > 100 or endroll.to_i == 0
@hit = true
else
@hit = false
end
echo @hit, endroll.to_i if @debug
changeAction.call('jab') if @position != 'excellent' && @hit
changeAction.call(CharSettings['tier3']) if (@position == 'excellent' or @position == 'good') && @action != CharSettings['tier3']
elsif line =~ /Strike leaves foe vulnerable to a followup (.*) attack!/
changeAction.call($1)
script.clear
attack.call(@target)
elsif line =~ /You fail to find an opening for your strike\./
attack.call(@target)
elsif line =~ /is already missing that!|does not have a/
@location = locations.pop
put 'aim clear' unless @location
attack.call(@target)
elsif line =~ /You cannot aim that high!/
@location = CharSettings['toohigh']
attack.call(@target)
locations = CharSettings['aim_location'].dup
@location = locations.pop
elsif line =~ /Roundtime:/
echo "RT msg" if @debug
attack.call(@target)
elsif line =~ /[wW]ait (\d+) sec.*/
echo "WAIT msg" if @debug
sleep $1.to_i - 1
script.clear
attack.call(@target)
elsif line =~/^Try standing up first\.$/
fput "stand"
attack.call(@target)
elsif line =~/You currently have no valid target\. You will need to specify one\.|^It looks like somebody already did the job for you\.$|^What were you referring to\?$|Sorry,|You can't do that while entangled in a web|You are still stunned|You are unable to muster the will to attack anything\./
break
end
end