RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
Monday
Posts: 7
Joined: Sat Sep 05, 2009 10:31 am

Re: RoM bot

#1781 Post by Monday » Thu Sep 10, 2009 4:48 pm

d003232 wrote:Thats a wrong, incomplete profile. The last part is missing. The <skills_rogue> tag has thereby no closing tag. Pls look at default.xml profile and copy that again.
sorry my fault when i copy/paste dont copy all profile this is the last part:

Code: Select all

</skills_rogue>

	<skills_mage>
			

	<skills_knight>
		
	</skills_knight>

	<skills_runedancer>
	</skills_runedancer>

	<skills_druid>
	</skills_druid>

	<onLoad>
		-- Additional Lua code to execute after loading the profile
		-- and before the bot starts. e.g. You could overwrite profile settings here
		-- like: settings.profile.options.HP_LOW = 80;
	</onLoad>

	<onDeath>
		-- Additional Lua code to execute on death
		
	</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>

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

Re: RoM bot

#1782 Post by d003232 » Thu Sep 10, 2009 5:01 pm

Monday wrote:

Code: Select all

</skills_rogue>

	<skills_mage>
			

	<skills_knight>
Pls use code tags for posting code.

You missed a closing tag for <skills_mage>.
The RoM Bot Online Wiki needs your help!

Monday
Posts: 7
Joined: Sat Sep 05, 2009 10:31 am

Re: RoM bot

#1783 Post by Monday » Thu Sep 10, 2009 7:29 pm

d003232 wrote:
Monday wrote:

Code: Select all

</skills_rogue>

	<skills_mage>
			

	<skills_knight>
Pls use code tags for posting code.

You missed a closing tag for <skills_mage>.

thx alot now is working great :)
just a qustion i dont remeber if is answered yet to anyone,when i dead bot use auto ress macro but then bot go in pause mode,any way to bot dont pause? so i die then ressurect then go hunt again?

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

Re: RoM bot

#1784 Post by d003232 » Fri Sep 11, 2009 1:47 am

Monday wrote:just a qustion i dont remeber if is answered yet to anyone,when i dead bot use auto ress macro but then bot go in pause mode,any way to bot dont pause? so i die then ressurect then go hunt again?
The MM window should say you the reason why to go to pause. Post your MM window content (with code tags ! :-) )
The RoM Bot Online Wiki needs your help!

User avatar
BlackGod
Posts: 53
Joined: Wed Jul 01, 2009 10:05 am

Re: RoM bot

#1785 Post by BlackGod » Fri Sep 11, 2009 7:07 am

d003232 wrote:That looks all fine. A distance < 16 means we reach the wp. If you are so close, your character wouldn't move if you loot a mob in that distance. So that can't be the reason for running into the trees. :-)

I would recommend so walk a little more fare from the trees or just put a waypoint left or right of the tree to avoid it (because you could leave the direct way if you fight against a mob shortly before the tree).
Ok thx for this information...
I try to find an other way... or just "rerecord" my waypoints... ;)
btw: your are mounting/unmounting. Do you check the buff for that? I was thinking about to implement a waypoint type "MOUNT" or "MOUNTRUN" and that would need to check if we are allready on a mount. If you have some code it would be helpful to post that.
No, I got not special code. I'm just using a keypress like this:

Code: Select all

		keyboardPress(key.VK_MINUS);
		printf("Mounting!\n");
		player:rest(5);
And to unmount I'm using a buff... that hint was given by you btw... ;)
Thanks for that!
Could I send u a wp-script to improve it...
I already added u on Skype... :)

Mystikal
Posts: 8
Joined: Sun Sep 06, 2009 8:38 am

Re: RoM bot

#1786 Post by Mystikal » Sat Sep 12, 2009 8:59 pm

I was testing the new "mouseclick" option when running 'createpath.lua'

Once saved i tried to run it with 'bot.lua' but it gave an error.

I went to check and opened the "waypoint".xml
waypoint.xml wrote: <waypoints>
<!-- # 1 --><waypoint x="4344" z="7102"></waypoint>

player:mouseclickL(682, 345, 1280, 960);
</waypoint>
<!-- # 3 --><waypoint x="4292" z="7074"></waypoint>
<!-- # 4 --><waypoint x="4315" z="6932"></waypoint>
<!-- # 5 --><waypoint x="4237" z="6889"></waypoint>
<!-- # 6 --><waypoint x="4216" z="6817"></waypoint>
...
Is the </waypoint> after the mouseclick function line suposed to be there?

:D Keep up the good work

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: RoM bot

#1787 Post by GurdyMan » Sat Sep 12, 2009 10:24 pm

Mystikal wrote:I was testing the new "mouseclick" option when running 'createpath.lua'

Once saved i tried to run it with 'bot.lua' but it gave an error.

I went to check and opened the "waypoint".xml
waypoint.xml wrote: <waypoints>
<!-- # 1 --><waypoint x="4344" z="7102"></waypoint>

player:mouseclickL(682, 345, 1280, 960);
</waypoint>
<!-- # 3 --><waypoint x="4292" z="7074"></waypoint>
<!-- # 4 --><waypoint x="4315" z="6932"></waypoint>
<!-- # 5 --><waypoint x="4237" z="6889"></waypoint>
<!-- # 6 --><waypoint x="4216" z="6817"></waypoint>
...
Is the </waypoint> after the mouseclick function line suposed to be there?

:D Keep up the good work

Got it.

Code: Select all

	for i,v in pairs(list) do
		
		
		-- close open waypoint tag if new waypoint come
--		if( tag_open  and 
--		    (v.wp_type == "HP"  or 
--		     v.wp_type == "WP"  or
--		     v.wp_type == "MER" or
--		     v.wp_type == "NPC" )  ) then 
	--	    hf_line = "\n\t</waypoint>\n";
--		    tag_open = false;
--		else
			hf_line = "";
	--	end
		
				
		local wp_string = "\t<!-- #%3d --><waypoint x=\"%d\" z=\"%d\"%s>%s";
		if( v.wp_type == "HP" ) then 		-- it's a harvest point?
		  if i ~= 1 then --Don't end tag the first line.
		    hf_line = hf_line .."</waypoint>\n";
		  end
			hf_line = hf_line ..sprintf(wp_string, i, v.X, v.Z, 
			   p_hp_type,					-- insert type=TRAVEL for harvest points if you want
			   p_harvest_command);			-- then insert harvest command
		elseif( v.wp_type == "WP" ) then
		   if i ~= 1 then --Don't end tag the first time.
		    hf_line = hf_line .."</waypoint>\n";
		   end
			hf_line = hf_line..sprintf(wp_string, i, v.X, v.Z, 
			   p_wp_type,					-- insert type=TRAVEL for waypoints if you want
			   "");							-- no command
		elseif( v.wp_type == "MER" ) then	-- target merchant
			hf_line = hf_line ..sprintf(wp_string, i, v.X, v.Z, 
			   p_wp_type,					-- insert type=TRAVEL for waypoints if you want
			   "\n\t\t"..sprintf(p_merchant_command, v.npc_name) );			-- merchant command
	--		tag_open = true;
		elseif( v.wp_type == "NPC" ) then
			hf_line = hf_line ..sprintf(wp_string, i, v.X, v.Z, 
			   p_wp_type,					-- insert type=TRAVEL for waypoints if you want
			   "\n\t\t"..sprintf(p_targetNPC_command, v.npc_name) );			-- merchant command
	--		tag_open = true;
		elseif( v.wp_type == "CO" ) then	-- choice option 
			hf_line  = hf_line .."\n\t\t"..sprintf(p_choiceOption_command, v.co_num); -- ChoiceOption()
	--		tag_open = true;
		elseif( v.wp_type == "MC" ) then
			hf_line  = hf_line .."\n\t\t"..sprintf(p_mouseClickL_command, v.mx, v.my, v.wide, v.high); -- player:MouseClickL(%d,%d);
	--		tag_open = true;
		end;							

		file:write(hf_line);
	end
	
--	if( tag_open ) then 
		file:write("\n\t</gahwaypoint>\n</waypoints>\n");
--	else
--		file:write("</waypoints>\n");
--	end
Attachments
createpath.lua
for unified diff
(10.17 KiB) Downloaded 118 times

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

Re: RoM bot

#1788 Post by Administrator » Sat Sep 12, 2009 11:57 pm

There was problems with those modifications as well. I rewrote that whole section just now, and I hope it should be fixed as of r246.

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1789 Post by x_art » Sun Sep 13, 2009 10:40 am

How to disable indexing of the bag on launch, but allow the bot to use potions? Because this process takes too much time. Indexing of 25 slots takes about 10-15 secs. The "old style" potions usage (through hotkeys) is better for me in all cases.

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

Re: RoM bot

#1790 Post by Administrator » Sun Sep 13, 2009 11:30 am

x_art wrote:How to disable indexing of the bag on launch, but allow the bot to use potions? Because this process takes too much time. Indexing of 25 slots takes about 10-15 secs. The "old style" potions usage (through hotkeys) is better for me in all cases.
Not at this time. If it really takes that long, you must have a really slow computer or mis-configured something. It takes about 3 seconds for me.

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1791 Post by x_art » Sun Sep 13, 2009 1:17 pm

Administrator wrote:
x_art wrote:How to disable indexing of the bag on launch, but allow the bot to use potions? Because this process takes too much time. Indexing of 25 slots takes about 10-15 secs. The "old style" potions usage (through hotkeys) is better for me in all cases.
Not at this time. If it really takes that long, you must have a really slow computer or mis-configured something. It takes about 3 seconds for me.
I can't say that me computer is slow (4 GHz dual core, 6 Gb RAM). I'm playing in windowed mode and it takes additional system resources. So I see in the window how the bot "press" the macro slot. The indexing process is more slower if the window in background. And because the bot usually start and works in background, then this delay annoys me :).

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

Re: RoM bot

#1792 Post by Administrator » Sun Sep 13, 2009 1:46 pm

x_art wrote:I can't say that me computer is slow (4 GHz dual core, 6 Gb RAM). I'm playing in windowed mode and it takes additional system resources. So I see in the window how the bot "press" the macro slot. The indexing process is more slower if the window in background. And because the bot usually start and works in background, then this delay annoys me :).
I think I just had an idea of what might be causing this for you... A change in the beta 7 (not released to everyone yet -- mostly just for developers and testing) made keypresses instantaneous for attached mode rather than the ~100ms delay in beta 6. Try this:

Code: Select all

keyboardSetDelay(0);
Place it in bot.lua, directly above the attach() call on line 71. That's only a cheap workaround, but it should let us know if this is the cause or not.

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

Re: RoM bot

#1793 Post by d003232 » Sun Sep 13, 2009 2:05 pm

x_art wrote:How to disable indexing of the bag on launch, but allow the bot to use potions? Because this process takes too much time. Indexing of 25 slots takes about 10-15 secs. The "old style" potions usage (through hotkeys) is better for me in all cases.
Perhaps that would help: Place your potions in one of the first slots in the first backpack. Then insert the option:

Code: Select all

<option name="INV_MAX_SLOTS"	value="60" />
into your profile. Instead of scanning all places from 1 to 60, your could reduce to only a few from the first slots. Just so, that your protions are included (e.g. instead of the value 60, reduce it to 6).
The RoM Bot Online Wiki needs your help!

GurdyMan
Posts: 34
Joined: Fri Sep 11, 2009 5:34 pm

Re: RoM bot

#1794 Post by GurdyMan » Sun Sep 13, 2009 2:33 pm

d003232 wrote:
x_art wrote:How to disable indexing of the bag on launch, but allow the bot to use potions? Because this process takes too much time. Indexing of 25 slots takes about 10-15 secs. The "old style" potions usage (through hotkeys) is better for me in all cases.
Perhaps that would help: Place your potions in one of the first slots in the first backpack. Then insert the option:

Code: Select all

<option name="INV_MAX_SLOTS"	value="60" />
into your profile. Instead of scanning all places from 1 to 60, your could reduce to only a few from the first slots. Just so, that your protions are included (e.g. instead of the value 60, reduce it to 6).
I've also had this problem and with a i7 quad core it's not my computer. Potions are always in the first 5 slots so I did a

Code: Select all

<option name="INV_MAX_SLOTS"	value="10" />
and and the "keyboardSetDelay(0);" and it sped up on both accounts. It takes < 2 seconds now.

I noticed something else though along these lines. The last two times I died was because the bot tried using Barbarian Herbs when I didn't have any. I don't buy these so I only get 1 or two off a corpse every now and then, but once the bot saw them it refused to use anything else.

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

Re: RoM bot

#1795 Post by d003232 » Sun Sep 13, 2009 2:38 pm

GurdyMan wrote:I noticed something else though along these lines. The last two times I died was because the bot tried using Barbarian Herbs when I didn't have any. I don't buy these so I only get 1 or two off a corpse every now and then, but once the bot saw them it refused to use anything else.
I suppose there is an bug (see also here). Needs a little time more to look for that. sry.
The RoM Bot Online Wiki needs your help!

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1796 Post by x_art » Mon Sep 14, 2009 12:27 am

Administrator wrote:

Code: Select all

keyboardSetDelay(0);
Place it in bot.lua, directly above the attach() call on line 71. That's only a cheap workaround, but it should let us know if this is the cause or not.
Unfortunately, it didn't help. I don't see any difference. Of course, I've limited the number of slots to scan to 25. I can't set this values to 6, because I sometimes sort baggage using the corresponding button in the client to remove a garbage, and necessary potions may be placed in any of 25 slots. I can't move it to first 6 slots every time :).

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1797 Post by x_art » Mon Sep 14, 2009 12:33 am

I would also ask you to add full support of utf8. Now, you are translating umlauts only, but in the russian client all characters should be translated. I've added it to the utf8_ascii.xml, but found that utf8ToAscii is hardcoded for umlauts only. If I'll define my implementation of the utf8ToAscii function within the "russian.lua" file, then will this implementation override your one?

Another annoying problem appears, when I minimize the RoM window and the bot is running. Next time, I can't restore it. At this time, the bot works properly. Just I can't restore the window and see bot actions. It mainly appears when I click the "Minimize all windows" button on the "QuickLaunch" bar. But if I'll close a bot console window, then the RoM window can be restored without problems.

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

Re: RoM bot

#1798 Post by d003232 » Mon Sep 14, 2009 2:12 am

x_art wrote:I would also ask you to add full support of utf8. Now, you are translating umlauts only, but in the russian client all characters should be translated. I've added it to the utf8_ascii.xml, but found that utf8ToAscii is hardcoded for umlauts only. If I'll define my implementation of the utf8ToAscii function within the "russian.lua" file, then will this implementation override your one?
Can you post your russian version of the utf8_ascii.xml / russion.lua files? I will look, to make it more flexible. At which places do you need the convesation? (mobnames/targetnames from the client, ...).

x_art wrote:Another annoying problem appears, when I minimize the RoM window and the bot is running. Next time, I can't restore it. At this time, the bot works properly. Just I can't restore the window and see bot actions. It mainly appears when I click the "Minimize all windows" button on the "QuickLaunch" bar. But if I'll close a bot console window, then the RoM window can be restored without problems.
I suppose it would help to upgrade to the new MicroMacro beta version. We should ask Administrator for that ... or send him a PM for the case he oversight your post.
The RoM Bot Online Wiki needs your help!

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1799 Post by x_art » Mon Sep 14, 2009 5:18 am

d003232 wrote:
x_art wrote:I would also ask you to add full support of utf8. Now, you are translating umlauts only, but in the russian client all characters should be translated. I've added it to the utf8_ascii.xml, but found that utf8ToAscii is hardcoded for umlauts only. If I'll define my implementation of the utf8ToAscii function within the "russian.lua" file, then will this implementation override your one?
Can you post your russian version of the utf8_ascii.xml / russion.lua files? I will look, to make it more flexible. At which places do you need the convesation? (mobnames/targetnames from the client, ...).
Attached. Russian characters are used in: mob names, bag item names, target names and NPC names.
Attachments
utf8_ascii.xml
(11.34 KiB) Downloaded 118 times
russian.lua
(13.01 KiB) Downloaded 111 times

x_art
Posts: 23
Joined: Thu Jun 11, 2009 2:22 am

Re: RoM bot

#1800 Post by x_art » Mon Sep 14, 2009 5:30 am

I'm writing a harvesting bot that works in background and would to know how to place a camera above the player character and increase distance (Y coord?) of the camera? I've tried to use the camera object, but without success.

Locked

Who is online

Users browsing this forum: Bing [Bot] and 1 guest