Enemy detection range bug
Enemy detection range bug
In micromacro window:
Moving to waypoint #17, (12147, 24571)
Moving to waypoint #18, (12047, 24513)
We get aggro. Stop moving to waypoint and wait for target.
Waiting on aggressive enemies.
Engaging enemy [Giant Marsh Wolf] in combat.
Moving in | Suggested range: 200 | Distance: 27378
HUH?!?!?! I have max combat range set to 200. Why would it try to engage an enemy that is 27378 units away? This is repeatable too (though not 100%). It only seems to happen in this spot.
Moving to waypoint #17, (12147, 24571)
Moving to waypoint #18, (12047, 24513)
We get aggro. Stop moving to waypoint and wait for target.
Waiting on aggressive enemies.
Engaging enemy [Giant Marsh Wolf] in combat.
Moving in | Suggested range: 200 | Distance: 27378
HUH?!?!?! I have max combat range set to 200. Why would it try to engage an enemy that is 27378 units away? This is repeatable too (though not 100%). It only seems to happen in this spot.
Re: Enemy detection range bug
I would sugguest avoiding that spot.
There are some places in RoM that are just bugged, you can walk there and suddenly be in combat, which is whats happening to you and the in combat remains. I have had times when i got in combat with no actual mobs near me and I stayed in combat until I logged out. Had this happen in instances too, if in combat you can't use resurect, so people notice it in that situation.
There are some places in RoM that are just bugged, you can walk there and suddenly be in combat, which is whats happening to you and the in combat remains. I have had times when i got in combat with no actual mobs near me and I stayed in combat until I logged out. Had this happen in instances too, if in combat you can't use resurect, so people notice it in that situation.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
- Administrator
- Site Admin
- Posts: 5353
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Enemy detection range bug
Yeah. Looks like it could be a bug with the game. Must be getting aggro from an enemy that's bugged and the client thinks it is really far away.
On line 966 of player.lua, you'll see this:
Under that line, try adding this:
What's is the output of that line after this bug occurs?
On line 966 of player.lua, you'll see this:
Code: Select all
cprintf(cli.green, language[22], target.Name); -- engagin x in combat
Code: Select all
printf("[DEBUG] player pos: (%d,%d, %d), enemy pos: (%d, %d, %d)\n", self.X, self.Y, self.Z, target.X, target.Y, target.Z);
Re: Enemy detection range bug
I'm testing now... has been running for about an hour, but now it seems to be working without issue. 
EDIT: Here we go!
Moving to waypoint #19, (12030, 24372)
Moving to waypoint #18, (12047, 24513)
Moving to waypoint #17, (12147, 24571)
Moving to waypoint #16, (12185, 24660)
We get aggro. Stop moving to waypoint and wait for target.
Waiting on aggressive enemies.
Engaging enemy [Giant Marsh Wolf] in combat.
[DEBUG] player pos: (12170,11, 24607), enemy pos: (12177, 11, 24507)
Moving in | Suggested range: 200 | Distance: 27452
Use MACRO: PRIEST_URGENT_HEAL => Zurhidon Researcher (5913/5913)
Use MACRO: PRIEST_REGENERATE => Zurhidon Researcher (5913/5913)
Stopping execution.
EDIT: Here we go!
Moving to waypoint #19, (12030, 24372)
Moving to waypoint #18, (12047, 24513)
Moving to waypoint #17, (12147, 24571)
Moving to waypoint #16, (12185, 24660)
We get aggro. Stop moving to waypoint and wait for target.
Waiting on aggressive enemies.
Engaging enemy [Giant Marsh Wolf] in combat.
[DEBUG] player pos: (12170,11, 24607), enemy pos: (12177, 11, 24507)
Moving in | Suggested range: 200 | Distance: 27452
Use MACRO: PRIEST_URGENT_HEAL => Zurhidon Researcher (5913/5913)
Use MACRO: PRIEST_REGENERATE => Zurhidon Researcher (5913/5913)
Stopping execution.
Re: Enemy detection range bug
Hm... 27452 is exactly the distance of the player to 0,0.
- 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: Enemy detection range bug
It's always the Giant Marsh Wolf too. There might be something glitched because of the Marsh Wolf's hide ability. I know that if the bot is set to engage these mobs and they are hidden, the bot gets stuck in a loop.
With that said, I do not believe there are any Giant Marsh Wolves in the immediate vicinity (greater than 225 units from any of my waypoints).
With that said, I do not believe there are any Giant Marsh Wolves in the immediate vicinity (greater than 225 units from any of my waypoints).
Re: Enemy detection range bug
The strange thing is, it shows the target position correctly but then later on, target.X and target.Z fall to 0. You don't have some code somewhere that uses the 'target' variable that might be overwriting it, do you?
- 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: Enemy detection range bug
Not anything I'm aware of. I read the target variable for some things, but I never write to it.rock5 wrote:The strange thing is, it shows the target position correctly but then later on, target.X and target.Z fall to 0. You don't have some code somewhere that uses the 'target' variable that might be overwriting it, do you?
Re: Enemy detection range bug
Do you change any player settings?
- 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: Enemy detection range bug
My profile:
EDIT: I believe I have found a workaround for this problem.
I use this
in my waypoint file for that particular area, so far so good. Now, when that phantom wolf aggros, the bot will simply ignore it.
EDIT2: NOOOO! Didn't work. Wigged out after a little over 2 hours again.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<profile>
<options>
<!-- Try the bot with a new char mage -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="85" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="40" />
<option name="USE_HP_POTION" value="best" /> <!-- potion select strategy: best|minstack -->
<option name="USE_MANA_POTION" value="best" /> <!-- potion select strategy: best|minstack -->
<option name="INV_AUTOSELL_ENABLE" value="true" />
<option name="INV_AUTOSELL_FROMSLOT" value="31" />
<option name="INV_AUTOSELL_TOSLOT" value="60" />
<option name="INV_AUTOSELL_QUALITY" value="white,green,blue" />
<option name="INV_AUTOSELL_IGNORE" value="Purify Rune,Frost Rune,Blend Rune,Sand,Bundle,Timber" />
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />
<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="99" />
<option name="MANA_POTION" value="99" />
<option name="ARROW_QUIVER" value="0" />
<option name="THROWN_BAG" value="0" />
<option name="POISON" value="0" />
<!-- either false or arrow or thrown -->
<option name="RELOAD_AMMUNITION" value="false" /> <!-- false|arrow|thrown -->
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="false" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="200" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="225" />
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="3" />
<option name="TARGET_LEVELDIF_BELOW" value="50" />
<!-- Eggpet options -->
<option name="EGGPET_ENABLE_CRAFT" value="false" /><!-- If using same slot for assist and craft, only 1 can be enabled. -->
<option name="EGGPET_CRAFT_SLOT" value="1" />
<option name="EGGPET_ENABLE_ASSIST" value="true" />
<option name="EGGPET_ASSIST_SLOT" value="1" />
<option name="EGGPET_CRAFT" value="mining,woodworking,herbalism" /> <!-- 'mining', 'woodworking', 'herbalism' or combination. -->
<option name="EGGPET_CRAFTINDEX" value="" /> <!-- The level to craft. "" defaults to maximum -->
<!-- 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="999" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="120" />
<option name="HARVEST_WOOD" value="true" /> <!-- Choose which types to harvest. -->
<option name="HARVEST_HERB" value="true" /> <!-- "true" = harvest, "false" = do not harvest -->
<option name="HARVEST_ORE" value="true" />
<!-- 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="false" />
<option name="MAX_DEATHS" value="1" /> <!-- Log out after this many deaths -->
<!-- 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="" />
</friends>
<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="" />
<mob name="" />
<mob name="" />
</mobs>
<hotkeys>
<!-- to communicate with the RoM API / define ingame dummy macro at place 1 -->
<hotkey name="MACRO" modifier="" key="VK_0" />
</hotkeys>
<skills_priest>
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="MACRO" priority="110" hpper="25" />
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="MACRO" priority="109" hpper="25" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="MACRO" priority="108" hpper="50" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="MACRO" priority="100" inbattle="true" />
<skill name="PRIEST_RISING_TIDE" modifier="" hotkey="MACRO" priority="90" />
<skill name="PRIEST_BONE_CHILL" modifier="" hotkey="MACRO" priority="80" />
<skill name="MAGE_LIGHTNING" modifier="" hotkey="MACRO" priority="70" />
<skill name="PRIEST_ICEWIND_BLADE" modifier="" hotkey="MACRO" priority="60" />
<skill name="PRIEST_CHAIN_OF_LIGHT" modifier="" hotkey="MACRO" priority="50" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="MACRO" priority="40" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="MACRO" priority="9" autouse="false" />
<skill name="PRIEST_ANGELS_BLESSING" modifier="" hotkey="MACRO" priority="8" autouse="false" />
<skill name="MAGE_FIRE_WARD" modifier="" hotkey="MACRO" priority="7" autouse="false" />
<skill name="PRIEST_BLESSED_SPRING_WATER" modifier="" hotkey="MACRO" priority="6" autouse="false" />
<skill name="MAGE_INTENSIFICATION" modifier="" hotkey="MACRO" priority="5" autouse="false" />
<skill name="PRIEST_GRACE_OF_LIFE" modifier="" hotkey="MACRO" priority="4" autouse="false" />
<skill name="PRIEST_MAGIC_BARRIER" modifier="" hotkey="MACRO" priority="3" autouse="false" />
</skills_priest>
<skills_mage>
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="MACRO" priority="110" hpper="25" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="MACRO" priority="109" hpper="50" />
<skill name="MAGE_ELEMENTAL_CATALYST" modifier="" hotkey="MACRO" priority="95" />
<skill name="MAGE_FLAME" modifier="" hotkey="MACRO" priority="80" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="MACRO" priority="70" />
<skill name="MAGE_ELECTRIC_BOLT" modifier="" hotkey="MACRO" priority="60" />
<skill name="MAGE_LIGHTNING" modifier="" hotkey="MACRO" priority="50" />
<skill name="MAGE_RISING_TIDE" modifier="" hotkey="MACRO" priority="40" />
<skill name="MAGE_DISCHARGE" modifier="" hotkey="MACRO" priority="30" />
<skill name="MAGE_PLASMA_ARROW" modifier="" hotkey="MACRO" priority="20" />
<skill name="MAGE_ELECTRIC_EXPLOSION" modifier="" hotkey="MACRO" priority="10" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="MACRO" priority="9" autouse="false" />
<skill name="MAGE_FIRE_WARD" modifier="" hotkey="MACRO" priority="8" autouse="false" />
<skill name="PRIEST_BLESSED_SPRING_WATER" modifier="" hotkey="MACRO" priority="7" autouse="false" />
<skill name="MAGE_INTENSIFICATION" modifier="" hotkey="MACRO" priority="6" autouse="false" />
<skill name="MAGE_ELECTROSTATIC_CHARGE" modifier="" hotkey="MACRO" priority="5" autouse="false" />
<skill name="PRIEST_MAGIC_BARRIER" modifier="" hotkey="MACRO" priority="4" autouse="false" />
<skill name="MAGE_ESSENCE_OF_MAGIC" modifier="" hotkey="MACRO" priority="1" autouse="false" />
</skills_mage>
<onLeaveCombat>
catchCavy()
feedPet(1)
</onLeaveCombat>
<onPreSkillCast>
local tdistance = player:distanceToTarget()
local targetPawn = CPawn(player.TargetPtr)
local charged = player:hasBuff("Charged")
local mana = player.MP/player.MaxMP*100
if( arg1.Name == "MAGE_ELEMENTAL_CATALYST" ) then
local CD = RoMScript("CD('Elemental Catalysis')") or false
if( (50 > mana) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_FLAME" ) then
if( (not charged) and (targetPawn.HP > player.HP) ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_FIREBALL" ) then
local CD = RoMScript("CD('Fireball')") or false
if( (not charged) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_RISING_TIDE" ) then
local CD = RoMScript("CD('Rising Tide')") or false
if( (not charged) and (200 >= tdistance) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_HOLY_AURA" ) then
local CD = RoMScript("CD('Holy Aura')") or false
if( CD ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_SOUL_SOURCE" ) then
local CD = RoMScript("CD('Soul Source')") or false
if( CD ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_BONE_CHILL" ) then
if( not targetPawn:hasDebuff("Bone Chill") ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_WAVE_ARMOR" ) then
local CD = RoMScript("CD('Wave Armor')") or false
if( (not player:hasBuff("Wave Armor")) and (not player:hasDebuff("Wave Armor Ineffective")) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_LIGHTNING" ) then
local CD = RoMScript("CD('Lightning')") or false
if( player.Class1 == CLASS_PRIEST ) then
if( (not targetPawn:hasDebuff("Electric Shock")) and targetPawn:hasDebuff("Bone Chill") and CD ) then
return true
else
return false
end
else
if( (not targetPawn:hasDebuff("Electric Shock")) and (150 >= tdistance) and CD ) then
return true
else
return false
end
end
elseif( arg1.Name == "MAGE_ELECTRIC_BOLT" ) then
if( (not targetPawn:hasDebuff("Electric Flow")) and (not charged) and (200 >= tdistance) ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_PLASMA_ARROW" ) then
if( (not charged) and (200 >= tdistance) ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_ELECTRIC_EXPLOSION" ) then
if( charged ) then
return true
else
return false
end
elseif( arg1.Name == "MAGE_DISCHARGE" ) then
local CD = RoMScript("CD('Discharge')") or false
if( (player:GetEnemiesInRange(50) > 2) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_CHAIN_OF_LIGHT" ) then
local CD = RoMScript("CD('Chain of Light')") or false
if( ((player:hasBuff("Wave Armor")) or (tdistance > 150) or (targetPawn:hasDebuff("Electric Shock") and (tdistance > 50) )) and CD ) then
return true
else
return false
end
elseif( arg1.Name == "PRIEST_ICEWIND_BLADE" ) then
local CD = RoMScript("CD('Icewind Blade')") or false
if( CD ) then
return true
else
return false
end
else
return true
end
</onPreSkillCast>
<onSkillCast>
local targetPawn = CPawn(player.TargetPtr)
local health = player.HP/player.MaxHP*100
local thealth = targetPawn.HP/targetPawn.MaxHP*100
local mana = player.MP/player.MaxMP*100
if( 90 > health ) then
if( not player:hasBuff("Regenerate") ) then
player:cast("PRIEST_REGENERATE")
end
end
if player.Class1 == CLASS_MAGE then
if( (90 > health) and (not player:hasBuff("Electrostatic Charge")) ) then
local CD = RoMScript("CD('Electrostatic Charge')") or false
if( CD ) then
player:cast("MAGE_ELECTROSTATIC_CHARGE")
end
end
if( not player:hasBuff("Essence of Magic") ) then
player:cast("MAGE_ESSENCE_OF_MAGIC")
end
elseif player.Class1 == CLASS_PRIEST then
if( not player:hasBuff("Grace of Life") ) then
player:cast("PRIEST_GRACE_OF_LIFE")
end
if( not player:hasBuff("Angel's Blessing") ) then
player:cast("PRIEST_ANGELS_BLESSING")
end
end
if( not player:hasBuff("Magic Barrier") ) then
player:cast("PRIEST_MAGIC_BARRIER")
end
if( not player:hasBuff("Blessed Spring Water") ) then
--player:cast("PRIEST_BLESSED_SPRING_WATER")
end
if( not player:hasBuff("Fire Ward") ) then
player:cast("MAGE_FIRE_WARD")
end
if( player.Battling and (targetPawn.HP > player.HP) ) then
local CD = RoMScript("CD('Intensification')") or false
if( CD ) then
--player:cast("MAGE_INTENSIFICATION")
end
end
</onSkillCast>
</profile>
I use this
Code: Select all
settings.profile.friends = {"Wolf"}
EDIT2: NOOOO! Didn't work. Wigged out after a little over 2 hours again.