Looting bot idea.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
Uglich
Posts: 20
Joined: Fri Aug 06, 2010 7:00 pm
Location: Spain

Looting bot idea.

#1 Post by Uglich » Fri May 13, 2011 10:06 am

Hello.
First of all I have to say I don't know how to make this bot.

My idea is to make a bot to loot every dead mob, something like the pet with Magic Perfume (http://www.runesdatabase.com/item/20758 ... gico-1-d-a)

I don't know if this could be posible, because you have to have the bot following your PJ, and at the same time, it needs to be able to move to the death mobs to loot it.

What do you think about this bot idea?
Could it be possible to make?

Thank you.

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

Re: Looting bot idea.

#2 Post by rock5 » Fri May 13, 2011 10:37 am

So you want to make a bot that follows you and loots all dead bodies? Other people have done work on party bots so you could look at them for inspiration.

There is even a heal party bot in the repository.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2002
You could probably use or modify that.

Basically all it needs is a loop that follows and loots, follows and loots etc.

What would make it complex is if you want it to do other things like; assisting you or defending itself.
  • 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
Uglich
Posts: 20
Joined: Fri Aug 06, 2010 7:00 pm
Location: Spain

Re: Looting bot idea.

#3 Post by Uglich » Fri May 13, 2011 4:51 pm

Hello.

I just want the bot to loot mobs and follow me. I'll use it in a low level zone, so the bot pj will be safe.
Tomorrow I'll start to make someting (bad, for sure).
I'll be back with a lot of problems.

Thank you

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Looting bot idea.

#4 Post by lisa » Sat May 14, 2011 12:40 am

I can't remember the function for lootbodies pretty busy atm but if it is lootbodies() then try this as your WP
if it takes to long to loot the bodies and the main bot has moved to far away then it won't be able to follow. You can add a pause after leaving combat on main bots profile if this becomes an issue and it should fix it. Otherwise will need to use the moveto function which should remidy it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad><![CDATA[
	while(true) do
		if (not player.Battling) then 
lootbodies()
RoMScript("FollowUnit('party1');")
	end
]]></onLoad>
</waypoints>

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: Looting bot idea.

#5 Post by rock5 » Sat May 14, 2011 1:05 am

lootBodies was the old userfunction. The in bot function is called "player:lootAll()". Use that instead.
  • 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
Uglich
Posts: 20
Joined: Fri Aug 06, 2010 7:00 pm
Location: Spain

Re: Looting bot idea.

#6 Post by Uglich » Sat May 14, 2011 7:59 am

Hello, I was trying to make it work, but the bot don't loot anything.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>
	while(true) do
		if (not player.Battling) then
			player:lootAll();
			RoMScript("FollowUnit('party1');");
		end;
	end;
	</onLoad>
</waypoints>
Whith this waypoints, it just follows me.

Lisa, this bot is for being used with other character played by me, not other bot, so, if it's too far away it's not a problem.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Looting bot idea.

#7 Post by lisa » Sat May 14, 2011 8:07 am

need to make sure you have LOOT and LOOT_ALL set to true in profile of the bot character, calling that function will also make it check the usual options.

Also should mention it will only check for loot after it leaves combat, so if you keep agroing mobs nonstop then it won't loot.

Could probably try it without the battling check if that is an issue

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>
   while(true) do

         player:lootAll();
         RoMScript("FollowUnit('party1');");
 
   end;
   </onLoad>
</waypoints>
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
Uglich
Posts: 20
Joined: Fri Aug 06, 2010 7:00 pm
Location: Spain

Re: Looting bot idea.

#8 Post by Uglich » Sat May 14, 2011 8:48 am

Hello, this is the looting part of the profile:

Code: Select all

<!-- 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" />		<!-- probability in % for a short rest -->
I think it's ok.

About the code, I've tryed it waiting after the fights, moving near to the dead mob, and still don't move to the lootable mob, and of course don't looting.
I use Lootomatic addon, and "Free for all" in party looting config.

¿Does "player:lootAll()" need some arguments between () ?

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

Re: Looting bot idea.

#9 Post by rock5 » Sat May 14, 2011 9:17 am

Ah, lootAll() checks to see if LOOT_ALL in the profile is set. If you don't have it set, it wont loot all. Try adding

Code: Select all

		<option name="LOOT_ALL"				value="true" />
  • 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
Uglich
Posts: 20
Joined: Fri Aug 06, 2010 7:00 pm
Location: Spain

Re: Looting bot idea.

#10 Post by Uglich » Sat May 14, 2011 9:49 am

Thank you, the bot is working now.
I'll test it for a while, and for sure, will be back with problems.

