How to modify the memories?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

How to modify the memories?

#1 Post by Lamkefyned » Fri Sep 26, 2014 8:11 pm

Hello, I want to modify the memories in a script but do not know how anyone help me?
Sin título.png
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#2 Post by rock5 » Fri Sep 26, 2014 10:49 pm

Assuming that they are static addresses you would do something like

Code: Select all

memoryWriteByte(getProc(), 0x9F997C, 99)
memoryWriteInt(getProc(), 0x9F997D, 201750)
That's assuming you do it through the bot. If you wanted to write a separate program it would require extra coding. To "lock" the value you would have to put it in a loop.

Note: Not all changes made to memory are propagated to the server. So even if it looks like you changed the value in game it actually has no affect.
  • 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
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: How to modify the memories?

#3 Post by BlubBlab » Sat Sep 27, 2014 2:38 am

First I'm not sure you need Lua you can also right click and edit the value but in any case here

To execute Lua script with CE:

Table->Show Cheat Table Lua Script
write what you want to run and ->Execute Script (Note: this will add the code to the cheat table)

To add Lua Script to CE permanently add it to main.lua of the CE directory.
You can with both ways use "require" and also "include" I believe.

You can also use a Lua function for a filter rescan of the pointers.

In the main.lua is basically all of the documentation for CE & Lua there is and show clearly it was written by a hacker but for read & write from a specific point in memory it is clear enough.

Like:

Code: Select all

readInteger(address) : Reads an integer from the specified address
readPointer(address): In a 64-bit target this equals readQword, in a 32-bit target readInteger()
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#4 Post by Lamkefyned » Sat Sep 27, 2014 9:16 am

as I can do something like this without having to make a repeat function?

Code: Select all

local offsets = {addresses.charPtr_offset, addresses.pawnSwim_offset1, addresses.pawnSwim_offset2}
local active = 4

