Page 1 of 1
Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 9:34 am
by birdy64
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 10:10 am
by xxsinz
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" />
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 12:07 pm
by birdy64
That won't work. It will just keep creeping up closer to the target till it's within range.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 12:21 pm
by xxsinz
What happens when you turn down the wander radius?
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 1:29 pm
by birdy64
I use waypoints so Wander Radius isn't used. I also have Waypoint Deviation set to 0.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Mon Jun 15, 2009 5:06 pm
by Administrator
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Tue Jun 16, 2009 8:05 am
by birdy64
Thanks so much!
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jun 27, 2009 3:37 am
by dictator187
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jun 27, 2009 5:08 pm
by d003232
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jul 11, 2009 7:05 am
by birdy64
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jul 11, 2009 9:15 am
by aasi888
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jul 11, 2009 4:40 pm
by d003232
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.
Re: Is there a way to skip a target if it's xx away from waypoin
Posted: Sat Jul 11, 2009 4:46 pm
by aasi888
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.