-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcombo.lic
More file actions
228 lines (203 loc) · 6.62 KB
/
combo.lic
File metadata and controls
228 lines (203 loc) · 6.62 KB
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
=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
-Drafix
=end
before_dying {fput "stance #{CharSettings['stance']}"}
attack = proc {|target|
exit if target.status =~ /dead/
fput "stand" unless standing?
put 'stance offensive' unless percentstance(0)
if CharSettings['aim'] && @action !~ /jab/
put "#{@action} ##{target.id} #{@location}"
else
put "#{@action} ##{target.id}"
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\/>an? <a exist="(\-?\d+)" noun=".*>\.$|^Could not find a valid target\./
else
put 'target ' + script.vars[0]
line = get until line =~ /^You are now targeting <pushBold\/>an? <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] =~ /^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
attack.call(@target)
while line = get
if line =~ /You have (decent|good|excellent) positioning/
changePosition.call($1)
elsif line =~ /.* = .* d100: .* = \-?(\d+)$/
endroll = $1
if endroll.to_i > 100
@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' && @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!/
@location = locations.pop
put 'aim clear' unless @location
attack.call(@target)
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