Page 1 of 1

Only loot certain mobs

Posted: Wed Nov 04, 2009 6:40 am
by starcraftfan87
I was just wondering if there was a code i could use in the profile xml to make it so the bot only loots certain mobs in a list.

Re: Only loot certain mobs

Posted: Wed Nov 04, 2009 6:45 am
by d003232
starcraftfan87 wrote:I was just wondering if there was a code i could use in the profile xml to make it so the bot only loots certain mobs in a list.
You could use the event 'onLeaveCombat'. Check the mobname and do a 'player:clearTarget();' if you don't want to loot them.

Code: Select all

local target = player:getTarget();
if( target.Name~="didadu") then
	player:clearTarget();
	...

Re: Only loot certain mobs

Posted: Wed Nov 04, 2009 7:48 am
by starcraftfan87
cool, thanks for the quick reply. Sorry but I'm a real noob at this where exactly would i put this code.

Re: Only loot certain mobs

Posted: Wed Nov 04, 2009 8:08 am
by d003232
starcraftfan87 wrote:cool, thanks for the quick reply. Sorry but I'm a real noob at this where exactly would i put this code.
Into your profile

Code: Select all

<onLeaveCombat>
	local target = player:getTarget();
	if( target.Name ~= "didadu") then
   		player:clearTarget();
	end
</onLeaveCombat>