[REQ] Userfunction: Minimum combat Distance

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Blyad
Posts: 49
Joined: Fri Oct 07, 2011 3:16 am

[REQ] Userfunction: Minimum combat Distance

#1 Post 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.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: [REQ] Userfunction: Minimum combat Distance

#2 Post 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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Blyad
Posts: 49
Joined: Fri Oct 07, 2011 3:16 am

Re: [REQ] Userfunction: Minimum combat Distance

#3 Post 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?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: [REQ] Userfunction: Minimum combat Distance

#4 Post 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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: [REQ] Userfunction: Minimum combat Distance

#5 Post 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.
Post Reply