Modification: skip taget by level / Min Level / Max Level

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Modification: skip taget by level / Min Level / Max Level

#1 Post by d003232 » Fri Jul 03, 2009 6:15 am

With the new harvesting function I just startet new chars in the beginner are. While harvesting I also want to level up the char a little. After a view rounds of harvesting and killing it is not so usefull to still kill LvL 1 Fungies. So I did a small modification to check min/max level for the targets.

Insert two new default values in settings.lua line 38:

Code: Select all

			LOGOUT_SHUTDOWN = false,
			TARGET_LEVELDIF_BELOW = 999,			-- modif
			TARGET_LEVELDIF_ABOVE = 999,			-- modif
		}, hotkeys = {}, skills = {}, friends = {},
Insert following lines in player.lua at line 726 after the 'end;' and befor the '-- PK protect':

Code: Select all

			return false;
		end;

-- Begin of Modif
if( ( target.Level - self.Level ) > settings.profile.options.TARGET_LEVELDIF_ABOVE  or
    ( self.Level - target.Level ) > settings.profile.options.TARGET_LEVELDIF_BELOW ) then
	if ( self.Battling == false ) then   -- if we don't have aggro then
		return false;         -- he is not a valid target
	end;
	if( self.Battling == true  and         -- we have aggro
		target.TargetPtr ~= self.Address ) then   -- but not from that mob
		return false;         
	end;
end;
-- End of Modif

		-- PK protect
and use the new options in your profile:

Code: Select all

	<option name="TARGET_LEVELDIF_BELOW" value="2" />
	<option name="TARGET_LEVELDIF_ABOVE" value="3" />	

Have fun
Last edited by d003232 on Fri Jul 03, 2009 7:28 am, edited 2 times in total.
The RoM Bot Online Wiki needs your help!

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Modification: skip taget by level / Min Level / Max Level

#2 Post by Administrator » Fri Jul 03, 2009 6:28 am

Maybe it would be better to not check directly by level, but by level difference. So, one option for how many levels below your level to attack a monster, and one for how many levels above. For example, 5 below and 3 above when you're level 10 would let you attack any monsters level 5 to 13. This would prevent you from having to edit your profile every time you level up. What do you think?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Modification: skip taget by level / Min Level / Max Level

#3 Post by d003232 » Fri Jul 03, 2009 7:26 am

Administrator wrote:Maybe it would be better to not check directly by level, but by level difference.
Thats really good! I don't like to check so much options after every change of my botting area. By doing that way it is also possible
  • at harvesting only attack mobs that could be more dangerous and have a greater aggro range
  • by using negative values to deactivate the targeting function (means another way of traveling mode without need to change the waypoint file)
I changed the coding above.
The RoM Bot Online Wiki needs your help!

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Modification: skip taget by level / Min Level / Max Level

#4 Post by 3cmSailorfuku » Fri Jul 03, 2009 7:31 am

d003232 wrote:
Administrator wrote:Maybe it would be better to not check directly by level, but by level difference.
Thats really good! I don't like to check so much options after every change of my botting area. By doing that way it is also possible
  • at harvesting only attack mobs that could be more dangerous and have a greater aggro range
  • by using negative values to deactivate the targeting function (means another way of traveling mode without need to change the waypoint file)
I changed the coding above.
Just use Uberflex Autocombat, it will attack aggroing mobs while on your harvest route, it looks a bit weird though.

I believe though that if you wish to implent such a feature, the bot needs to know what monsters are aggresive & supportive or else it will skip monsters who are about to attack.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Modification: skip taget by level / Min Level / Max Level

#5 Post by Administrator » Wed Jul 08, 2009 12:30 pm

Ok, I just finally got around to testing this out, and everything works fine. I've committed it to SVN.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests