Originally Posted by
Glitch
So I've had this issue for a long time but most of my hunting areas it wasn't a huge deal. Now it is, if I want to complete grizzled tasks.
When I have creatures in attack routine (a), (b), and (c) and a grizzled/ancient creature shows up, it automatically defaults to attack routine (a) on the grizzled creature. I was just hunting soul siphons and it tried to straight attack them like a Vvrael destroyer instead of Immolate.
Does anyone have a fix for this or have a suggestion on where I might start working on it myself? I 90% suck at Ruby but I'll always give it a shot and fail miserably.
Okay, now i got it working, Tested as well
This goes after the "def set_hunting_ground( critter, area )" function
Code:
def set_hunting_ground_grizzled( critter, area )
msg "changing hunting ground based on #{critter}"
map = get_hunting_ground( critter, area )
if map.nil?
msg " ... no hunting location set for \"#{critter}\" around \"#{area}\""
return
end
msg " ... hunting ground set to \"#{map}\""
# Set hunter settings
@settings['hunter'].each_pair { |key,value| UserVars.op[key.to_s] = value }
@settings['locations'][map].each_pair { |key, value|
if key == 'targets'
# strip non-bounty critters
value = value.split(',').find { |token| token =~ /#{critter}/ }
value.strip
value = "(?:ancient|grizzled).*#{value}"
end
UserVars.op[key.to_s] = value
}
UserVars.save
end
This replaces your "def kill_dangerous" function
Code:
def kill_dangerous
msg 'Found dangerous critter! Bigshot will run until success.'
# look for critter regex in targets
critter, area = parse_critter_area()
set_hunting_ground_grizzled( critter, area )
UserVars.op['fried'] = 110 # don't fry
# load settings/wait for kill
$bigshot.load_settings
start_script 'bigshot' unless running? 'bigshot'
loop do
sleep 1
break if dead? or bounty_is? 'succeeded_guard' or !running? 'bigshot'
end
# cleanup
stop_script('bigshot') if running? 'bigshot'
UserVars.op['fried'] = @save_fried
$bigshot.run_script(@loot_script, true)
turn_in_guard()
return true
end