RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
Sentinel
Posts: 3
Joined: Wed Jul 01, 2009 9:14 am

Re: RoM bot

#1841 Post by Sentinel » Wed Sep 16, 2009 7:49 am

I got antother problem, when i start my bot. My RoM crashes!

got the message:

"Microsoft Visual C++ Runtime Library
Runtime error!


Program:

This application has requested the Runtime to terminate it in an unusual way.
Please contect the application´s support team for more information. "

the works on my ohter account....maybe because i bought some more backspace...


thanks a lot for the help

sphere83
Posts: 11
Joined: Sat Sep 12, 2009 8:31 am

Re: RoM bot

#1842 Post by sphere83 » Wed Sep 16, 2009 8:02 am

Thanks Admin for the prompt reply :)

The log file shows:

Code: Select all

Wed Sep 16 22:54:44 2009 : MicroMacro v1.0
Wed Sep 16 22:54:44 2009 : Processor Type: 2X 586, OS: Windows Vista Service Pack 1
Wed Sep 16 22:54:44 2009 : LuaCoco is available.
Wed Sep 16 22:54:44 2009 : Lua glues exported.
Wed Sep 16 22:54:44 2009 : Keyboard layout: US English
Wed Sep 16 22:54:51 2009 : Executing script 'bot.lua'
==================================================

Wed Sep 16 22:54:52 2009 : Language: english
Wed Sep 16 22:55:28 2009 : RoM Bot Version 2.46
Wed Sep 16 22:55:28 2009 : Using static char address 0x8E9A00, player address 0x27DCE800
Wed Sep 16 22:55:28 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:28 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:29 2009 : QUICK_TURN = false
Wed Sep 16 22:55:29 2009 : Keyboard settings are from bindings.txt:
Wed Sep 16 22:55:29 2009 : MOVE_FORWARD                  W
Wed Sep 16 22:55:29 2009 : STRAFF_LEFT                   A
Wed Sep 16 22:55:29 2009 : TARGET                        Tab
Wed Sep 16 22:55:29 2009 : KNIGHT_ENHANCED_ARMOR         8
Wed Sep 16 22:55:29 2009 : ROGUE_BLIND_STAB              2
Wed Sep 16 22:55:29 2009 : MOVE_BACKWARD                 S
Wed Sep 16 22:55:29 2009 : ROGUE_LOW_BLOW                3
Wed Sep 16 22:55:29 2009 : ROTATE_LEFT                   Q
Wed Sep 16 22:55:29 2009 : STRAFF_RIGHT                  D
Wed Sep 16 22:55:29 2009 : ROGUE_SHADOWSTAB              4
Wed Sep 16 22:55:29 2009 : ROGUE_WOUND_ATTACK            1
Wed Sep 16 22:55:29 2009 : ROGUE_ASSASSINS_RAGE          9
Wed Sep 16 22:55:29 2009 : TARGET_FRIEND                 Ctrl+Tab
Wed Sep 16 22:55:29 2009 : MACRO                         0
Wed Sep 16 22:55:29 2009 : JUMP                          Space
Wed Sep 16 22:55:29 2009 : ROTATE_RIGHT                  E
Wed Sep 16 22:55:29 2009 : Updating bag slot 1
Wed Sep 16 22:55:29 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:29 2009 : Updating bag slot 2
Wed Sep 16 22:55:29 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:30 2009 : Updating bag slot 3
Wed Sep 16 22:55:30 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:30 2009 : Updating bag slot 4
Wed Sep 16 22:55:30 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110
Wed Sep 16 22:55:31 2009 : Updating bag slot 5
Wed Sep 16 22:55:31 2009 : Using macro address: (0x937BB8 + 0x110) = 0x3AF0110

stack traceback:
	...s\Rom Bots\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 22:55:44 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Wed Sep 16 22:55:44 2009 : Execution error: Runtime error
Cheers.

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

Re: RoM bot

#1843 Post by Administrator » Wed Sep 16, 2009 9:02 am

sphere83: Can you try something else for me? In bot.lua, find the line that has this:

Code: Select all

keyboardSetDelay(0);
Change the 0 to 100. Does it still crash? Can you provide another copy of log.txt if it does?
Also, if it does crash again, post a copy of what is in your first macro slot.

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1844 Post by darkguard » Wed Sep 16, 2009 9:37 am