function fly()
	memoryWriteString(getProc(), addresses.swimAddress, string.rep(string.char(0x90),#addresses.swimAddressBytes));
	memoryWriteIntPtr(getProc(), addresses.staticbase_char, offsets, active);
	printf("Swimhack ACTIVATED!\n");
end

function flyoff()
	memoryWriteString(getProc(), addresses.swimAddress, string.char(unpack(addresses.swimAddressBytes)));
	printf("Swimhack DEactivated.\n");
end

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
	<onLoad><!-- <![CDATA[ -->
	--=== key usage ===--
	--=== fly  		NUMPAD1 ===--
	--=== flyoff  	NUMPAD2 ===--
	--=== speed  	NUMPAD4 ===--
	--=== speedoff  NUMPAD5 ===--
	
cprintf(cli.blue, "Press numpad 1 to fly\n")
cprintf(cli.blue, "Press numpad 2 to not fly\n")
cprintf(cli.green, "Press numpad 4 to run fast\n")
cprintf(cli.green, "Press numpad 5 to walk normal speed\n")
cprintf(cli.red, "Press Ctrl + L to exit\n")
	
	
	local delay = 1 -- time between key presses.
	local time = os.time()
	while(true) do

		if keyPressed(key.VK_NUMPAD1) and (os.time() - time > delay ) then
			fly()
			time = os.time()
		end
		if keyPressed(key.VK_NUMPAD2) and (os.time() - time > delay ) then
			flyoff()
			time = os.time()
		end
		if keyPressed(key.VK_NUMPAD4) and (os.time() - time > delay ) then
			speed("on")
			time = os.time()
		end		
		if keyPressed(key.VK_NUMPAD5) and (os.time() - time > delay ) then
			speed("off")
			time = os.time()
		end	
	end
	]]></onLoad>
</waypoints>

Code: Select all

function DP() -- OPTION 1
 repeat
	memoryWriteByte(getProc(), 0x9F997C, 1)
	memoryWriteInt(getProc(), 0x9F997D, 207120)
 until false
end
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#5 Post by rock5 » Sat Sep 27, 2014 9:35 am

That fly code replaces the instruction that updates the 'fly' value to 0x90s. This in effect disables the instruction so it doesn't change. It's a bit tricky to do. Basically when you right click the result in CE and do a "Find what writes to this address" then you can find the code that continuously updates it and replace the bytes with 0x90s. You need to know exactly how many bytes to do though. It you get it wrong you'll probably crash the game.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#6 Post by Lamkefyned » Sat Sep 27, 2014 10:42 am

refers to this??
Sin título.png
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#7 Post by rock5 » Sat Sep 27, 2014 11:21 am

Looks like you are just viewing memory so no. Like I said right click the address and select "Find what writes to this address". You should get a dialog pop up. When the value changes you should get results appearing in it. Those results should point to the code that changed it.
What writes to this address.JPG
It didn't change for me but I suspect it's because you are using a different version of the game.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#8 Post by Lamkefyned » Sat Sep 27, 2014 11:35 am

Sin título.png
is that what you mean? Codes .... are different from the original server or the Rom4u because I'm on a new server Beta
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#9 Post by rock5 » Sat Sep 27, 2014 12:45 pm

That looks suspiciously wrong. I think it's saying it copied 11 to ecx. I would have expected ecx to equal 9F997D but it doesn't. And it's copying 11 whereas in your address list it shows 15. And if it's an address that is continuously updating it should have updated it more than 2 times (unless you were very fast taking the screen shot).

If it was correct I would suggest you try.

Code: Select all

function DPon()
   memoryWriteString(getProc(), 0x6B23A2, string.char(0x90,0x90,0x90,0x90,0x90))
   memoryWriteByte(getProc(), 0x9F997C, 1)
   memoryWriteInt(getProc(), 0x9F997D, 207120)
end
function DPoff()
   memoryWriteString(getProc(), 0x6B23A2, string.char(0xB9,0x11,0x00,0x00,0x00))
end
But like I said, I don't know enough to know how many bytes to do.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#10 Post by Lamkefyned » Sat Sep 27, 2014 1:00 pm

Sin título.png
backpack full?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#11 Post by Lamkefyned » Sat Sep 27, 2014 1:13 pm

When the packet is received from the mail until the backpack
Sin título.png
When I open the package in my backpack and out 2 objects which get in the CE and Package
Sin título1.png
It may be this code?
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#12 Post by rock5 » Sat Sep 27, 2014 1:17 pm

Note: we only did the 1 address. If you want to freeze both you might have to do the other one too.

What is it supposed to do anyway?
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#13 Post by Lamkefyned » Sat Sep 27, 2014 1:26 pm

He explained, when the object bone sent from another character when you pick up the mail puts a rune, that rune is a piece of what you want
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#14 Post by Lamkefyned » Sat Sep 27, 2014 1:33 pm

Sin título.png
are equal? does with 4 bits of bite?
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#15 Post by rock5 » Sat Sep 27, 2014 1:39 pm

You talking about the mail hack? I think I read something about that once. Never did it myself. I think they fixed that in the official servers a while ago. So how does it work? When you receive the item in the mail you change those addresses, lock the memory then accept the item? Then you have the rune you want? Does it work with CE?
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#16 Post by Lamkefyned » Sat Sep 27, 2014 1:44 pm

In a while I recorded a video and upload it to youtube to watch it .... I'm not in an official server I see a pirate be
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#17 Post by Lamkefyned » Sun Sep 28, 2014 3:31 pm

Code: Select all

https://www.youtube.com/watch?v=_TQWC77KEk4
you can help me make this code? with Rombot?
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to modify the memories?

#18 Post by rock5 » Mon Sep 29, 2014 12:43 am

That already looks pretty convenient, just switch to CE change the values, and switch back. Do you want a function you can use while botting? Try something like this.

Code: Select all

function DP_On(number, id)
    local function writeValues()
       memoryWriteByte(getProc(), 0x9F997C, number)
       memoryWriteInt(getProc(), 0x9F997D, id)
    end
    registerTimer("DPTimer", 50, writeValues);
end
function DP_Off()
    unregisterTimer("DPTimer")
end
That uses a registered timer. That means the memory is being written to continuously in the background while you can execute other commands, eg.

Code: Select all

DP_On(100, 123456)
Do some stuff
Open the package
DP_Off()
I've set the timer to 50ms. My CE has a freeze update time of 100ms. If it doesn't work or doesn't work reliably you can try adjusting this value.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to modify the memories?

#19 Post by Lamkefyned » Wed Oct 01, 2014 12:41 pm

does not work and you will change a couple of times while ...
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests