How to: My bot is not looting !!!

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

How to: My bot is not looting !!!

#1 Post by d003232 » Fri Jul 17, 2009 3:52 pm

That'S a little HowTo for the most common problems of:

My bot is not looting!

At first: What do you mean with 'is not looting'. Pls describe it more detailed:

1. After killing a mob, the bot stands just there for a few seconds and after that runs away to the next mob/waypoint. In the micromacro protocoll windows he writes: 'Looting target.'

2. If I kill two or more mobs in one fight, the bot only loots the last one. In the micromacro protocoll windows he writes: 'Waiting on aggressive enemies.'

3. The Bot runs to the corpse and opens the loot window, but the bot don't take any items from the loot window.

4. If I kill a mob, the bot sometime just stand for a time and after that wander to the next waypoint/mob. In the micromacro protocoll windows he writes: 'Waiting on aggressive enemies'. But there is none other mob attacking me.


Solution for 1:
There are two things you have to check:
1. The ingame key for looting is the same hotkey as the standard attack key. If you press the standard attack key while having a death mob as target the char will run to the mob an loot it. The bot will use the MACRO hotkey to press the 'loot key'. So there should be no problems with that, anymore.
2. And you must have the ingame option 'click to move' turned on.


Solution for 2:
The bot skips looting if you get aggro from another mob before the end of the fight. You can also loot after each fight even if you are in combat. If you want to do so, just set the 'loot in combat option' in your profile:

Code: Select all

<option name="LOOT_IN_COMBAT" value="true" />
Solution for 3:
You have to check the ingame option for 'automatic looting':
Image


Solution for 4:
You are in a group and you are in combat, since one of your group member is attacking a mob. You can set the loot in combat option in your profile:

Code: Select all

<option name="LOOT_IN_COMBAT" value="true" />
or just don't join a group.


Ensure that you have the actual version of micromacro and the bot scripts installed. For a more detailed description about how to configure the bot pls read in the the RoM Bot wiki.
Last edited by d003232 on Tue Jul 28, 2009 5:47 am, edited 1 time in total.
The RoM Bot Online Wiki needs your help!

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Howto: My bot is not looting !!!

#2 Post by Administrator » Fri Jul 17, 2009 4:35 pm

Stickied. Thanks for compiling a guide on this problem that so many people have. We can only hope this cuts down on the number of times this gets asked in the main RoM bot thread.

User avatar
neow1ng
Posts: 6
Joined: Thu Jul 23, 2009 10:08 pm

Re: Howto: My bot is not looting !!!

#3 Post by neow1ng » Thu Jul 23, 2009 10:35 pm

I have a problem with looting......

Sometimes the bot doesn't loot a corpse..... this occurs 20% of the time I'm botting

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Howto: My bot is not looting !!!

#4 Post by d003232 » Thu Jul 23, 2009 11:37 pm

neow1ng wrote:I have a problem with looting......

Sometimes the bot doesn't loot a corpse..... this occurs 20% of the time I'm botting
Try to increase player.lua line 475 from 500 to 800:

Code: Select all

	yrest(500);               -- <<< HERE

	-- Monster is dead (0 HP) but still targeted.
	-- Loot and clear target.
	self:update();
The RoM Bot Online Wiki needs your help!

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: Howto: My bot is not looting !!!

#5 Post by Zilvermoon » Fri Jul 24, 2009 12:31 pm

This might also be coursed by the player:checkSkills() in bot.lua .... I have come across this function doing combat for me which would lead to not looting .... I personallly commented it out as a temp fix ( -- infornt that line )

I also posted about this in the Bot script thread, but think It might have been missed
( http://www.solarstrike.net/phpBB3/viewt ... 4922#p4922 )

Zilvermoon

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Howto: My bot is not looting !!!

#6 Post by d003232 » Fri Jul 24, 2009 12:45 pm

Zilvermoon wrote:This might also be coursed by the player:checkSkills() in bot.lua .... I have come across this function doing combat for me which would lead to not looting .... I
Hmm. The bot should only fight if he has a target. And if the bot get a target, he should normaly not be at that coding place. In my optinion that coding should only cast friendly stuff while running. There should only be a very small chance / time frame to get aggro and get a target by the client while in that coding place.

I will try to watch it and find in which cases it comes to that problem.
The RoM Bot Online Wiki needs your help!

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: Howto: My bot is not looting !!!

#7 Post by Zilvermoon » Fri Jul 24, 2009 1:55 pm

d003232 wrote:
Zilvermoon wrote:This might also be coursed by the player:checkSkills() in bot.lua .... I have come across this function doing combat for me which would lead to not looting .... I
Hmm. The bot should only fight if he has a target. And if the bot get a target, he should normaly not be at that coding place. In my optinion that coding should only cast friendly stuff while running. There should only be a very small chance / time frame to get aggro and get a target by the client while in that coding place.

I will try to watch it and find in which cases it comes to that problem.
I did a lot of tessting ... several hours of testing creating a lot of debug messages ... until I notised that my bot simply was incombat without even reaching player:fight() .... it might have been something I with the waypoints but I could re-create it more than 20 times in a couple of hours...

The original way I notised it was, I would kill the enemy with 3 skill's and it would just go to next waypoint ( no msg about enemy dead/lost )

Zilvermoon

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Howto: My bot is not looting !!!

#8 Post by Administrator » Fri Jul 24, 2009 4:37 pm

Zilvermoon wrote: The original way I notised it was, I would kill the enemy with 3 skill's and it would just go to next waypoint ( no msg about enemy dead/lost )

Zilvermoon
I can't see any logical reason for this in the code. Did it mention that you entered combat? You're using an addon to help with skills, right?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Howto: My bot is not looting !!!

#9 Post by d003232 » Fri Jul 24, 2009 6:08 pm

I suppose the reason for some of that skips is here in player.lua:

Code: Select all

		if( settings.profile.options.LOOT == true and target.HP <= 0 ) then
-- client bug: sometimes the target is death but still have HP, thats one reason 
-- why we skip sometimes looting
			if( settings.profile.options.LOOT_IN_COMBAT == true ) then
				self:loot();
			else
				if( not self.Battling ) then
					-- Skip looting when under attack
					self:loot();
				end
			end
		end
It's the bug with death mobs that still have HP. I would suggest to show the HPs of the target mob also in the MM window to make the reason more clear for everyone ... or the delete the HP check? I don't remember what the reason was for that? In whitch situation would we try to loot living mobs?
The RoM Bot Online Wiki needs your help!

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: Howto: My bot is not looting !!!

#10 Post by Zilvermoon » Fri Jul 24, 2009 6:11 pm

Administrator wrote:
Zilvermoon wrote: The original way I notised it was, I would kill the enemy with 3 skill's and it would just go to next waypoint ( no msg about enemy dead/lost )

Zilvermoon
I can't see any logical reason for this in the code. Did it mention that you entered combat? You're using an addon to help with skills, right?
sorry for the w8, was ingame ... no it didn't say I entered combat, which is my point ... and since I got a top-tuned char I can kill most non-elites with 3 blows (3 skill's fired) ... and no I don't use any AddOn's that help with the skill's ... if you want me to create a screenshot of what happens I'll do so ... also this is the code I got in my Waypoints (might be due to that?)

Just a Ex code:

Code: Select all

	<!-- # 2 --><waypoint x="9018" z="1532" type="TRAVEL">
	player:update();
	while(not player.Battling) do
		player:update();
		if( not player.Battling ) then
			if ( player.HP == player.MaxHP ) then
				yrest(5000);
				return;
			end
			yrest(300);
		elseif( player.Battling ) then
			return;
		end
	end
	</waypoint>
Zilvermoon

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Howto: My bot is not looting !!!

#11 Post by d003232 » Fri Jul 24, 2009 6:14 pm

Zilvermoon wrote:sorry for the w8, was ingame ... no it didn't say I entered combat, which is my point ... and since I got a top-tuned char I can kill most non-elites with 3 blows
Yes that's it. I recognize the bug with the HP happens when we kill the mob very fast with big hits.
The RoM Bot Online Wiki needs your help!

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: Howto: My bot is not looting !!!

#12 Post by Zilvermoon » Fri Jul 24, 2009 6:32 pm

I'm going to try to re-create the bug again ... I got 100% SVN copy and I'll leave a screenshot and all the information in this post once I'm done...

Here is all the information I can give .... took me less than 5 min to re-create it .... it's the main reason my bot skip looting, it simply doesn't get into combat.

The waypoint's code