schwarzepeter
Posts: 26
Joined: Thu Dec 16, 2010 2:02 am

Re: Looting bot idea.

#11 Post by schwarzepeter » Fri Jun 10, 2011 7:26 am

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while(true) do

lootbodies();
RoMScript("FollowUnit('party1');");

end;
</onLoad>
</waypoints>


i have 2 issuse if i enter portal to instance the following partymember get somtimes normal mode at entering instance and if the main main char disaper in portal the folowing partymember stay infront of portal and don enter it

so my question is a way to set instance to mode easy all time ?
and if partymember lost the main char as target it use keypress W to reach the portal

can anyone help me pls?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Looting bot idea.

#12 Post by lisa » Fri Jun 10, 2011 7:48 am

you can make the instance level normal or easy. in game command is

Code: Select all

SetInstanceLevel("easy"); -- normal or easy
bot command is

Code: Select all

RoMScript('SetInstanceLevel("easy");')
If you use Come on In then open up ComeOnIn.lua and find

Code: Select all

		-- Active-Only Events
		if (ComeOnIn.Active==true) then
and add this

Code: Select all

		-- Active-Only Events
		if (ComeOnIn.Active==true) then
			if GetInstanceLevel()~="easy" then
				SetInstanceLevel("easy");
			end;
and that will make it set to easy anytime coi is used.

As for the bit about following.
you could target party1 and if distance is > 500 yards then press forward key.
This would assume you are pointing at the right direction, better would be to send it to coords, you would need to know those coords.
To trouble shoot it even more you could detect your distance to those coords and if < 200 then moveto those coords.

If you do the same instance then you can get the coords for entrance of instance and also a point that moves you into the instance. Then do a check for distance to the first coords and if close then moveto other coords. Shouldn't be hard to do.
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

schwarzepeter
Posts: 26
Joined: Thu Dec 16, 2010 2:02 am

Re: Looting bot idea.

#13 Post by schwarzepeter » Sat Jun 11, 2011 5:48 am

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while(true) do

lootBodies();
RoMScript("FollowUnit('party1');");
player:update();
end
if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 100) then
keyboardHold(key.VK_W); yrest(1000);keyboardRelease(key.W); end;
</onLoad>
</waypoints>
it dosnt work main char enter the instance but it dont use the keypress wat i dit wrong? mainchar is partyleader :?: :?: :?: :(

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Looting bot idea.

#14 Post by lisa » Sat Jun 11, 2011 6:32 am

Code: Select all

while(true) do
lootBodies();
RoMScript("FollowUnit('party1');");
player:update();
end
with that code you won't ever leave the loop.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while(true) do

lootBodies();
RoMScript("FollowUnit('party1');");
player:update();
if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 100) then
keyboardHold(key.VK_W); yrest(1000);keyboardRelease(key.W); end;
end

</onLoad>
</waypoints>
You need to do it differently to succeed in this WP though.

Something like this, you might need to determine partyleader though.

Code: Select all


<onload>
while(true) do
partyleader = GetPartyMemberAddress(1)

repeat
lootBodies();
RoMScript("FollowUnit('party1');");
player:update();
until distance(player.X, player.Z, partyleader.X, partyleader.Z) > 200
keyboardHold(settings.hotkeys.MOVE_FORWARD.key) 
yrest(1000);
keyboardRelease(settings.hotkeys.MOVE_FORWARD.key) 
waitForLoadingScreen(5)
end
</onload>
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

lalaxy
Posts: 46
Joined: Sun Jul 03, 2011 8:21 pm

Re: Looting bot idea.

#15 Post by lalaxy » Mon Jul 04, 2011 9:34 am

Hey!

I have same problem like Uglich before. I need a support bot whos following (it works) and looting mobs...But looting is not working...
I have this waypoint:
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
while(true) do

player:lootAll();
RoMScript("FollowUnit('party1');");

end;
</onLoad>
</waypoints>

I have this profile:
<profile>
<options>
<option name="COMBAT_TYPE" value="ranged" />
<option name="COMBAT_DISTANCE" value="150" />
<option name="ANTI_KS" value="true" />
<option name="WAYPOINTS" value="assi.xml" />
<option name="RETURNPATH" value="assi.xml" />
<option name="PATH_TYPE" value="waypoints" />
<option name="WANDER_RADIUS" value="300" />
<option name="WAYPOINT_DEVIATION" value="5" />
<option name="LOOT" value="true" />
<option name="LOOT_ALL" value="true" />
<option name="LOOT_IN_COMBAT" value="false" />
<option name="LOOT_TIME" value="2000" />
<option name="LOOT_DISTANCE" value="275" />
<option name="ENERGY_STORAGE_1" value="mana" />
<option name="ENERGY_STORAGE_2" value="energy" />
<option name="POTION_COOLDOWN" value="15" />
<option name="MAX_FIGHT_TIME" value="30" />
<option name="DOT_PERCENT" value="90" />
</options>
<friends>
<friend name="Green Frog" />
</friends>
<hotkeys>
<hotkey name="MACRO" key="VK_0" />
</hotkeys>
<skills>



<skill name="MAGE_ELECTRIC_BOLT" hotkey="VK_6" priority="100"/>
-- skill name="MAGE_FIREBALL" hotkey="VK_4" priority="99"/>
-- skill name="MAGE_ESSENCE_OF_MAGIC" hotkey="VK_1" priority="100"/>
-- skill name="MAGE_SILENCE" hotkey="VK_1" priority="100"/>
-- skill name="MAGE_DISCHARGE" hotkey="VK_2" priority="100"/>

</skills>
<onDeath>-- Additional Lua code to execute on death
pauseOnDeath(); -- Stop the script</onDeath>
<onLeaveCombat></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>

...i was in party with assist char, who dont want to loot, and loot settings free for all...and ive killed many mobs with my main char and assistant dont want to loot...
Any idea would be good!
Many thx

lalaxy
Posts: 46
Joined: Sun Jul 03, 2011 8:21 pm

Re: Looting bot idea.

#16 Post by lalaxy » Tue Jul 05, 2011 7:54 pm

while(true) do


player:update();
if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 1000) then
keyboardHold(key.VK_W); yrest(1000);keyboardRelease(key.VK_W); end;
printf("partyleaderrrr : %d \n",partyleader.X)
printf("partyleaderrrr : %d \n",partyleader.Z)
printf("member: %d \n",player.X)
printf("member: %d \n",player.Z)
player:lootAll()
yrest(500);
RoMScript("FollowUnit('party"..partyleaderIndex.."');");
end

Ive found something problem with this...Mybe cause of address changing, but i get to instance , it count wrong or not count the leaders coords...I can attach my output's for example...
Any idea ?

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

Re: Looting bot idea.

#17 Post by rock5 » Tue Jul 05, 2011 9:00 pm

lalaxy wrote:Hey!

I have same problem like Uglich before. I need a support bot whos following (it works) and looting mobs...But looting is not working...
Try adding a player update.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>
   while(true) do
         player:update()
         player:lootAll();
         RoMScript("FollowUnit('party1');");

   end;
   </onLoad>
</waypoints>
  • 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: Looting bot idea.

#18 Post by rock5 » Tue Jul 05, 2011 9:11 pm

lalaxy wrote:Ive found something problem with this...Mybe cause of address changing, but i get to instance , it count wrong or not count the leaders coords...I can attach my output's for example...
Any idea ?
Lalaxy, you have everything happening only if distance is more than 1000 and your are not updating the leader info. Try this. And use [ code] tags in the future please.

Code: Select all

while(true) do
		player:update();
		partyleader:update()
		if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 1000) then
			keyboardHold(key.VK_W); yrest(1000);keyboardRelease(key.VK_W); end;
			printf("partyleaderrrr  : %d \n",partyleader.X)
			printf("partyleaderrrr  : %d \n",partyleader.Z)
			printf("member: %d \n",player.X)
			printf("member: %d \n",player.Z)
			waitForLoadingScreen()
		end
		player:lootAll()
		yrest(500);
		RoMScript("FollowUnit('party"..partyleaderIndex.."');");
end
  • 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

lalaxy
Posts: 46
Joined: Sun Jul 03, 2011 8:21 pm

Re: Looting bot idea.

#19 Post by lalaxy » Tue Jul 05, 2011 9:15 pm

Ive tryed with updating partyleader info too...
Without success...at the address changing it stops counting :S Or sometimeg it will be 0,0

lalaxy
Posts: 46
Joined: Sun Jul 03, 2011 8:21 pm

Re: Looting bot idea.

#20 Post by lalaxy » Tue Jul 05, 2011 9:18 pm

while(true) do

player:update();
partyleader:update();
if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 1000) then
keyboardHold(key.VK_W); yrest(1000);keyboardRelease(key.VK_W); end;
printf("partyleaderrrr : %d \n",partyleader.X)
printf("partyleaderrrr : %d \n",partyleader.Z)
printf("member: %d \n",player.X)
printf("member: %d \n",player.Z)
player:lootAll()
yrest(500);
RoMScript("FollowUnit('party1');");
end

this was the original script, but ive thought *partyleader:update();* its not works....thats why ive missed before...

Counter stops at address changing or go to 0,0...
Ive attached U a screen about the output...
Thx

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests