Rock5's lootBodies function

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Rock5's lootBodies function

#1 Post by rock5 » Sun Jan 09, 2011 9:02 pm

*** As of revision 597, this function has been incorporated into the bot so this userfunction is obsolete. Please do not use. ***
*** You can read about how to use the profile setting to loot all here under the "Looting" section. ***
*** This file will remain for awhile incase there are people who want to continue using an older version of the bot. ***

______________________________________________________________________________________________

Here is an updated version of my lootbodies function.

Description

When called tries to loot all lootable bodies in range.


Installation

Add the file to the "Userfunctions" folder.

Add the command

Code: Select all

lootBodies()
to the <onLeaveCombat> section of your profile.

You may want to also disable loot in combat as it is no longer necessary.

Code: Select all

<option name="LOOT_IN_COMBAT"		value="false" />
Features
  • Only loots out of combat.
  • Only loots bodies in range as set by 'LOOT_DISTANCE' in profile.
  • Doesn't loot if inventory is full.
  • Doesn't wait for the battle flag to clear so it loots faster.
  • Remembers last 10 bodies it couldn't loot in an ignore list.
  • With all the checks, this version should never 'get stuck' trying to loot.
Attachments
addon_lootbodies.lua
Version 1.1
(2.09 KiB) Downloaded 734 times
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Rock5's lootBodies function

#2 Post by jduartedj » Sun Jan 09, 2011 9:13 pm

You wrote:Installation

Add the file to the "Userfunctions" folder.
What file? xD

You probably should include the file!

Also you could add lootbodies to the wiki addon repository....

Take care
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#3 Post by rock5 » Sun Jan 09, 2011 9:57 pm

I wanted to create the thread first so I could add the link to the file but i just got a little sidetracked. I'm adding it now, and don't worry I will add it to the repository.
  • 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

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's lootBodies function

#4 Post by miximixi007 » Mon Jan 10, 2011 11:39 pm

great :D

checkii
Posts: 50
Joined: Sat Oct 09, 2010 8:50 pm

Re: Rock5's lootBodies function

#5 Post by checkii » Sat Jan 15, 2011 2:20 pm

Thank Rock55, this is one of the most awesome add-on.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#6 Post by rock5 » Sat Jan 15, 2011 7:03 pm

This is a message to everyone who uses this addon.

I'd like to know if anyone ever has any issues with this version, such as getting stuck trying to loot or repetitively trying to re-loot the same body or any other strange behavior, as I personally think there is no reason why we couldn't add this to the bot.
  • 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

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's lootBodies function

#7 Post by miximixi007 » Mon Jan 17, 2011 12:23 am

miss loot sometime. if try to loot again would be better.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#8 Post by rock5 » Mon Jan 17, 2011 5:38 am

miximixi007 wrote:miss loot sometime. if try to loot again would be better.
Why does it miss looting? What happens?

You could always use the profile option LOOT_AGAIN = 1000 to try again after 1 second.
  • 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

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's lootBodies function

#9 Post by miximixi007 » Mon Jan 17, 2011 1:30 pm

I'll try it.

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's lootBodies function

#10 Post by miximixi007 » Tue Jan 18, 2011 9:07 pm

I saw the default value is 2000, should I change it from 2000 to 1000?
It seems didn't try to loot after kill mods sometimes.
and sometimes, new mod attack me when loot bodies, character will kill the mod and move to next waypoint.
and sometimes, if the body have five items, char pick up 4 items.
sry for my bad English

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#11 Post by rock5 » Wed Jan 19, 2011 12:31 pm

miximixi007 wrote:I saw the default value is 2000, should I change it from 2000 to 1000?
You're right, 2000 is the default. I don't think changing it will make any difference.
miximixi007 wrote:It seems didn't try to loot after kill mods sometimes.
This could be anything. It always seems to loot for me.
miximixi007 wrote:and sometimes, new mod attack me when loot bodies, character will kill the mod and move to next waypoint.
When using lootBodies it shouldn't ignore the lootable body just because you were attacked. The only time it should ignore it is if you failed to loot it for whatever reason. Then it would get added to the ignore list and wont be looted.

If you don't have lootbodies installed properly and you have the profile setting "LOOT_IN_COMBAT" set to false then that is how it would behave. It would stop looting if attacked then not loot that body again. Maybe you have to check that lootBodies is installed properly.
miximixi007 wrote:and sometimes, if the body have five items, char pick up 4 items.
sry for my bad English
RoMBot doesn't in any way control what you pick up. That is controlled by your ingame loot filter addon. You might also not pick up an item if you already have the maximum in your inventory. They're the only reasons I can think of right now.
  • 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

checkii
Posts: 50
Joined: Sat Oct 09, 2010 8:50 pm

Re: Rock5's lootBodies function

#12 Post by checkii » Tue Jan 25, 2011 2:08 am

I use to have some looting problems, but after I updated to the latest revision it worked fine again.

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Rock5's lootBodies function

#13 Post by miximixi007 » Wed Jan 26, 2011 5:27 am

rock5 wrote:If you don't have lootbodies installed properly and you have the profile setting "LOOT_IN_COMBAT" set to false then that is how it would behave. It would stop looting if attacked then not loot that body again. Maybe you have to check that lootBodies is installed properly.
yes. i set LOOT_IN_COMBAT to false. i change it to true now.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#14 Post by rock5 » Sat Apr 16, 2011 5:20 am

I've started work to incorporate lootbodies into the bot.

So far I've added an option to the profile "LOOT_ALL". If it's enabled it will look for dead mobs to loot when leaving combat. That's pretty much the way lootBodies() works now when added to onLeaveCombat.

But I'm thinking, shouldn't the loot all function be looking for bodies to loot all the time? Or just after combat?

What do you think?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's lootBodies function

#15 Post by lisa » Sat Apr 16, 2011 11:12 pm

Maybe have both LOOT_ALL and LOOT_IN_COMBAT.

LOOT_IN_COMBAT decides if you loot during combat or just after leaving combat.
LOOT_ALL decides if you use the loot bodies function or just loot 1 at a time
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#16 Post by rock5 » Sun Apr 17, 2011 3:16 am

I should have mentioned that I concider the "loot the mob you just killed and still have targeted" as different to the lootall function which searches for other bodies to loot. I wont mess with the original loot so LOOT_IN_COMBAT will work as it did before. I should also mention that lootall wont loot in combat. Just had another idea, I should add a check to see if you're mounted.

What I was asking was should it only do a lootall after combat or should it look for bodies to loot even when it's moving to a waypoint?

In the first case I can just put the lootall at the end of the fight function, just after the initial loot.

In the second case I would have to put it in the main loop or in the moveto function, I'm not sure yet where would be best.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's lootBodies function

#17 Post by lisa » Sun Apr 17, 2011 8:20 am

So you mean loot a corpse someone else has killed? Not sure I'd bother, if they left anything behind it is probably junk.

If you mean loot ones that have been aoe's down so you didn't actually target them, then yes that sounds good.
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#18 Post by rock5 » Sun Apr 17, 2011 8:26 am

In that case it would have to be after combat only. Although different people want different things so sometimes people might leave behind stuff that you want. But you make a good point and it's a good reason to stick to after combat only.

I'll see if I can put the final touches on it tomorrow and commit it.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's lootBodies function

#19 Post by rock5 » Mon Apr 18, 2011 9:17 am

I've added 'loot all' profile options to the bot in rev 597. It functions similarly to my lootBodies() userfunction.

To use, set LOOT_ALL to true in the profile options.

Code: Select all

<option name="LOOT_ALL"				value="true" />
Things to note when using the loot all option:
  • It doesn't affect the functioning of the initial loot of the mob you just killed.
  • It only looks for bodies to loot after combat and after the initial loot of the mob you just killed.
  • It doesn't loot while battling. If "LOOT_IN_COMBAT" is enabled, it will only loot the mob you just killed in combat, no others.
  • If it fails to loot a mob for whatever reason, it will be added to an ignore list and it wont try to loot it again.
  • The default length of the ignore list is 10. If you want to change it you can use the profile option LOOT_IGNORE_LIST_SIZE.
  • Like the findEnemy function, the lootAll function wont collect loot from mobs whos distance from your waypoint path is more than MAX_TARGET_DIST. So you wont be led away from your path with a string of dead bodies.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's lootBodies function

#20 Post by lisa » Mon Apr 18, 2011 7:44 pm

sounds good, I'll give it a try today as I am hitting up some instances, aoe style ;)
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 14 guests