Code: Select all

	<!-- #10 --><waypoint x="8870" z="1426" type="TRAVEL">
	yrest(1000);
	</waypoint>
	<!-- #11 --><waypoint x="8798" z="1421" type="TRAVEL">
	yrest(1000);
	</waypoint>
	<!-- #12 --><waypoint x="8762" z="1472" type="TRAVEL">
	player:update();
	while(not player.Battling) do
		player:update();
		if( not player.Battling ) then
			if ( player.HP == player.MaxHP ) then
				yrest(5000);
				return;
			end
			yrest(300);
		elseif( player.Battling ) then
			return;
		end
	end
	</waypoint>
Forgot to include my profile, to make sure we are on the same page:

Code: Select all

<profile>
	<options>
		<option name="HP_LOW" value="90" />
		<option name="MP_LOW_POTION" value="65" />
		<option name="HP_LOW_POTION" value="65" />

		<option name="COMBAT_TYPE" value="melee" />
		<option name="COMBAT_DISTANCE" value="145" />

		<option name="ANTI_KS" value="true" />
		<option name="WAYPOINTS" value="Lamud.xml" />
		<option name="RETURNPATH" value="" />
		<option name="PATH_TYPE" value="waypoints" />
		<option name="WANDER_RADIUS" value="400" />
		<option name="WAYPOINT_DEVIATION" value="20" />
		<option name="LOOT" value="true" />
		<option name="LOOT_TIME" value="1500" />
		<option name="LOOT_IN_COMBAT" value="true" />
		<option name="LOOT_DISTANCE" value="220" />

		<option name="POTION_COOLDOWN" value="20" />
		<option name="MAX_FIGHT_TIME" value="15" />
		<option name="DOT_PERCENT" value="1" />

		<option name="LOGOUT_TIME" value="120" />
		<option name="LOGOUT_SHUTDOWN" value="true" />

		<!-- attack monsters 10 levels above or below your level -->
		<option name="TARGET_LEVELDIF_BELOW" value="10" />
		<option name="TARGET_LEVELDIF_ABOVE" value="10" />

		<option name="QUICK_TURN" value="true" />
	</options>

	<friends>
		<friend name="Berhu" />
		<friend name="Bazzuer" />
	</friends>

	<hotkeys>
		<hotkey name="HP_POTION" key="VK_MINUS" />
		<hotkey name="MP_POTION" key="VK_EQUAL" />
		<hotkey name="ATTACK" key="VK_1" />
		<hotkey name="RES_MACRO" key="VK_0" />
		<hotkey name="LOGOUT_MACRO" key="VK_0" />
	</hotkeys>

	<skills>
		<skill name="ROGUE_SHADOWSTAB" level="38" hotkey="VK_2" />
		<skill name="PRIEST_REGENERATE" level="38" priority="120" hotkey="VK_9" hpper="90" />
		<skill name="ROGUE_LOW_BLOW" level="35" hotkey="VK_3" />
		<skill name="ROGUE_WOUND_ATTACK" level="35" hotkey="VK_4" />
		<skill name="ROGUE_BLIND_STAB" level="35" hotkey="VK_5" />
		<skill name="ROGUE_QUICKNESS_AURA" level="35" hotkey="VK_6" />
		<skill name="ROGUE_ASSASSINS_RAGE" hotkey="VK_8" inbattle="true"/>
	</skills>

	<onDeath>
		-- Additional Lua code to execute on death
		pauseOnDeath(); -- Stop the script
	</onDeath>

	<onLeaveCombat>
		-- Additional Lua code to execute after killing an enemy
	</onLeaveCombat>

	<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.
	</onSkillCast>
</profile>
Zilvermoon
Attachments
RoM_Bot_Log.jpeg
Last edited by Zilvermoon on Fri Jul 24, 2009 7:12 pm, edited 3 times in total.

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Howto: My bot is not looting !!!

#13 Post by Administrator » Fri Jul 24, 2009 6:47 pm

d003232 wrote:I suppose the reason for some of that skips is here in player.lua:It's the bug with death mobs that still have HP. I would suggest to show the HPs of the target mob also in the MM window to make the reason more clear for everyone ... or the delete the HP check? I don't remember what the reason was for that? In whitch situation would we try to loot living mobs?
When you get stuck with a target, it breaks out of the combat system and could loot. I suppose you could also set self.Fighting to false then return, as well. Might fix this.

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: Howto: My bot is not looting !!!

#14 Post by Zilvermoon » Fri Jul 24, 2009 7:06 pm

Administrator wrote:
d003232 wrote:I suppose the reason for some of that skips is here in player.lua:It's the bug with death mobs that still have HP. I would suggest to show the HPs of the target mob also in the MM window to make the reason more clear for everyone ... or the delete the HP check? I don't remember what the reason was for that? In whitch situation would we try to loot living mobs?
When you get stuck with a target, it breaks out of the combat system and could loot. I suppose you could also set self.Fighting to false then return, as well. Might fix this.
You got mail ^^ :)

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: Howto: My bot is not looting !!!

#15 Post by d003232 » Fri Jul 24, 2009 7:37 pm

Administrator wrote:When you get stuck with a target, it breaks out of the combat system and could loot. I suppose you could also set self.Fighting to false then return, as well. Might fix this.
IMHO there should be at least a 'clear target' after that. So there would be no target to loot.

I would rather suggest to use a 'skip loot' flag. That would be reseted at the begin of the fight and and could be flagged at different situtations. And of course would be check at the loot function. I think that's uncomplex and easy understandable if someone other try to read and understand the coding.
The RoM Bot Online Wiki needs your help!

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Howto: My bot is not looting !!!

#16 Post by Administrator » Fri Jul 24, 2009 8:05 pm

Good call. Rev 90 will clear target on stuck, and I removed the HP check.

User avatar
neow1ng
Posts: 6
Joined: Thu Jul 23, 2009 10:08 pm

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

#17 Post by neow1ng » Mon Sep 14, 2009 12:38 am

i got a new problem.....
I'm using the updated code where you put a dummy macro on a key.

it occurs when you killed a mob but you got a root debuff (like stun).

it shows a warning that the target was not looted and i should assign a hotkey to MACRO.

it then skips looting and continues to next waypoint/target

i hope you can remedy this asap :-)

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

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

#18 Post by d003232 » Mon Sep 14, 2009 1:55 am

neow1ng wrote:i got a new problem.....
I'm using the updated code where you put a dummy macro on a key.

it occurs when you killed a mob but you got a root debuff (like stun).

it shows a warning that the target was not looted and i should assign a hotkey to MACRO.

it then skips looting and continues to next waypoint/target

i hope you can remedy this asap :-)
Ok. That's a design issue. We don't read 'debuffs' (at least at the moment). So we don't wait. We start looting immediately and if we don't get the loot in the calculated time, then we skip that target looting (and we gave a wrong hint). It' a good information to now, that this is happening and we will not change it in the next time. :oops:
The RoM Bot Online Wiki needs your help!

User avatar
neow1ng
Posts: 6
Joined: Thu Jul 23, 2009 10:08 pm

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

#19 Post by neow1ng » Mon Sep 14, 2009 3:30 am

d003232 wrote:Ok. That's a design issue. We don't read 'debuffs' (at least at the moment). So we don't wait. We start looting immediately and if we don't get the loot in the calculated time, then we skip that target looting (and we gave a wrong hint). It' a good information to now, that this is happening and we will not change it in the next time. :oops:
does the bot press the macro button only once then waits until the calculated time or does it press it multiple times during the said time?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

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

#20 Post by d003232 » Mon Sep 14, 2009 3:34 am

neow1ng wrote:
d003232 wrote:Ok. That's a design issue. We don't read 'debuffs' (at least at the moment). So we don't wait. We start looting immediately and if we don't get the loot in the calculated time, then we skip that target looting (and we gave a wrong hint). It' a good information to now, that this is happening and we will not change it in the next time. :oops:
does the bot press the macro button only once then waits until the calculated time or does it press it multiple times during the said time?
Only once. see player.lua 761

Code: Select all

	-- "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(settings.profile.options.LOOT_TIME + dist*15); -- dist*15 = rough calculation of how long it takes to walk there

	-- check for loot problems to give a noob mesassage
	self:update();
	if( self.X == hf_x  and	-- we didn't move, seems attack key is not defined
	    self.Z == hf_z  and
	    dist > 25 )  then
		cprintf(cli.yellow, language[100], -- We didn't move to the loot!? 
		hf_attack_key );	
	end;
I suppose there could be done something with press it multiple and prolong the waiting time if we start to move.
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

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