How to modify the memories?
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
How to modify the memories?
Hello, I want to modify the memories in a script but do not know how anyone help me?
If you think something is right just because everyone else believes,you're not thinking.
Re: How to modify the memories?
Assuming that they are static addresses you would do something like
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.
Code: Select all
memoryWriteByte(getProc(), 0x9F997C, 99)
memoryWriteInt(getProc(), 0x9F997D, 201750)
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
Re: How to modify the memories?
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:
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
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
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
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.
Re: How to modify the memories?
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
refers to this??
If you think something is right just because everyone else believes,you're not thinking.
Re: How to modify the memories?
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.
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
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.
Re: How to modify the memories?
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.But like I said, I don't know enough to know how many bytes to do.
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
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
backpack full?
If you think something is right just because everyone else believes,you're not thinking.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
When the packet is received from the mail until the backpack
When I open the package in my backpack and out 2 objects which get in the CE and Package
It may be this code?
When I open the package in my backpack and out 2 objects which get in the CE and Package
It may be this code?
If you think something is right just because everyone else believes,you're not thinking.
Re: How to modify the memories?
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?
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
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.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
are equal? does with 4 bits of bite?
If you think something is right just because everyone else believes,you're not thinking.
Re: How to modify the memories?
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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
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.
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
Code: Select all
https://www.youtube.com/watch?v=_TQWC77KEk4
If you think something is right just because everyone else believes,you're not thinking.
Re: How to modify the memories?
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.
That uses a registered timer. That means the memory is being written to continuously in the background while you can execute other commands, eg.
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.
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
Code: Select all
DP_On(100, 123456)
Do some stuff
Open the package
DP_Off()
- 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
- Lamkefyned
- Posts: 348
- Joined: Thu May 23, 2013 11:38 am
- Location: Spain
Re: How to modify the memories?
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.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest