Jymamon
12-31-2016, 12:22 PM
Current version: v2017.01.12.02
I had vacation to blow over the holidays and promised myself I'd do a non-work project. Atlas.lic, now on the repo, is the result. Slightly more than an alpha version, but maybe not quite yet beta, it is a work in progress far enough along to gather feedback.
How do you use it?
;repos download atlas.lic
;repos download atlas_data.db3
;trust atlas
;atlas
What is it?
A hunting area setting GUI - It is a GUI front end to atlas_data.db3 that lists (most of) the creatures in the game and has a bunch of pre-set hunting areas. Click on "Activate", and it'll set the appropriate variables to have bigshot hunt the specified creatues in the given area. This is probably the most interesting bit in the current release.
An editor for the above - This still needs a bunch of work. Creature editing is present, but delete is currently disabled. Area editing still needs to be enabled.
A data source for other scripts to use to automate the above - This is really where it started out. I was tired of manually managing hunting areas between characters and there's a few old threads around sbounty and wanting shared hunting area definitions. I need to make this a little more usable in the next release, but for the programmer's out there....
File.file?("#{$script_dir}/atlas.lic") to get it loaded.
Then you can use the Areas and Creatures modules to find huntable goo. As an example, my routine that autosets my hunting based on the current bounty looks like
# region and creature were regex'ed out of the bounty text. Omitted here
def self.sethunt(region, creature)
respond "Looking for creature '#{creature.name}' in region '#{region}'\n" if $debug
areas = Areas.find_by_region(region)
distances = Hash.new
area = areas.select{|area|
area.region == region && area.creatures.any?{|critter| critter.id==creature.id}
}.each{|area|
previous, shortest_distances = Room.current.dijkstra(area.start)
distances[area.start] = shortest_distances[area.start]
}.sort{|area1, area2|
distances[area1.start] <=> distances[area2.start]
}.first
if (area.nil?)
echo "#{name}: Ack! I can't find anywhere to hunt '#{creature.name}'"
return
end
UserVars.op['hunting_room_id'] = "#{area.start}"
UserVars.op['hunting_boundaries'] = "#{area.boundaries.join(",")}"
# I hunt just the bounty creature, you might want to include all of them.
UserVars.op['targets'] = creature.name
# For funsies, let's flee from anything more than 3 levels over our current level.
flee_from = Array.new
area.creatures.each{|c|
if ( c.level > (Char.level + 3) )
flee_from.push(c.name) unless (c.name == creature.name)
end
}
UserVars.op['always_flee_from'] = "#{flee_from.join(",")}"
UserVars.save();
end
What isn't it?
It is not a hunting script. It is a supplement to bigshot or other custom hunting scripts.
It is not all inclusive. I have about 138 areas defined that are mostly around the Landing, Solhaven, Icemule, and Ta'Illistim
Super user friendly. The backing data has existed for a while, but I use it entirely programmatically. Hence, my hunting areas, for example, how no name. There's just and ID starting at 1 and going to the last one. Great for me. Pretty sucky in the dropdown where someone is looking for a particular area.
Anyhow, posting here to see if folks like it, hate it, or even use it. If folks find it useful, I'll flesh it out more and add features. If not, then I won't take the time since GUI work is about the bottom of the barrel in "fun" for me.
I had vacation to blow over the holidays and promised myself I'd do a non-work project. Atlas.lic, now on the repo, is the result. Slightly more than an alpha version, but maybe not quite yet beta, it is a work in progress far enough along to gather feedback.
How do you use it?
;repos download atlas.lic
;repos download atlas_data.db3
;trust atlas
;atlas
What is it?
A hunting area setting GUI - It is a GUI front end to atlas_data.db3 that lists (most of) the creatures in the game and has a bunch of pre-set hunting areas. Click on "Activate", and it'll set the appropriate variables to have bigshot hunt the specified creatues in the given area. This is probably the most interesting bit in the current release.
An editor for the above - This still needs a bunch of work. Creature editing is present, but delete is currently disabled. Area editing still needs to be enabled.
A data source for other scripts to use to automate the above - This is really where it started out. I was tired of manually managing hunting areas between characters and there's a few old threads around sbounty and wanting shared hunting area definitions. I need to make this a little more usable in the next release, but for the programmer's out there....
File.file?("#{$script_dir}/atlas.lic") to get it loaded.
Then you can use the Areas and Creatures modules to find huntable goo. As an example, my routine that autosets my hunting based on the current bounty looks like
# region and creature were regex'ed out of the bounty text. Omitted here
def self.sethunt(region, creature)
respond "Looking for creature '#{creature.name}' in region '#{region}'\n" if $debug
areas = Areas.find_by_region(region)
distances = Hash.new
area = areas.select{|area|
area.region == region && area.creatures.any?{|critter| critter.id==creature.id}
}.each{|area|
previous, shortest_distances = Room.current.dijkstra(area.start)
distances[area.start] = shortest_distances[area.start]
}.sort{|area1, area2|
distances[area1.start] <=> distances[area2.start]
}.first
if (area.nil?)
echo "#{name}: Ack! I can't find anywhere to hunt '#{creature.name}'"
return
end
UserVars.op['hunting_room_id'] = "#{area.start}"
UserVars.op['hunting_boundaries'] = "#{area.boundaries.join(",")}"
# I hunt just the bounty creature, you might want to include all of them.
UserVars.op['targets'] = creature.name
# For funsies, let's flee from anything more than 3 levels over our current level.
flee_from = Array.new
area.creatures.each{|c|
if ( c.level > (Char.level + 3) )
flee_from.push(c.name) unless (c.name == creature.name)
end
}
UserVars.op['always_flee_from'] = "#{flee_from.join(",")}"
UserVars.save();
end
What isn't it?
It is not a hunting script. It is a supplement to bigshot or other custom hunting scripts.
It is not all inclusive. I have about 138 areas defined that are mostly around the Landing, Solhaven, Icemule, and Ta'Illistim
Super user friendly. The backing data has existed for a while, but I use it entirely programmatically. Hence, my hunting areas, for example, how no name. There's just and ID starting at 1 and going to the last one. Great for me. Pretty sucky in the dropdown where someone is looking for a particular area.
Anyhow, posting here to see if folks like it, hate it, or even use it. If folks find it useful, I'll flesh it out more and add features. If not, then I won't take the time since GUI work is about the bottom of the barrel in "fun" for me.