I have the same problem and changing
keyboardSetDelay(100);

didnt help.

As soon as it starts indexing the bag, it crashes.

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1845 Post by darkguard » Wed Sep 16, 2009 9:58 am

Code: Select all

Wed Sep 16 10:47:39 2009 : MicroMacro v1.0
Wed Sep 16 10:47:39 2009 : Processor Type: 8X 586, OS: Windows 7 
Wed Sep 16 10:47:39 2009 : LuaCoco is available.
Wed Sep 16 10:47:39 2009 : Lua glues exported.
Wed Sep 16 10:47:39 2009 : Keyboard layout: US English
Wed Sep 16 10:47:44 2009 : Executing script 'bot.lua'
==================================================

Wed Sep 16 10:47:44 2009 : Language: english
Wed Sep 16 10:47:52 2009 : RoM Bot Version 2.46
Wed Sep 16 10:47:53 2009 : Using static char address 0x8E9A00, player address 0x300DC800
Wed Sep 16 10:47:53 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 10:47:53 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 10:47:54 2009 : QUICK_TURN = false
Wed Sep 16 10:47:54 2009 : Keyboard settings are from bindings.txt:
Wed Sep 16 10:47:54 2009 : HP_POTION                     8
Wed Sep 16 10:47:54 2009 : STRAFF_LEFT                   A
Wed Sep 16 10:47:54 2009 : SCOUT_VAMPIRE_ARROWS          4
Wed Sep 16 10:47:54 2009 : KNIGHT_HOLY_STRIKE            7
Wed Sep 16 10:47:54 2009 : ROTATE_RIGHT                  E
Wed Sep 16 10:47:54 2009 : TARGET_FRIEND                 CTRL+TAB
Wed Sep 16 10:47:54 2009 : MACRO                         0
Wed Sep 16 10:47:54 2009 : SCOUT_HEALING_SHOT            9
Wed Sep 16 10:47:54 2009 : MOVE_FORWARD                  W
Wed Sep 16 10:47:54 2009 : MOVE_BACKWARD                 S
Wed Sep 16 10:47:54 2009 : ROTATE_LEFT                   Q
Wed Sep 16 10:47:54 2009 : STRAFF_RIGHT                  D
Wed Sep 16 10:47:54 2009 : SCOUT_WIND_ARROWS             2
Wed Sep 16 10:47:54 2009 : KNIGHT_DISARMAMENT            6
Wed Sep 16 10:47:54 2009 : TARGET                        TAB
Wed Sep 16 10:47:54 2009 : JUMP                          ESPACE
Wed Sep 16 10:47:54 2009 : ATTACK                        1
Wed Sep 16 10:47:54 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 10:47:54 2009 : Updating bag slot 1
Wed Sep 16 10:47:54 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 10:47:55 2009 : Updating bag slot 2
Wed Sep 16 10:47:58 2009 : Forced detach due to invalid handle.
Wed Sep 16 10:47:58 2009 : Failed to detach from process (540108).

stack traceback:
	...6)\Runes of Magic 2\interface\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 10:47:58 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Wed Sep 16 10:47:58 2009 : Execution error: Runtime error

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

Re: RoM bot

#1846 Post by Administrator » Wed Sep 16, 2009 10:06 am

Try this... functions.lua, line 354. Find this:

Code: Select all

   -- Write something on the first address, to see when its over written
   memoryWriteByte(getProc(), macro_address + macro2_offset, 6);
Above, add this:

Code: Select all

    logMessage("Writing control character");
    yrest(100);
Below, add this:

Code: Select all

    logMessage("Finished writing control character");
    yrest(100);
Post new results. And use code tags!

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1847 Post by darkguard » Wed Sep 16, 2009 10:11 am

As a note I have : <option name="INV_MAX_SLOTS" value="2" />
in the profile but it doesnt change anything

It seems to crash before that...

Code: Select all

Wed Sep 16 11:08:36 2009 : Language: english
Wed Sep 16 11:08:39 2009 : RoM Bot Version 2.46
Wed Sep 16 11:08:40 2009 : Using static char address 0x8E9A00, player address 0x3067B400
Wed Sep 16 11:08:40 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 11:08:40 2009 : Writing control character
Wed Sep 16 11:08:40 2009 : Finished writing control character
Wed Sep 16 11:08:40 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 11:08:40 2009 : Writing control character
Wed Sep 16 11:08:41 2009 : Finished writing control character
Wed Sep 16 11:08:41 2009 : QUICK_TURN = false
Wed Sep 16 11:08:41 2009 : Keyboard settings are from bindings.txt:
Wed Sep 16 11:08:41 2009 : HP_POTION                     8
Wed Sep 16 11:08:41 2009 : STRAFF_LEFT                   A
Wed Sep 16 11:08:41 2009 : SCOUT_VAMPIRE_ARROWS          4
Wed Sep 16 11:08:41 2009 : KNIGHT_HOLY_STRIKE            7
Wed Sep 16 11:08:41 2009 : ROTATE_RIGHT                  E
Wed Sep 16 11:08:41 2009 : TARGET_FRIEND                 CTRL+TAB
Wed Sep 16 11:08:41 2009 : MACRO                         0
Wed Sep 16 11:08:41 2009 : SCOUT_HEALING_SHOT            9
Wed Sep 16 11:08:41 2009 : MOVE_FORWARD                  W
Wed Sep 16 11:08:41 2009 : MOVE_BACKWARD                 S
Wed Sep 16 11:08:41 2009 : ROTATE_LEFT                   Q
Wed Sep 16 11:08:41 2009 : STRAFF_RIGHT                  D
Wed Sep 16 11:08:41 2009 : SCOUT_WIND_ARROWS             2
Wed Sep 16 11:08:41 2009 : KNIGHT_DISARMAMENT            6
Wed Sep 16 11:08:41 2009 : TARGET                        TAB
Wed Sep 16 11:08:41 2009 : JUMP                          ESPACE
Wed Sep 16 11:08:41 2009 : ATTACK                        1
Wed Sep 16 11:08:41 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 11:08:41 2009 : Writing control character
Wed Sep 16 11:08:41 2009 : Finished writing control character
Wed Sep 16 11:08:42 2009 : Updating bag slot 1
Wed Sep 16 11:08:42 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 11:08:42 2009 : Writing control character
Wed Sep 16 11:08:42 2009 : Finished writing control character
Wed Sep 16 11:08:43 2009 : Updating bag slot 2
Wed Sep 16 11:08:43 2009 : Forced detach due to invalid handle.
Wed Sep 16 11:08:43 2009 : Failed to detach from process (500612).

stack traceback:
	...6)\Runes of Magic 2\interface\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 11:08:43 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Wed Sep 16 11:08:43 2009 : Execution error: Runtime error

sphere83
Posts: 11
Joined: Sat Sep 12, 2009 8:31 am

Re: RoM bot

#1848 Post by sphere83 » Wed Sep 16, 2009 10:23 am

Mine gives the following:

Code: Select all

Thu Sep 17 01:15:34 2009 : MicroMacro v1.0
Thu Sep 17 01:15:34 2009 : Processor Type: 2X 586, OS: Windows Vista Service Pack 1
Thu Sep 17 01:15:34 2009 : LuaCoco is available.
Thu Sep 17 01:15:34 2009 : Lua glues exported.
Thu Sep 17 01:15:34 2009 : Keyboard layout: US English
Thu Sep 17 01:18:35 2009 : Executing script 'bot.lua'
==================================================

Thu Sep 17 01:18:35 2009 : Language: english
Thu Sep 17 01:18:38 2009 : RoM Bot Version 2.46
Thu Sep 17 01:18:38 2009 : Using static char address 0x8E9A00, player address 0x22197400
Thu Sep 17 01:18:38 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:38 2009 : Writing control character
Thu Sep 17 01:18:38 2009 : Finished writing control character
Thu Sep 17 01:18:38 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:38 2009 : Writing control character
Thu Sep 17 01:18:39 2009 : Finished writing control character
Thu Sep 17 01:18:39 2009 : QUICK_TURN = false
Thu Sep 17 01:18:39 2009 : Keyboard settings are from bindings.txt:
Thu Sep 17 01:18:39 2009 : MOVE_FORWARD                  W
Thu Sep 17 01:18:39 2009 : STRAFF_LEFT                   A
Thu Sep 17 01:18:39 2009 : TARGET                        Tab
Thu Sep 17 01:18:39 2009 : KNIGHT_ENHANCED_ARMOR         8
Thu Sep 17 01:18:39 2009 : ROGUE_BLIND_STAB              2
Thu Sep 17 01:18:39 2009 : MOVE_BACKWARD                 S
Thu Sep 17 01:18:39 2009 : ROGUE_LOW_BLOW                3
Thu Sep 17 01:18:39 2009 : ROTATE_LEFT                   Q
Thu Sep 17 01:18:39 2009 : STRAFF_RIGHT                  D
Thu Sep 17 01:18:39 2009 : ROGUE_SHADOWSTAB              4
Thu Sep 17 01:18:39 2009 : ROGUE_WOUND_ATTACK            1
Thu Sep 17 01:18:39 2009 : ROGUE_ASSASSINS_RAGE          9
Thu Sep 17 01:18:39 2009 : TARGET_FRIEND                 Ctrl+Tab
Thu Sep 17 01:18:39 2009 : MACRO                         0
Thu Sep 17 01:18:39 2009 : JUMP                          Space
Thu Sep 17 01:18:39 2009 : ROTATE_RIGHT                  E
Thu Sep 17 01:18:39 2009 : Updating bag slot 1
Thu Sep 17 01:18:39 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:39 2009 : Writing control character
Thu Sep 17 01:18:39 2009 : Finished writing control character
Thu Sep 17 01:18:40 2009 : Updating bag slot 2
Thu Sep 17 01:18:40 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:40 2009 : Writing control character
Thu Sep 17 01:18:40 2009 : Finished writing control character
Thu Sep 17 01:18:41 2009 : Updating bag slot 3
Thu Sep 17 01:18:41 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:41 2009 : Writing control character
Thu Sep 17 01:18:41 2009 : Finished writing control character
Thu Sep 17 01:18:42 2009 : Updating bag slot 4
Thu Sep 17 01:18:42 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:42 2009 : Writing control character
Thu Sep 17 01:18:42 2009 : Finished writing control character
Thu Sep 17 01:18:43 2009 : Updating bag slot 5
Thu Sep 17 01:18:43 2009 : Using macro address: (0x937BB8 + 0x110) = 0x49A0110
Thu Sep 17 01:18:43 2009 : Writing control character
Thu Sep 17 01:18:43 2009 : Finished writing control character

stack traceback:
	...s\Rom Bots\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Thu Sep 17 01:18:50 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Thu Sep 17 01:18:50 2009 : Execution error: Runtime error
I'm using <option name="INV_MAX_SLOTS" value="5" />.

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

Re: RoM bot

#1849 Post by Administrator » Wed Sep 16, 2009 10:31 am

It could be an error in the writing causing the game to overstep boundaries, I suppose.

In functions.lua again,
Find:

Code: Select all

	--- Write the macro
	for i = 0, 254, 1 do
		local byte = string.byte(text, i + 1);
		if( byte == null ) then
			memoryWriteByte(getProc(), macro_address + macro1_offset + i, 0);
			break;
		end
		memoryWriteByte(getProc(), macro_address + macro1_offset + i, byte);
	end

Replace with:

Code: Select all

	--- Write the macro
	local i;
	local byte;
	local bytesWritten = "";

	for i = 0, 254, 1 do
		byte = string.byte(text, i + 1);
		if( byte == nil ) then byte = 0; end;
		bytesWritten = bytesWritten .. sprintf("0x%X", byte) .. ", ";
		if( byte == nil or byte == 0 ) then
			memoryWriteByte(getProc(), macro_address + macro1_offset + i, 0);
			break;
		end
		memoryWriteByte(getProc(), macro_address + macro1_offset + i, byte);
	end

	if( byte ~= 0 ) then
		memoryWriteByte(getProc(), macro_address + macro1_offset + i, 0);
	end

	logMessage("Bytes Written: \n" .. bytesWritten);
Report results. This might fix the crashing error.

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1850 Post by darkguard » Wed Sep 16, 2009 10:39 am

Still not working

The client seems to crash instantly when I hit 'Del' and the micromacro output continues even the client is crashed
I really think it crashes before the bag is checked.

Code: Select all

Wed Sep 16 11:35:59 2009 : MicroMacro v1.0
Wed Sep 16 11:35:59 2009 : Processor Type: 8X 586, OS: Windows 7 
Wed Sep 16 11:35:59 2009 : LuaCoco is available.
Wed Sep 16 11:35:59 2009 : Lua glues exported.
Wed Sep 16 11:35:59 2009 : Keyboard layout: US English
Wed Sep 16 11:36:18 2009 : Executing script 'bot.lua'
==================================================

Wed Sep 16 11:36:18 2009 : Language: english
Wed Sep 16 11:36:20 2009 : RoM Bot Version 2.46
Wed Sep 16 11:36:21 2009 : Using static char address 0x8E9A00, player address 0x3005B000
Wed Sep 16 11:36:21 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8190110
Wed Sep 16 11:36:21 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x31, 0x32, 0x33, 0x34, 0x3B, 0x43, 0x68, 0x61, 0x74, 0x46, 0x72, 0x61, 0x6D, 0x65, 0x31, 0x3A, 0x41, 0x64, 0x64, 0x4D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4D, 0x41, 0x43, 0x52, 0x4F, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3A, 0x20, 0x73, 0x65, 0x6E, 0x64, 0x20, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x20, 0x31, 0x32, 0x33, 0x34, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x63, 0x72, 0x6F, 0x20, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x20, 0x32, 0x22, 0x29, 0x3B, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0Wed Sep 16 11:36:21 2009
Wed Sep 16 11:36:21 2009 : Writing control character
Wed Sep 16 11:36:21 2009 : Finished writing control character
Wed Sep 16 11:36:21 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8190110
Wed Sep 16 11:36:21 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x78, 0x78, 0x78, 0x78, 0x3B, 0x20, 0x43, 0x68, 0x61, 0x74, 0x46, 0x72, 0x61, 0x6D, 0x65, 0x31, 0x3A, 0x41, 0x64, 0x64, 0x4D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4D, 0x41, 0x43, 0x52, 0x4F, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3A, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6C, 0x22, 0x29, 0x3B, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0x2C, 0x27, 0x27, 0x2C, 0x37, 0x2C, 0x72, 0x29, 0x3B, 0x0, 
Wed Sep 16 11:36:21 2009 : Writing control character
Wed Sep 16 11:36:21 2009 : Finished writing control character
Wed Sep 16 11:36:22 2009 : QUICK_TURN = false
Wed Sep 16 11:36:22 2009 : Keyboard settings are from bindings.txt:
Wed Sep 16 11:36:22 2009 : HP_POTION                     8
Wed Sep 16 11:36:22 2009 : STRAFF_LEFT                   A
Wed Sep 16 11:36:22 2009 : SCOUT_VAMPIRE_ARROWS          4
Wed Sep 16 11:36:22 2009 : KNIGHT_HOLY_STRIKE            7
Wed Sep 16 11:36:22 2009 : ROTATE_RIGHT                  E
Wed Sep 16 11:36:22 2009 : TARGET_FRIEND                 CTRL+TAB
Wed Sep 16 11:36:22 2009 : MACRO                         0
Wed Sep 16 11:36:22 2009 : SCOUT_HEALING_SHOT            9
Wed Sep 16 11:36:22 2009 : MOVE_FORWARD                  W
Wed Sep 16 11:36:22 2009 : MOVE_BACKWARD                 S
Wed Sep 16 11:36:22 2009 : ROTATE_LEFT                   Q
Wed Sep 16 11:36:22 2009 : STRAFF_RIGHT                  D
Wed Sep 16 11:36:22 2009 : SCOUT_WIND_ARROWS             2
Wed Sep 16 11:36:22 2009 : KNIGHT_DISARMAMENT            6
Wed Sep 16 11:36:22 2009 : TARGET                        TAB
Wed Sep 16 11:36:22 2009 : JUMP                          ESPACE
Wed Sep 16 11:36:22 2009 : ATTACK                        1
Wed Sep 16 11:36:22 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8190110
Wed Sep 16 11:36:22 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x4C, 0x69, 0x6E, 0x6B, 0x28, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x31, 0x29, 0x29, 0x2C, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x31, 0x29, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0x2C, 0x27, 0x27, 0x2C, 0x37, 0x2C, 0x72, 0x29, 0x3B, 0x0, 
Wed Sep 16 11:36:22 2009 : Writing control character
Wed Sep 16 11:36:22 2009 : Finished writing control character
Wed Sep 16 11:36:23 2009 : Updating bag slot 1
Wed Sep 16 11:36:23 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8190110
Wed Sep 16 11:36:23 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x4C, 0x69, 0x6E, 0x6B, 0x28, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x32, 0x29, 0x29, 0x2C, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x32, 0x29, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0x2C, 0x27, 0x27, 0x2C, 0x37, 0x2C, 0x72, 0x29, 0x3B, 0x0, 
Wed Sep 16 11:36:23 2009 : Writing control character
Wed Sep 16 11:36:23 2009 : Finished writing control character
Wed Sep 16 11:36:24 2009 : Updating bag slot 2

stack traceback:
	...6)\Runes of Magic 2\interface\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 11:36:25 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Wed Sep 16 11:36:25 2009 : Execution error: Runtime error

shoopwoop
Posts: 8
Joined: Sun Sep 06, 2009 1:28 am

Re: RoM bot

#1851 Post by shoopwoop » Wed Sep 16, 2009 10:46 am

Problem:
Bot won't use mana potion "Elementargeist-Stein" in German version

keeps telling "no mana potions found, sorry"

any idea?

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1852 Post by darkguard » Wed Sep 16, 2009 10:52 am

I get the crash message on the client just after the micromacro output "RoM windows size..."

BEFORE the "[DEBUG] TIMEOUT in RoMScript ..." and "Mapping inventory (bagslot 1 to 2)..."


im not sure if the "Ranged skill found:" comes after or before...

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

Re: RoM bot

#1853 Post by Administrator » Wed Sep 16, 2009 11:00 am

Hmm...I noticed something strange:
0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0Wed Sep 16 11:36:21 2009
It shouldn't be doing that... It could be that we are overstepping bounds.

Above:

Code: Select all

	--- Write the macro
Add:

Code: Select all

	local len = string.len(text);
	if( len > 254 ) then
		error("Macro text too long.", 2);
	end

shoopwoop: You can add it manually to rom/database/consumables.xml

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1854 Post by darkguard » Wed Sep 16, 2009 11:10 am

The change didnt do anything, so I added at first and error on ok then a log on ok:

Code: Select all

 local len = string.len(text);
   if( len > 254 ) then
      error("Macro text too long.", 2);
	else
	logMessage("Macro is ok");
   end
On error on "ok" the scripts just stops without the client crashing.

With the code above I get that:

Code: Select all

Wed Sep 16 12:05:19 2009 : MicroMacro v1.0
Wed Sep 16 12:05:19 2009 : Processor Type: 8X 586, OS: Windows 7 
Wed Sep 16 12:05:19 2009 : LuaCoco is available.
Wed Sep 16 12:05:19 2009 : Lua glues exported.
Wed Sep 16 12:05:19 2009 : Keyboard layout: US English
Wed Sep 16 12:05:25 2009 : Executing script 'bot.lua'
==================================================

Wed Sep 16 12:05:25 2009 : Language: english
Wed Sep 16 12:05:27 2009 : RoM Bot Version 2.46
Wed Sep 16 12:05:27 2009 : Using static char address 0x8E9A00, player address 0x3529A000
Wed Sep 16 12:05:27 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110

stack traceback:
	...6)\Runes of Magic 2\interface\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 12:05:27 2009 : ...agic 2/interface/micromacro/scripts/rom/settings.lua:817: Macro text is ok.
Wed Sep 16 12:05:27 2009 : Execution error: Runtime error
Wed Sep 16 12:06:34 2009 : Executing script 'bot.lua'
==================================================

Wed Sep 16 12:06:34 2009 : Language: english
Wed Sep 16 12:06:40 2009 : RoM Bot Version 2.46
Wed Sep 16 12:06:42 2009 : Using static char address 0x8E9A00, player address 0x3529A000
Wed Sep 16 12:06:42 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 12:06:42 2009 : Macro is ok
Wed Sep 16 12:06:42 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x31, 0x32, 0x33, 0x34, 0x3B, 0x43, 0x68, 0x61, 0x74, 0x46, 0x72, 0x61, 0x6D, 0x65, 0x31, 0x3A, 0x41, 0x64, 0x64, 0x4D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4D, 0x41, 0x43, 0x52, 0x4F, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3A, 0x20, 0x73, 0x65, 0x6E, 0x64, 0x20, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x20, 0x31, 0x32, 0x33, 0x34, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x63, 0x72, 0x6F, 0x20, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x20, 0x32, 0x22, 0x29, 0x3B, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0Wed Sep 16 12:06:42 2009
Wed Sep 16 12:06:42 2009 : Writing control character
Wed Sep 16 12:06:43 2009 : Finished writing control character
Wed Sep 16 12:06:43 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 12:06:43 2009 : Macro is ok
Wed Sep 16 12:06:43 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x78, 0x78, 0x78, 0x78, 0x3B, 0x20, 0x43, 0x68, 0x61, 0x74, 0x46, 0x72, 0x61, 0x6D, 0x65, 0x31, 0x3A, 0x41, 0x64, 0x64, 0x4D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x22, 0x4D, 0x41, 0x43, 0x52, 0x4F, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3A, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6C, 0x22, 0x29, 0x3B, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0x2C, 0x27, 0x27, 0x2C, 0x37, 0x2C, 0x72, 0x29, 0x3B, 0x0, 
Wed Sep 16 12:06:43 2009 : Writing control character
Wed Sep 16 12:06:43 2009 : Finished writing control character
Wed Sep 16 12:06:44 2009 : QUICK_TURN = false
Wed Sep 16 12:06:44 2009 : Keyboard settings are from bindings.txt:
Wed Sep 16 12:06:44 2009 : HP_POTION                     8
Wed Sep 16 12:06:44 2009 : STRAFF_LEFT                   A
Wed Sep 16 12:06:44 2009 : SCOUT_VAMPIRE_ARROWS          4
Wed Sep 16 12:06:44 2009 : KNIGHT_HOLY_STRIKE            7
Wed Sep 16 12:06:44 2009 : ROTATE_RIGHT                  E
Wed Sep 16 12:06:44 2009 : TARGET_FRIEND                 CTRL+TAB
Wed Sep 16 12:06:44 2009 : MACRO                         0
Wed Sep 16 12:06:44 2009 : SCOUT_HEALING_SHOT            9
Wed Sep 16 12:06:44 2009 : MOVE_FORWARD                  W
Wed Sep 16 12:06:44 2009 : MOVE_BACKWARD                 S
Wed Sep 16 12:06:44 2009 : ROTATE_LEFT                   Q
Wed Sep 16 12:06:44 2009 : STRAFF_RIGHT                  D
Wed Sep 16 12:06:44 2009 : SCOUT_WIND_ARROWS             2
Wed Sep 16 12:06:44 2009 : KNIGHT_DISARMAMENT            6
Wed Sep 16 12:06:44 2009 : TARGET                        TAB
Wed Sep 16 12:06:44 2009 : JUMP                          ESPACE
Wed Sep 16 12:06:44 2009 : ATTACK                        1
Wed Sep 16 12:06:44 2009 : Using macro address: (0x937BB8 + 0x110) = 0x8860110
Wed Sep 16 12:06:44 2009 : Macro is ok
Wed Sep 16 12:06:44 2009 : Bytes Written: 
0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x72, 0x3D, 0x27, 0x27, 0x20, 0x61, 0x3D, 0x7B, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x4C, 0x69, 0x6E, 0x6B, 0x28, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x31, 0x29, 0x29, 0x2C, 0x47, 0x65, 0x74, 0x42, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6D, 0x49, 0x6E, 0x66, 0x6F, 0x28, 0x31, 0x29, 0x7D, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x69, 0x3D, 0x31, 0x2C, 0x23, 0x61, 0x20, 0x64, 0x6F, 0x20, 0x69, 0x66, 0x20, 0x61, 0x5B, 0x69, 0x5D, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x74, 0x6F, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x28, 0x61, 0x5B, 0x69, 0x5D, 0x29, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x72, 0x3D, 0x72, 0x2E, 0x2E, 0x27, 0x9, 0x27, 0x20, 0x65, 0x6E, 0x64, 0x20, 0x45, 0x64, 0x69, 0x74, 0x4D, 0x61, 0x63, 0x72, 0x6F, 0x28, 0x32, 0x2C, 0x27, 0x27, 0x2C, 0x37, 0x2C, 0x72, 0x29, 0x3B, 0x0, 
Wed Sep 16 12:06:44 2009 : Writing control character
Wed Sep 16 12:06:44 2009 : Finished writing control character
Wed Sep 16 12:06:44 2009 : Forced detach due to invalid handle.
Wed Sep 16 12:06:44 2009 : Failed to detach from process (1507ac).

stack traceback:
	...6)\Runes of Magic 2\interface\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom/bot.lua:683: in main chunk

----------TRACEBACK END----------

Wed Sep 16 12:06:44 2009 : Window lost (Client crashed or closed?). You must re-start the script.
Wed Sep 16 12:06:44 2009 : Execution error: Runtime error

So it does not seem to be over 254...

shoopwoop
Posts: 8
Joined: Sun Sep 06, 2009 1:28 am

Re: RoM bot

#1855 Post by shoopwoop » Wed Sep 16, 2009 11:17 am

Administrator wrote: shoopwoop: You can add it manually to rom/database/consumables.xml
i replaced the english line with:

Code: Select all

<potion type="mana" id="201061" name="Elementargeist-Stein" level="51" />
still, doesn't work :/

UnRegistered
Posts: 14
Joined: Fri Apr 17, 2009 2:26 am

Re: RoM bot

#1856 Post by UnRegistered » Wed Sep 16, 2009 11:19 am

Hi i got problem with Start Bot from new version :<

Code: Select all

MicroMacro v1.0
SolarStrike Software
http://www.solarstrike.net
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script> rom/update.lua
Opening update.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and low a new script.
-------------------------------------------------------------------------------
Scanning for updated addresses...
staticcharbase: 0x8E9A00
staticcambase: 0x9547B4
Finished.


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script> rom/bot.lua
Opening bot.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and low a new script.
-------------------------------------------------------------------------------
We read the hotkey settings from your bindings.txt file C:\Users\Raf\Moje dokume
nty\Runes of Magic\bindings.txt instead of using the settings.lua file.

ęSolarStrike Software, www.solarstrike.net

The macro is currently not running. Press the start key (Delete) to begin.
You may use (End) key to stop/pause the script.
Resumed.
RoM Bot Version 2.46
...nes of Magic/micromacro/scripts/rom/classes/pawn.lua:172: bad argument #1 to
'bitAnd' ((null))

Thanx for help :<

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

Re: RoM bot

#1857 Post by Administrator » Wed Sep 16, 2009 11:25 am

Right below:

Code: Select all

	local len = string.len(text);
	if( len > 254 ) then
		error("Macro text too long.", 2);
	end
Add this:

Code: Select all

	local str = memoryReadString(getProc(), macro_address + macro1_offset, 25);

	if( not string.find(str, "/script r=") ) then
		cprintf(cli.green, "Read str: %s\n", tostring(str));
	end
Open your macro screen and manually edit macro1 to have this test: testing

Now run the bot, and above the "Mapping inventory" string, you should see "Read str: testing" in green. Do you see it?

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1858 Post by darkguard » Wed Sep 16, 2009 11:29 am

Yes I see it.

Code: Select all

RoM Bot Version 2.46
RoM windows size is 1440x881, upper left corner at 8,30
Ranged skill found: SCOUT_WIND_ARROWS
Read str: testing
[DEBUG] TIMEOUT in RoMScript ...

alcor75
Posts: 3
Joined: Tue Sep 15, 2009 11:34 am

Re: RoM bot

#1859 Post by alcor75 » Wed Sep 16, 2009 12:01 pm

hi guys, i had the same problem but only with 1 char, so i tryed to delete all the file in the profile directory (the one that is in C:\Users\yourname\Documents\Runes of Magic\yourcharname) and now it work again.
Hope this help.

Alcor75

darkguard
Posts: 8
Joined: Wed Sep 16, 2009 9:35 am

Re: RoM bot

#1860 Post by darkguard » Wed Sep 16, 2009 12:04 pm

Valid point, it does seem to work with an empty profile.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests