Page 2 of 3

Re: How to: My bot is not looting !!!

Posted: Mon Sep 14, 2009 3:53 am
by neow1ng

Code: Select all

local hf_attack_key;
   if( settings.profile.hotkeys.MACRO ) then
      hf_attack_key = "MACRO";
      cprintf(cli.green, language[31], 
         hf_attack_key , dist);   -- looting target.
      RoMScript("UseSkill(1,1);");
   else
      hf_attack_key = getKeyName(settings.profile.hotkeys.ATTACK.key);
      cprintf(cli.green, language[31], 
         hf_attack_key , dist);   -- looting target.
      keyboardPress(settings.profile.hotkeys.ATTACK.key);
   end
then how about you put this block on a loop that executes per second for like 2-3 times?

Re: How to: My bot is not looting !!!

Posted: Mon Sep 14, 2009 4:41 am
by neow1ng

Code: Select all

for i = 1, 3, 1 do
        -- "attack" is also the hotkey to loot, strangely.
		local hf_attack_key;
		if( settings.profile.hotkeys.MACRO ) then
			hf_attack_key = "MACRO";
			cprintf(cli.green, language[31], 
			   hf_attack_key , dist);	-- looting target.
			RoMScript("UseSkill(1,1);");
		else
			hf_attack_key = getKeyName(settings.profile.hotkeys.ATTACK.key);
			cprintf(cli.green, language[31], 
			   hf_attack_key , dist);	-- looting target.
			keyboardPress(settings.profile.hotkeys.ATTACK.key);
		end
		yrest(900);
    end
this is what i did to "fix" the issue

EDIT: code instead of quote tag (d003232)

Re: How to: My bot is not looting !!!

Posted: Mon Sep 14, 2009 4:48 am
by d003232
neow1ng wrote:this is what i did to "fix" the issue
thx for your suggestion. I will look for that and put it to the standard. Could be take a view days.

Re: How to: My bot is not looting !!!

Posted: Mon Oct 26, 2009 5:41 am
by j1234567890
Here are my loot settings and I have never missed a monster drop:
<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_IN_COMBAT" value="true" />
<option name="LOOT_DISTANCE" value="250" />
<option name="LOOT_PAUSE_AFTER" value="0" />

Re: How to: My bot is not looting !!!

Posted: Wed Jan 27, 2010 3:20 pm
by ginnidorka
Hello,
I think I remember seeing commands for loot options such as looting items over certain durabilities and also looting stats over some stat value. However, even after extensive searching I could not find that post. Could you direct me to that post or recommend an addon for example that could accomplish that function.
Thanks.

Re: How to: My bot is not looting !!!

Posted: Wed Jan 27, 2010 4:14 pm
by Administrator
ginnidorka wrote:Hello,
I think I remember seeing commands for loot options such as looting items over certain durabilities and also looting stats over some stat value. However, even after extensive searching I could not find that post. Could you direct me to that post or recommend an addon for example that could accomplish that function.
Thanks.
Use a looting addon.

Re: How to: My bot is not looting !!!

Posted: Wed Jan 27, 2010 8:04 pm
by ginnidorka
Could you recommend any good addons that let you filter out good dura items as well as stats? I have found an addon called "Better Loot Mod" but if there is a better one please do advise. Also I noticed that you could filter out mods and dura's when you are selling items. Therefore I see a possibility of incorporating the function into the looting mechanism.
Thank you.

Re: How to: My bot is not looting !!!

Posted: Sat Apr 10, 2010 10:46 am
by rock5
I've been having problems not looting Muddy Wheezers because of stun. If I become stunned after killing the Wheezer I never loot after recovering from the stun.

I tried changing these values in settings with no effect;

Code: Select all

			LOOT_TIME = 2000,
			LOOT_AGAIN = 2000,				-- second loot try if rooted after x ms
It seems the bot never tries to loot again.

I had a look at the loot again code.

Code: Select all

	-- check for loot problems to give a noob mesassage
	self:update();
	target = self:getTarget();
	if( self.X == hf_x  and	-- we didn't move, seems attack key is not defined
	    self.Z == hf_z  and
	    dist > 25 and
	    ( target ~= nil or target.Address ~= 0 ) )  then	-- death mob disapeared?
		cprintf(cli.green, language[100]); -- We didn't move to the loot!?

		-- second loot try?
		if( type(settings.profile.options.LOOT_AGAIN) == "number" and settings.profile.options.LOOT_AGAIN > 0 ) then
			yrest(settings.profile.options.LOOT_AGAIN);
			looten();	-- try it again
		end

	end;
And noticed the dist > 25 condition. The Muddy Wheezers are usually closer than 25 when they die. That's why it never tries to loot again.

I tried commenting out that line and it worked perfectly.

So the question is, why don't you want it to try looting a second time if the dead mob is closer than 25?

Re: How to: My bot is not looting !!!

Posted: Sat Apr 10, 2010 5:50 pm
by Administrator
Honestly, I don't really know. I didn't add that. I'll remove it though and it'll be in the next commit.

Re: How to: My bot is not looting !!!

Posted: Mon May 03, 2010 9:32 am
by d003232
Administrator wrote:Honestly, I don't really know. I didn't add that. I'll remove it though and it'll be in the next commit.
I suppose that if the mob is closer than 25 there is no need to move and it is close enough to loot even if one is rootet. But I have forgotten the exact reason for doing it so. I should have done more comments about that :-(

Re: How to: My bot is not looting !!!

Posted: Thu Jun 23, 2011 5:39 am
by Liberty
Hi guys!

First I wanna thank you for your work.

But I have a problem with looting: Downloaded actual files, installed, made a copy of default profile, made a new char, activated autoloot, click to move and selfbuff.

The mage casts MAGE_FLAME correctly but he does not loot.

The bot tells me that he presses 3 until enemy is killed and after that he is clearing target [33], not looting target [31].

When I manually press 1, he is looting. Tried profile 11-10 number 3 and bears (number 6).

Also tried with LOOT_ALL ture and false:

<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_ALL" value="true" /> <!-- Loot all nearby dead mobs after combat -->
<option name="LOOT_IN_COMBAT" value="true" />
<option name="LOOT_DISTANCE" value="100" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->

Re: How to: My bot is not looting !!!

Posted: Thu Jun 23, 2011 7:27 am
by rock5
Try making your loot distance a little bit more than your combat distance.

Re: How to: My bot is not looting !!!

Posted: Thu Jun 23, 2011 1:04 pm
by Liberty
Thank you for your fast reply!

Found the fault. After restarting my PC I found a profile l1-10.xml with seems to be used instead of player named .xml file.

So I think it is automatically created when starting the bot with wiki entry rom/bot.lua profile:l1-10.xml this wasn't clear enough for me.

Thank you again and think this won't be my last question :)

PS: really nice bot! Will start learning how to use it very quickly.

Re: How to: My bot is not looting !!!

Posted: Sat Jul 09, 2011 4:26 pm
by omegastar013
thank you for this helpful guide

Re: How to: My bot is not looting !!!

Posted: Thu Dec 01, 2011 5:03 pm
by Supergala
same problem....in miller's ranch chicken character take only quest but don't take bag and ranch item....anyone can help me?

Re: How to: My bot is not looting !!!

Posted: Mon Apr 09, 2012 3:23 pm
by KarlBoltzmann
hi, got some weird problem with looting during botting. though i got "attack" assigned to "key 1" the bot sometimes won't loot, if I press 1 while it is at work the char goes for the loot...
the problem gets solved after a while everytime i assign different actions/casts to "key 1" and then change it back to "attack", it tries to cast those casts, gets stuck and once i changed it back to "attack" the bot loots like it's supposed to.

In case anyone understood my problem, what can i do to avoid this procedure and have the bot loot properly right away...?

Re: How to: My bot is not looting !!!

Posted: Thu Apr 12, 2012 10:52 am
by revolver
Guys when i am in KS i use purgatory fire but the bot doesnt loot every mob.I have activated ''loot all'' , ''loot in distance'' and my loot distance is 600 .I have to say that sometimes it loots them all but that happens 1 time out of 10.Thanks in advance :D

Re: How to: My bot is not looting !!!

Posted: Thu Apr 12, 2012 11:33 am
by rock5
I believe loot distance for "lootall" is also affected by MAX_TARGET_DIST. What do you have that set to? Is it possible mobs are just moving out of range when they die?

Re: How to: My bot is not looting !!!

Posted: Thu Apr 12, 2012 12:14 pm
by revolver
My MAX_TARGET_DIST is 225.The problem is that the mobs surround my bot and it target one mob ,uses purgutory fire and all of them are down.after that it lootsone or two of them and leaves out all the rest

Re: How to: My bot is not looting !!!

Posted: Mon Dec 17, 2012 10:33 am
by BlubBlab
True I had the same problme so I analyzed it.
First idear was maybe the bot dont see them because the memory wasn't read correct.
Secound idear MAX_TARGET_DIST effect or better restrict LOOT_DISTANCE

Both idears where right -.-, so I came up with a solution.

First I have a list of all Lootable targets that will updated with every loot so If I saw a lootable pawn I will not forget it.
Secound new function for loot that is only restricted by LOOT_DISTANCE.

I also deaktivated

Code: Select all

--[[
			-- Wait for character to finish standing
			local starttime = os.clock()
			self:update()
			while self.Stance ~= 0 and 2 > (os.clock() - starttime) do
				yrest(50)
				self:update()
			end
]]--
??? can't understand it and my bot works fine with out this, In fakt he is faster with out it.

In my version you can also repeat the LootAgain in row 370 if you want.

So use it discuss it whatever^^