Will not loot sometimes
Will not loot sometimes
My char will not always loot after combat. I have loot in combat turned on but if multiple targets are engaged his looting patterns are not consistent. Sometimes he will manage to loot everything, one at a time, but its just not always the case.
When I am fighting multiple targets he will sometimes abort casting spells to wait on aggressive enemies even though he is getting hit from one. Something like that increases the chances of him not looting after. He will eventually kill the enemy, but the option to loot does not show up at all. He just moves on to the next way point or enemy. Sometimes, it looks like he is fighting multiple enemies normally but just won't loot after combat.
First I thought its because he was interrupted while looting. However the script does not show the usual "Use MACRO: Looting target in distance xx." or "We didn't move to the loot". Both messages are missing.
Is there something I can do? I searched for some manual scan/loot option, but they don't seem to work.
When I am fighting multiple targets he will sometimes abort casting spells to wait on aggressive enemies even though he is getting hit from one. Something like that increases the chances of him not looting after. He will eventually kill the enemy, but the option to loot does not show up at all. He just moves on to the next way point or enemy. Sometimes, it looks like he is fighting multiple enemies normally but just won't loot after combat.
First I thought its because he was interrupted while looting. However the script does not show the usual "Use MACRO: Looting target in distance xx." or "We didn't move to the loot". Both messages are missing.
Is there something I can do? I searched for some manual scan/loot option, but they don't seem to work.
Re: Will not loot sometimes
Try posting your 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: Will not loot sometimes
I have the same issue once in a while. It seems to occur when two (or more) mobs attack at once, one is near death or dead, but the bot switches targets before looting and proceeds to kill the second mob and then loot it. The first mob, now lootable, is ignored.
Also when this happens:
Ranged-pull mob 1, aggro received from mob 2 before mob 1, mob 1 dies from ranged-pull, mob 2 killed and looted, mob 1 looting not attempted.
I used the lootbodies() function rock5 posted a while back and it works in most cases, but is vulnerable to infinite loops in rare cases.
Also when this happens:
Ranged-pull mob 1, aggro received from mob 2 before mob 1, mob 1 dies from ranged-pull, mob 2 killed and looted, mob 1 looting not attempted.
I used the lootbodies() function rock5 posted a while back and it works in most cases, but is vulnerable to infinite loops in rare cases.
Re: Will not loot sometimes
Here is my profile,
The situation that Alkaiser explained is exactly whats happening to me.
Yes I tried lootbodies, but its not very functional.
The situation that Alkaiser explained is exactly whats happening to me.
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="40" />
<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 -->
<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="35" />
<option name="MP_REST" value="35" />
<!-- 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" />
<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="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="125" />
<option name="MAX_FIGHT_TIME" value="3" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="125" />
<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="0" />
<option name="TARGET_LEVELDIF_BELOW" value="20" />
<!-- 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="125" />
<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="350" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->
<option name="INV_AUTOSELL_ENABLE" value="true" />
<option name="INV_AUTOSELL_FROMSLOT" value="1" />
<option name="INV_AUTOSELL_TOSLOT" value="60" />
<option name="INV_AUTOSELL_QUALITY" value="white,green,blue" />
<option name="INV_AUTOSELL_IGNORE" value="III" />
<!-- Harvest options -->
<option name="HARVEST_DISTANCE" value="75" />
<option name="HARVEST_SCAN_WIDTH" value="10" /> <!-- steps horizontal -->
<option name="HARVEST_SCAN_HEIGHT" value="5" /> <!-- steps vertical -->
<option name="HARVEST_SCAN_STEPSIZE" value="35" /> <!-- wide of every step -->
<option name="HARVEST_SCAN_TOPDOWN" value="false" /><!-- true = top->down false = botton->up -->
<option name="HARVEST_SCAN_XMULTIPLIER" value="1.0" /> <!-- multiplier for scan width -->
<option name="HARVEST_SCAN_YMULTIPLIER" value="0.5" /> <!-- multiplier for scan line height -->
<option name="HARVEST_SCAN_YREST" value="10" /> <!-- scanspeed -->
<option name="HARVEST_SCAN_YMOVE" value="1" /> <!-- move scan area top/down ( 1=middle of screen ) -->
<!-- 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" />
<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="MyOtherCharacter1" />
<friend name="MyOtherCharacter2" />
<friend name="Elite_Mob_Name1" />
<friend name="Elite_Mob_Name2" />
</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" key="VK_0" />
<hotkey name="ATTACK" key="VK_5" />
<hotkey name="HP_POTION" key="VK_MINUS" />
<hotkey name="MP_POTION" key="VK_EQUAL" />
</hotkeys>
<skills_mage>
<skill name="MAGE_FLAME" hotkey="VK_1" priority="90" targethpper="!60" />
<skill name="MAGE_FIREBALL" hotkey="VK_2" priority="80" />
<skill name="MAGE_PLASMA_ARROW" hotkey="VK_4" priority="70" />
<skill name="PRIEST_REGENERATE" hotkey ="VK_Z" priority="100" hpper="90" />
<skill name="PRIEST_URGENT_HEAL" hotkey="VK_N" priority="110" hpper="75" />
<skill name="PRIEST_HOLY_AURA" hotkey="VK_B" priority="120" hpper="50" />
</skills_mage>
</profile>Re: Will not loot sometimes
If you are aggro'd by a second mob while casting your first spell to the first mob then it will try to stop it's cast so it can attack the second mob. That is working as intended. Unfortunately occasionally it will still get off that first spell before it can stop. There is no way, really, for rombot to know for sure if it successfully stopped casting the spell so I don't see how we can avoid the situation you described.
But then it shouldn't happen very often and is only a problem when you kill the mob with 1 shot.
But then it shouldn't happen very often and is only a problem when you kill the mob with 1 shot.
- 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: Will not loot sometimes
Ya it doesn't seem to bother me, I am just wondering if the aggro thing messes up his loot priorities?
Is there no way to manual check to see if there are lootable bodies around?
Is there no way to manual check to see if there are lootable bodies around?
Re: Will not loot sometimes
This is what rock5 whipped up real quick in another thread. Make sure your LOOT_DISTANCE in your profile is greater than your MAX_TARGET_DIST or it could get stuck in a loop.
addon_lootbodies.lua
Then add this to your profile:
addon_lootbodies.lua
Code: Select all
function evalTargetLootable(address)
local target = CPawn(address)
if target.Lootable then
return true
end
return false
end
function lootBodies()
repeat
local Lootable = player:findEnemy(false, nil, evalTargetLootable)
if Lootable and player.Battling == false then
player:target(Lootable)
player.TargetPtr = Lootable.Address
player:loot()
end
until not Lootable or player.Battling
end
Code: Select all
<onLeaveCombat>
lootBodies();
</onLeaveCombat>
Re: Will not loot sometimes
Like Alkaiser said, you can use my lootBodies() function.checkii wrote:Ya it doesn't seem to bother me, I am just wondering if the aggro thing messes up his loot priorities?
Is there no way to manual check to see if there are lootable bodies around?
http://www.solarstrike.net/phpBB3/viewt ... 717#p13717
The problem with it is if your inventory is full or your loot filter doesn't collect all or you already have the max amount of the loot item in your inventory, then you will go into a continuous loop trying to loot the body.
So you have to be careful when using it and set up your character and waypoint file properly.
- 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: Will not loot sometimes
The full bag issue shouldn't be a problem since you can always tell the bot to go to the merchant once your bag is semi-full.
Something like
I set a threshold at bag space 35. Once the loot reaches the 2nd bag it will go to sell. You could also try
Thanks, I will give that function a shot.
Something like
Code: Select all
repeat unused, unused, unused, itemCountone = RoMScript("GetBagItemInfo(35)") until itemCountone
if itemCountone >= 1 and itemCountone ~= nil then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Sell"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("Repeat"));
end
</waypoint>Code: Select all
occupiedSlots, totalSlots = GetBagCount()Thanks, I will give that function a shot.
Re: Will not loot sometimes
Yep, that's what I meant by "set up your waypoint file properly".checkii wrote:you can always tell the bot to go to the merchant once your bag is semi-full.
Actually I could put a condition in the lootBodies() function to only loot if the inventory is not full. That would help too, just in case.
I'm currently working on implementing rent bag pointers so we will know for sure which slots are available. Once I finish that, I'll add this change to lootBodies().
- 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