COMBAT_DISTANCE option not working *FIXED*?
COMBAT_DISTANCE option not working *FIXED*?
I've set COMBAT_DISTANCE to 180 because I want to start my attack with Bone Chill but it always starts attacking with other skills as soon as the mob comes in range (around 220).
With COMBAT_DISTANCE at 180 it should move into that distance before attacking. I think this has been happening since the memory address mob targeting was introduced.
With COMBAT_DISTANCE at 180 it should move into that distance before attacking. I think this has been happening since the memory address mob targeting was introduced.
Last edited by rock5 on Sat Sep 11, 2010 10:26 pm, edited 2 times in total.
- 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
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: COMBAT_DISTANCE option not working
true have same issue but wasnt sure if i should put it in here ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: COMBAT_DISTANCE option not working
Try to set MAX_TARGET_DISTANCE to 180, i think it pays more attention to it now...rock5 wrote:I've set COMBAT_DISTANCE to 180 because I want to start my attack with Bone Chill but it always starts attacking with other skills as soon as the mob comes in range (around 220).
With COMBAT_DISTANCE at 180 it should move into that distance before attacking. I think this has been happening since the memory address mob targeting was introduced.
Re: COMBAT_DISTANCE option not working
COMBAT_DISTANCE and MAX_TARGET_DISTANCE are different settings. MAX_TARGET_DISTANCE means it ignores any targets further away than this value. COMBAT_DISTANCE means if the target is further than this value then move closer. I don't necessarily want to set MAX_TARGET_DISTANCE to 180 although it might be a temporary fix.VoidMain wrote:Try to set MAX_TARGET_DISTANCE to 180, i think it pays more attention to it now...rock5 wrote:I've set COMBAT_DISTANCE to 180 because I want to start my attack with Bone Chill but it always starts attacking with other skills as soon as the mob comes in range (around 220).
With COMBAT_DISTANCE at 180 it should move into that distance before attacking. I think this has been happening since the memory address mob targeting was introduced.
- 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
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: COMBAT_DISTANCE option not working
Can you post a copy of your profile?
Re: COMBAT_DISTANCE option not working
Administrator wrote:Can you post a copy of your profile?
Code: Select all
<profile>
<options>
<!-- Try the bot with a new char mage -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="40" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="40" />
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="40" />
<option name="MP_REST" value="40" />
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="0" />
<option name="MANA_POTION" value="0" />
<option name="ARROW_QUIVER" value="0" />
<option name="THROWN_BAG" value="0" />
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="180" />
<option name="MAX_FIGHT_TIME" value="7" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="4" />
<option name="TARGET_LEVELDIF_BELOW" value="40" />
<!-- Waypoint and movement settings -->
<option name="WAYPOINTS" value="" /> <!-- leave empty to show a list -->
<option name="RETURNPATH" value="" />
<option name="PATH_TYPE" value="waypoints" /> <!-- waypoints | wander -->
<option name="WANDER_RADIUS" value="500" />
<option name="WAYPOINT_DEVIATION" value="0" />
<option name="QUICK_TURN" value="true" />
<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_IN_COMBAT" value="true" />
<option name="LOOT_DISTANCE" value="225" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="120" />
<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="0" /> <!-- in minutes, 0 = timer disabled -->
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="true" />
<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
<!--Expert Options -->
<option name="DEBUG_AUTOSELL" value="false" />
<option name="INV_AUTOSELL_ENABLE" value="true" />
<option name="INV_AUTOSELL_FROMSLOT" value="1" />
<option name="INV_AUTOSELL_TOSLOT" value="30" />
<option name="INV_AUTOSELL_QUALITY" value="white,green" />
<option name="INV_AUTOSELL_STATS_NOSELL" value="Stamina XI,Physique XI,Knowledge XI,Intellect XI,Epidemic XI,Dexterity XI,Purity XI,Spirit XI,Solidity XI,Custodian XI, XII" />
<option name="INV_AUTOSELL_IGNORE" value="Crystal Mana Medicine, V, IV, III,Vigor II,Endurance II,Resistance II" />
<option name="INV_AUTOSELL_NOSELL_DURA" value="110" />
<option name="HARVEST_SCAN_WIDTH" value="15" /> -- steps horizontal
<option name="HARVEST_SCAN_HEIGHT" value="5" /> -- steps vertical
<option name="HARVEST_SCAN_STEPSIZE" value="25" /> -- wide of every step
<option name="HARVEST_SCAN_TOPDOWN" value="true" /> -- true = top->down false = botton->up
<option name="HARVEST_SCAN_YREST" value="15" /> -- scanspeed: higher values = slower scan
<option name="HARVEST_SCAN_YMOVE" value="1.3" /> -- move scan area top/down ( 1 middle of screen )
<option name="HARVEST_TIME" value="10" /> -- how long we maximum harvest a node
<option name="DEBUGGING" value="true" />
<!-- For more options and documentation see the RoM Bot Wiki: -->
<!-- http://www.solarstrike.net/wiki/index.php5?title=RoM_Bot -->
</options>
<friends>
<!-- names of friends we help fighting or enemys we don't want to attack -->
<!-- for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer -->
<friend name="minotaur patrolman's pet" />
<friend name="elitemob K\132fer" />
<friend name="elitemob H\129ter" />
</friends>
<hotkeys>
<!-- to communicate with the RoM API / define ingame a dummy macro at place 1 -->
<hotkey name="MACRO" key="VK_0" />
</hotkeys>
<!-- define your skills depending from your actual primary class -->
<!-- see the example for a priest/mage -->
<!-- delete skills you don't have or don't want to use. -->
<!-- For more skills to use see /database/skills.xml -->
<!-- demo skills for LvL 1 character for all classes -->
<skills_mage>
<skill name="PRIEST_URGENT_HEAL" hotkey="MACRO" priority="120" hpper="60" inbattle="false"/>
<skill name="PRIEST_REGENERATE" hotkey="MACRO" priority="110" hpper="90" inbattle="false"/>
<!--skill name="MAGE_ESSENCE_OF_MAGIC" hotkey="MACRO" priority="105" inbattle="false"/>
<skill name="MAGE_ELECTROSTATIC_CHARGE" hotkey="MACRO" priority="100" inbattle="true" /-->
<!--skill name="MAGE_ENERGY_WELL" hotkey="MACRO" priority="90" inbattle="true" /-->
<!--skill name="MAGE_FLAME_OPENER" hotkey="MACRO" priority="70" maxuse="1" /-->
<!--skill name="MAGE_FLAME" hotkey="MACRO" priority="65" />
<skill name="MAGE_FIREBALL" hotkey="MACRO" priority="50" /-->
<skill name="MAGE_ELECTRIC_BOLT" hotkey="MACRO" priority="80" maxuse="1"/>
<skill name="MAGE_LIGHTNING" hotkey="MACRO" priority="60" maxuse="1"/>
<!--skill name="PRIEST_RISING_TIDE" hotkey="MACRO" priority="55" level="" maxuse="1"/-->
<skill name="MAGE_PLASMA_ARROW" hotkey="MACRO" priority="45" />
<skill name="MAGE_ELECTRIC_EXPLOSION" hotkey="MACRO" priority="40" />
</skills_mage>
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" hotkey="MACRO" priority="130" hpper="25" inbattle="true" />
<skill name="PRIEST_HEAL" hotkey="MACRO" priority="120" hpper="60"/>
<skill name="PRIEST_REGENERATE" hotkey="MACRO" priority="110" hpper="80"/>
<skill name="PRIEST_ANGELS_CAROL" hotkey="MACRO" priority="105" manaper="80"/>
<!--skill name="PRIEST_WAVE_ARMOR" hotkey="MACRO" priority="90" level="" />
<skill name="PRIEST_CHAIN_OF_LIGHT" hotkey="MACRO" priority="79" level="" maxuse="1"/-->
<skill name="PRIEST_BONE_CHILL" hotkey="MACRO" priority="70" level="" />
<skill name="MAGE_LIGHTNING" hotkey="MACRO" priority="60" level="" autouse="false"/>
<skill name="PRIEST_ICEWIND_BLADE" hotkey="MACRO" priority="55" level="" />
<skill name="PRIEST_RISING_TIDE" hotkey="MACRO" priority="50" level="" />
<skill name="PRIEST_ANGELS_BLESSING" hotkey="MACRO" priority="45" inbattle="false" />
<skill name="PRIEST_GRACE_OF_LIFE" hotkey="MACRO" priority="40" inbattle="false" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="MACRO" priority="30" inbattle="false" />
</skills_priest>
<onLoad>
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
if player.Class1 == CLASS_PRIEST then
for k,v in pairs(settings.profile.skills) do
if v.Name == "MAGE_LIGHTNING" then
v.MinRange = 0
end
end
else
changeProfileOption("COMBAT_DISTANCE", 160)
for k,v in pairs(settings.profile.skills) do
if v.Name == "MAGE_PLASMA_ARROW" then
v.Cooldown = 6
end
end
end
--[[while (true) do
sendMacro("acsMacro();");
yrest(50)
end]]
</onLoad>
<onDeath>
-- Additional Lua code to execute on death
pauseOnDeath(); -- Stop the script
</onDeath>
<onLeaveCombat>
-- Additional Lua code to execute after a target is finished
-- Make space in bag by deleteing cheap items
--if not DeleteGarbage() then
-- print("Unable to clear enough space in bag")
-- player:sleep()
--end
</onLeaveCombat>
<onLevelup>
-- thats a demo for opening the gift bags from Lvl 1-10
-- and levelup the skills for a new character (mage or priest recommended)
-- you can delete that lines if you don't want to use that
</onLevelup>
<onSkillCast>
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast.
if player.Class1 == CLASS_MAGE then -- Emergency actions for Mage
--[[if arg1.Name ~= "MAGE_PLASMA_ARROW" and arg1.Name ~= "MAGE_ELECTRIC_BOLT" then
player:updateBuffs()
if table.find(player.Buffs,"Charged") == false then
player:cast("MAGE_PLASMA_ARROW");
end
end
if arg1.Name == "MAGE_PLASMA_ARROW" then
player:cast("MAGE_ELECTRIC_EXPLOSION");
end]]
else
if arg1.Name == "PRIEST_BONE_CHILL" then
yrest(500)
player:cast("MAGE_LIGHTNING");
end
end
</onSkillCast>
</profile>
- 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
Re: COMBAT_DISTANCE option not working
I know what it means, but with the new changes, seems to be the option taken into account when attacking i'm not saying its right, just that is working like this, ta least is that what it seems when looking at the target selection code...rock5 wrote:COMBAT_DISTANCE and MAX_TARGET_DISTANCE are different settings. MAX_TARGET_DISTANCE means it ignores any targets further away than this value. COMBAT_DISTANCE means if the target is further than this value then move closer. I don't necessarily want to set MAX_TARGET_DISTANCE to 180 although it might be a temporary fix.VoidMain wrote:Try to set MAX_TARGET_DISTANCE to 180, i think it pays more attention to it now...rock5 wrote:I've set COMBAT_DISTANCE to 180 because I want to start my attack with Bone Chill but it always starts attacking with other skills as soon as the mob comes in range (around 220).
With COMBAT_DISTANCE at 180 it should move into that distance before attacking. I think this has been happening since the memory address mob targeting was introduced.
Re: COMBAT_DISTANCE option not working
I'm not 100% sure what you just said but the part that deals with COMBAT_DISTANCE is still in the code. Look at around line 945 of player.lua.VoidMain wrote:I know what it means, but with the new changes, seems to be the option taken into account when attacking i'm not saying its right, just that is working like this, ta least is that what it seems when looking at the target selection code...
Code: Select all
-- Move closer to the target if needed
local suggestedRange = settings.options.MELEE_DISTANCE;
if( suggestedRange == nil ) then suggestedRange = 45; end;
if( settings.profile.options.COMBAT_TYPE == "ranged" or
self.ranged_pull == true ) then
if( settings.profile.options.COMBAT_DISTANCE ~= nil ) then
suggestedRange = settings.profile.options.COMBAT_DISTANCE;
else
suggestedRange = 155;
end
end
Code: Select all
if( dist > suggestedRange and not player.Casting ) then
- 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
Re: COMBAT_DISTANCE option not working
I believe that code is ignored by the new function that selects "best target":rock5 wrote:I'm not 100% sure what you just said but the part that deals with COMBAT_DISTANCE is still in the code. Look at around line 945 of player.lua.VoidMain wrote:I know what it means, but with the new changes, seems to be the option taken into account when attacking i'm not saying its right, just that is working like this, ta least is that what it seems when looking at the target selection code...And the part that follows thisCode: Select all
-- Move closer to the target if needed local suggestedRange = settings.options.MELEE_DISTANCE; if( suggestedRange == nil ) then suggestedRange = 45; end; if( settings.profile.options.COMBAT_TYPE == "ranged" or self.ranged_pull == true ) then if( settings.profile.options.COMBAT_DISTANCE ~= nil ) then suggestedRange = settings.profile.options.COMBAT_DISTANCE; else suggestedRange = 155; end end
If this code worked as intended then it should be working.Code: Select all
if( dist > suggestedRange and not player.Casting ) then
Code: Select all
evalTargetDefault
Code: Select all
-- check distance to target against MAX_TARGET_DIST
if( distance(player.X, player.Z, target.X, target.Z) > settings.profile.options.MAX_TARGET_DIST ) then
Re: COMBAT_DISTANCE option not working
evalTargetDefault is only used to evaluate if the target is valid so MAX_TARGET_DIST is checked there. COMBAT_DISTANCE, on the other-hand, is used to decide if you need to move closer or not. You would only use it on a target that has already been evaluated as valid. So you wouldn't see it in evalTargetDefault anyway. I've been trying to follow the code for about an hour. It looks like it should be working but it's too confusing for me to follow.VoidMain wrote:I believe that code is ignored by the new function that selects "best target":It only checks against MAX_TARGET_DISTANCE:Code: Select all
evalTargetDefault
Code: Select all
-- check distance to target against MAX_TARGET_DIST if( distance(player.X, player.Z, target.X, target.Z) > settings.profile.options.MAX_TARGET_DIST ) then
It is important. Like I said above, I want to be able to attack targets up to about 225 but I want to move in closer to 180 first so my attack sequence works as intended. If I set MAX_TARGET_DISTANCE to 180 it will ignore targets further than 180 which is not what I want.VoidMain wrote:But i'm not quite sure thats so important, didn't follow all the code but did noticed that if i change MAX_TARGET_DISTANCE it works as expected...
- 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
Re: COMBAT_DISTANCE option not working
The "not so important" part was about the check in evalTargetDefaultrock5 wrote:evalTargetDefault is only used to evaluate if the target is valid so MAX_TARGET_DIST is checked there. COMBAT_DISTANCE, on the other-hand, is used to decide if you need to move closer or not. You would only use it on a target that has already been evaluated as valid. So you wouldn't see it in evalTargetDefault anyway. I've been trying to follow the code for about an hour. It looks like it should be working but it's too confusing for me to follow.VoidMain wrote:I believe that code is ignored by the new function that selects "best target":It only checks against MAX_TARGET_DISTANCE:Code: Select all
evalTargetDefault
Code: Select all
-- check distance to target against MAX_TARGET_DIST if( distance(player.X, player.Z, target.X, target.Z) > settings.profile.options.MAX_TARGET_DIST ) then
It is important. Like I said above, I want to be able to attack targets up to about 225 but I want to move in closer to 180 first so my attack sequence works as intended. If I set MAX_TARGET_DISTANCE to 180 it will ignore targets further than 180 which is not what I want.VoidMain wrote:But i'm not quite sure thats so important, didn't follow all the code but did noticed that if i change MAX_TARGET_DISTANCE it works as expected...
![Wink ;)](./images/smilies/icon_e_wink.gif)
I absolutely agree with you, is not working as expected, but i never try a style like that before because i mostly use the mage to farm and start with flame wich has the longest range so i don't know about this...
About the code, yah, it "should" be working gonna debug it a bit with my priest and check, how is your priority on that skill with respect to the next?
Re: COMBAT_DISTANCE option not working
I posted my whole profile above. You can check it out there.VoidMain wrote:The "not so important" part was about the check in evalTargetDefault
I absolutely agree with you, is not working as expected, but i never try a style like that before because i mostly use the mage to farm and start with flame wich has the longest range so i don't know about this...
About the code, yah, it "should" be working gonna debug it a bit with my priest and check, how is your priority on that skill with respect to the next?
- 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
Re: COMBAT_DISTANCE option not working *FIXED*
I finally got around to fixing this myself. It should now be working in revision 494.
- 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
Re: COMBAT_DISTANCE option not working *FIXED*
Recently I've been doing 'kill mobs' scripts and to tell you the truth I'm not really happy with it. It stops too often and sometimes gives up on targets moving away, as has been reported by others. I think I should just change it to a 2 step process.rock5 wrote:I finally got around to fixing this myself. It should now be working in revision 494.
Step 1: Move to suggested range.
Step 2: Attack.
I'm trying it now. It looks as smooth as it used to be before COMBAT_DISTANCE stopped working. I'll test it for awhile.
- 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
Re: COMBAT_DISTANCE option not working *FIXED*?
If I'm seeing the same phenomena, the bot not only tries to walk away (even with an aggroed mob still attacking) but the bot then also tries to target/attack another mob. I've gotten killed a couple of times now when this happened. ![Sad :(](./images/smilies/icon_e_sad.gif)
![Sad :(](./images/smilies/icon_e_sad.gif)
Re: COMBAT_DISTANCE option not working *FIXED*?
It will be related if it says "taking too long to damage target".ou81too wrote:If I'm seeing the same phenomena, the bot not only tries to walk away (even with an aggroed mob still attacking) but the bot then also tries to target/attack another mob. I've gotten killed a couple of times now when this happened.
- 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
Re: COMBAT_DISTANCE option not working *FIXED*?
its the same problem that occures with my bot. It runs to the mob and breaks up because taking no damage...
Re: COMBAT_DISTANCE option not working *FIXED*?
I've committed the change to 497.
Let me know how it goes.
Let me know how it goes.
- 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
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest