Is there a way to skip a target if it's xx away from waypoin

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Is there a way to skip a target if it's xx away from waypoin

#1 Post by birdy64 » Mon Jun 15, 2009 9:34 am

I was wondering if there was a way to skip a target because it is too far from the waypoint pathing? It would be nice to have the option of a skipping a target because the combat distance is too far away.

xxsinz
Posts: 67
Joined: Wed May 27, 2009 9:45 am

Re: Is there a way to skip a target if it's xx away from waypoin

#2 Post by xxsinz » Mon Jun 15, 2009 10:10 am

If your range class, you can just turn down the

Code: Select all

<option name="COMBAT_DISTANCE" value="200" />
You can also try turning down

Code: Select all

<option name="WANDER_RADIUS" value="0" />
<option name="WAYPOINT_DEVIATION" value="0" />

birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: Is there a way to skip a target if it's xx away from waypoin

#3 Post by birdy64 » Mon Jun 15, 2009 12:07 pm

That won't work. It will just keep creeping up closer to the target till it's within range.

xxsinz
Posts: 67
Joined: Wed May 27, 2009 9:45 am

Re: Is there a way to skip a target if it's xx away from waypoin

#4 Post by xxsinz » Mon Jun 15, 2009 12:21 pm

What happens when you turn down the wander radius?

birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: Is there a way to skip a target if it's xx away from waypoin

#5 Post by birdy64 » Mon Jun 15, 2009 1:29 pm

I use waypoints so Wander Radius isn't used. I also have Waypoint Deviation set to 0.

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

Re: Is there a way to skip a target if it's xx away from waypoin

#6 Post by Administrator » Mon Jun 15, 2009 5:06 pm

Open player.lua and look for this:

Code: Select all

		if( self:haveTarget() and self.Fighting == false ) then
			local target = self:getTarget();
			if( not target:haveTarget() ) then
Change that last line to this:

Code: Select all

			if( not target:haveTarget() and distance(self.X, self.Z, target.X, target.Z) < 150 ) then
Where 150 is the max distance you want to engage targets at.

birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: Is there a way to skip a target if it's xx away from waypoin

#7 Post by birdy64 » Tue Jun 16, 2009 8:05 am

Thanks so much!

dictator187
Posts: 2
Joined: Sat Jun 27, 2009 3:34 am

Re: Is there a way to skip a target if it's xx away from waypoin

#8 Post by dictator187 » Sat Jun 27, 2009 3:37 am

hmm i tried this in my player.lua, but the bot still seems to attack enemies far away from my waypoint, is there a way i can set it to where it only targets enemies exactly where i set my waypoint, ive tried all the ways previously mentioned in this post and none of them work for me.

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

Re: Is there a way to skip a target if it's xx away from waypoin

#9 Post by d003232 » Sat Jun 27, 2009 5:08 pm

dictator187 wrote:tried all the ways previously mentioned in this post and none of them work for me.
I'm not really sure which situation you mean. I suppose you mean:
  • the bot has selected a target and the target is moving away. In that case the bot tries to move closer to the mob. If the mob wander again, the bot moves again closer ... and so on.
Up to now I don't really have areas, where that is a problem. Since the mobs don't wander so long. One way to avoid this (if the described situation is your case) would be to turn down the 'MAX_FIGHT_TIME'. That means the time till you last hit or try to hit a mob. If you don't hurt the mob in that time frame, the bot will abort that mob.
The RoM Bot Online Wiki needs your help!

birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: Is there a way to skip a target if it's xx away from waypoin

#10 Post by birdy64 » Sat Jul 11, 2009 7:05 am

I am still having issues with the proposed fix. I have modified the script as mentioned but the bot will still move in closer to attack. The reason I am having this issue to begin with is if you have your waypoints close to a hillside and a mob is close by, the bot may go down the hill with no means of making it back up. There is so many hills and mounds to get stuck on. I just want to be able to have the bot check distance to mob first then ignore if it's too far away.

aasi888
Posts: 64
Joined: Fri May 15, 2009 5:13 am

Re: Is there a way to skip a target if it's xx away from waypoin

#11 Post by aasi888 » Sat Jul 11, 2009 9:15 am

This gave me an idea. Why not add an option:

Code: Select all

<option name="TARGETING_DISTANCE" value="300" />
It would target mobs if theyr at 300 range or closer to the waypoint. This way the bot would look more humanlike if it could target from a long range and just run straight to mob instead of running through every waypoint. This would work especially in flat areas.

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

Re: Is there a way to skip a target if it's xx away from waypoin

#12 Post by d003232 » Sat Jul 11, 2009 4:40 pm

aasi888 wrote:This gave me an idea. Why not add an option:

Code: Select all

<option name="TARGETING_DISTANCE" value="300" />
It would target mobs if theyr at 300 range or closer to the waypoint. This way the bot would look more humanlike if it could target from a long range and just run straight to mob instead of running through every waypoint. This would work especially in flat areas.
I don't really get the problem. Since I have some remarks:
  • the only way to 'see' and find a mob is to get it as a target with the target hotkey. That works only in a range from ~ 220.
  • if you set a distance from your waypoint with 300, than your waypoints must also be in that distance. It is not uncommon to set waypoints only every 400 or greater distance. I think what you mean would be more a targeting 'corridor' from waypoint to waypoint.
The RoM Bot Online Wiki needs your help!

aasi888
Posts: 64
Joined: Fri May 15, 2009 5:13 am

Re: Is there a way to skip a target if it's xx away from waypoin

#13 Post by aasi888 » Sat Jul 11, 2009 4:46 pm

d003232 wrote:'see' and find a mob is to get it as a target with the target hotkey. That works only in a range from ~ 220.[*]if you set a distance from your waypoint with 300, than your waypoints must also be in that distance. It is not uncommon to set waypoints only every 400 or greater distance. I think what you mean would be more a targeting 'corridor' from waypoint to waypoint.[/list]
I think you got what I mean. Mayby the targeting hotkey range could be edited in the client so we could target mobs from greater distance? In other bots like Lineage2 bots the mob can be targeted from pretty much any distance in spite of the normal l2 client only allows to do short range targeting.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests