Page 1 of 1

[REQ] Userfunction: Minimum combat Distance

Posted: Tue Dec 06, 2011 9:57 pm
by Blyad
im sure everyone is familar with targeting distance and combat range (50 for melee 150-255 for casters) and the various adjustments that can be made for these settings. i would like to discuss how one would go about making (or if someone has allready made please post it ^_^ ) a userfunction that would intergrate a minimum combat distance.


for example lets say max combat distance for a rogue is 50. but a mob is standing directly inside your character and your getting pounded on while you wait for the timer to run out on detecting damage to the mob. setting a minimum combat distance of lets say 20 would then force your character to walk backwards slightly before continuing the attack.

this could allso be effective for intergrating attacks such as the warrior skill surprise attack, and the knight skill charge, if the function could be called in a OnSkillCast or OnSkillPrecast

just something to think about. recently allot of my bots have been simply dying because mobs get to close and the bot doesnt know enough to walk back a few steps.

Re: [REQ] Userfunction: Minimum combat Distance

Posted: Tue Dec 06, 2011 10:44 pm
by rock5
There is already a check to see if you are too close to a mob. Probably if you are right on top of a mob and it doesn't move or even if you are a bit out of range and it doesn't move closer, it will be because the server hasn't reported the correct position of the mob so the bot thinks it's at the right distance to attack but it isn't. I'm not really sure what causes that, maybe lag.

There is nothing we can do about this except maybe reduce the MAX_FIGHT_TIME in your profile so it tries to break from combat sooner.

Re: [REQ] Userfunction: Minimum combat Distance

Posted: Wed Dec 07, 2011 1:42 am
by Blyad
is there a way to modify the check to be further away from the mob than the default setting? and in what .xml is the distance check function source code located?

Re: [REQ] Userfunction: Minimum combat Distance

Posted: Wed Dec 07, 2011 3:52 am
by rock5
Line 1210 of player.lua

Code: Select all

		if( dist < 5.0 and not self.Casting ) then
Although, I'm not convinced changing this value will help.

Re: [REQ] Userfunction: Minimum combat Distance

Posted: Wed Dec 07, 2011 3:58 pm
by MiesterMan
There is an addon that will autocorrect the situation. "Must face target" or something. Look through the curse database in the curse client to find it.