Page 1 of 5

Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 5:20 am
by Tsutomu
FlyHack, Wallclimb hack and SpeedHack are working and downloadable

-Usage of FlyHack: put the file in rom/userfunctions folder and in your waypoints define where you want to start flying, by putting a call to the function "fly();" (must be inside waypoint! like all other code) When you want it to stop flying in that waypoint write "flyoff();" function
addon_swimhack.lua
Swimhack addon for RomBot
(1.76 KiB) Downloaded 518 times
addon last (change) version: 24.03.2011.

-Usage of Wallclimb hack: place the file addons_wallhack in the userfunctions folder. Activate by using "wallon();" in waypoint file, deativate by using "walloff();" in waypoint file (both inside waypoints)
addon_wallhack.lua
Wallclimb hack for RomBot
(1 KiB) Downloaded 370 times
addon last (change) version: 27.03.2011.

-Usage of SpeedHack: place the file addons_speedhack in the userfunctions folder. Activate by using "speedon();" in waypoint file, deativate by using "speedoff();" in waypoint file (both inside waypoints).
addon_speedhack.lua
Speedhack for RomBot
(1.22 KiB) Downloaded 430 times
addon last (change) version: 29.03.2011.

Notes:
1. Flyhack-swim IS fully functional now (update rombot to newest and download flyhack addon)
2. Speedhack is working just fine, NOW WORKS WITH MAID SPEED POTIONS.
3. Wallhack is working but needs new experimental version of micromacro (works good with rombot => tested) you can download it here put all files in micromacro root folder where file micromacro.exe is located. You can download the files here:
micromacro1.01.experimental.zip
Micromacro 1.01 experimental (for wallclimb hack)
(315.87 KiB) Downloaded 334 times
CHAPTER 4 HACKS
Swim Speed Wall
LINKS ON PAGE 4

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 6:49 am
by rock5

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 8:02 am
by Tsutomu
This is my current code for RoMbot swimhack (fly) function.
I have few problems, all people of knowledge please help.
I'm not sure if i'm writing and reading mem values exactly, and also how to freeze the actual offset to a value. Also how to unfreeze. Is "proc" the right name from rombot to request process id?

Code: Select all

--==<<              Tsutomu's Swimhack function           >>==--
--==<<              By Tsutomu     Version 1.0a           >>==--
--==<<                Requirements: Rom bot.              >>==--
--==<<              Usage: flyon(); OR flyoff();          >>==--
-- When u need to activate the flyhack you put "flyon();" without quotes inside the waypoint
-- When u don't need it anymore, you put "flyoff();" without quotes inside the waypoint

--9BC394+598+EC+B4 <<-- OFFSETS

local mycustom_offset = 0xB4
local active = 3
--local inactive = 0 --not needed

function flyon()
	-- Check if fly value is off and change to on
	charptr_addr = memoryReadIntPtr(proc, staticcharbase_address, charPtr_offset);
	skillbuff_addr = memoryReadIntPtr(proc, charptr_addr,  skillbuffFlag_offset);
	mycustom_addr = memoryReadIntPtr(proc, skillbuff_addr,  mycustom_offset);
	local myValue = memoryReadInt(proc, mycustom_addr);
	printf("Swimhack value: %d\n", myvalue);
	memoryWriteInt(proc, mycustom_addr, active);
	-- freeze mem
	printf("Swimhack activated!\n");
end

function flyoff()
	-- Check if value is fly-on, change if it is
	charptr_addr = memoryReadIntPtr(proc, staticcharbase_address, charPtr_offset);
	skillbuff_addr = memoryReadIntPtr(proc, charptr_addr,  skillbuffFlag_offset);
	mycustom_addr = memoryReadIntPtr(proc, skillbuff_addr,  mycustom_offset);
	local myValue = memoryReadInt(proc, mycustom_addr);
	printf("Swimhack value: %d\n", myvalue);
	--memoryWriteInt(__PROC, mycustom_addr, inactive); --not needed since unfreeze does the trick
	--unfreeze mem
	printf("Swimhack DEactivated.\n");end
end
Later i will add speed up/down function, wallclimb, and maybe some more if you wish.
It's just that a little help is needed in order for this to jump-start. When i get swim working all others are easy then. Thank you all, hope i'll get some help.

edit: If i don't find a way to freeze mem from micromacro functions i'll need to go throught the rombot code to find a suitable function where i can put a call to edit memory back in every single step of the rombot.

If any1 has anykind of advice, much appreciated.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 8:48 am
by rock5
The correct function to get the process is getProc(). 'proc' is used in some files because somewhere higher in the file it defined proc=getProc().

You should be able to nest offsets. eg
memoryReadIntPtr(getProc(), baseaddress, offset1, offset2, offset3)

To freeze the memory you could try using 'registertimer' to change the value at regular intervals. Look it up in the micromacro wiki.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 9:22 am
by Tsutomu
Here's the code

Code: Select all

--==<<              Tsutomu's Swimhack function           >>==--
--==<<              By Tsutomu     Version 1.0a           >>==--
--==<<                Requirements: Rom bot.              >>==--
--==<<              Usage: flyon(); OR flyoff();          >>==--
-- When u need to activate the flyhack you put "flyon();" without quotes inside the waypoint
-- When u don't need it anymore, you put "flyoff();" without quotes inside the waypoint

--9BC394+598+EC+B4 <<-- OFFSETS
local staticcharbase_address = 0x9BC394
local charPtr_offset = 0x598
local skillbuffFlag_offset = 0xEC
local swim_offset = 0xB4
local active = 3
local proc=getProc();
--local inactive = 0 --not needed

function flyon()
	-- Check if fly value is off and change to on
	swim_addr = memoryReadIntPtr(getProc(), staticcharbase_address, charPtr_offset+skillbuffFlag_offset+swim_offset);
	local myValue = memoryReadInt(proc, swim_addr);
	memoryWriteInt(proc, swim_addr, active);
	-- register timer here!
	printf("Swimhack value: %d\n", swim_addr);
	printf("Swimhack activated!\n");
end

function flyoff()
	-- Check if value is fly-on, change if it is
	swim_addr = memoryReadIntPtr(getProc(), staticcharbase_address, charPtr_offset+skillbuffFlag_offset+swim_offset);
	local myValue = memoryReadInt(proc, swim_addr);
	--memoryWriteInt(proc, swim_addr, inactive); --not needed since unfreeze does the trick
	--unregister timer here!
	printf("Swimhack value: %d\n", swim_addr);
	printf("Swimhack DEactivated.\n");
end

function flycheck()
	-- Check the fly value
	swim_addr = memoryReadIntPtr(getProc(), staticcharbase_address, charPtr_offset+skillbuffFlag_offset+swim_offset);
	local myValue = memoryReadInt(proc, swim_addr);
	printf("Swimhack value: %d\n", swim_addr);
end
First i want to make sure i can read value from memory (from my test waypoint) and write it, then i'll get to timers and nesting writing over the value.

So, i have a problem with this code. It says for my swim_address: -965969920. I think it's wrong. Why?
Because when i print value it says "printf error" argument myValue is null. :S
Does it have to do with hex or smthng? It would also print it wouldn't it? Wouldn't be null?

Or maybe it's because i added offset values, not put coma after, but it didn't work with comas, says invalid no.of args.

so instead of: nnnn(proc,baseptr, off1,off2,off3);
i have put: nnnn(proc,baseptr, off1+off2+off3);

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 10:08 am
by Tsutomu
All that is left now to do is register a timer for this and we have a working fly function with a single function call ;)
I've managed to read and write successfully into memory offset i need.
----------------
EDIT:
OK, I've look into the timer Functions.

Code: Select all

newTimer("my_timer");
this will set new timer - i don't know where to put the timer so it gets initialized only once????

Code: Select all

startTimer( "my_timer", 10 );
i will put this in my flyon() function

Code: Select all

if( isTriggered("my_timer") ) then
  changememory();
  startTimer("my_timer", 10);
end
so this is where my method changememory() will get called (if i'm not mistaken when timer ticks 10 it will call this func. but where do i place this???? beginning of my file-before any func??? or somewhere in rombot internal code?)

Code: Select all

success = memoryWriteIntPtr(getProc(), staticcharbase_address, offsets, active);
this is what my changememory() function does.

So where do i put those different parts of code???

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 10:29 am
by rock5
Sorry I was wrong about the memory function. Try this instead.

Code: Select all

myValue = memoryReadIntPtr(getProc(), staticcharbase_address, {charPtr_offset, skillbuffFlag_offset, swim_offset});
I just tried

Code: Select all

print(memoryReadIntPtr(getProc(), 0x9bc394, {0x598,0xec, 0xb4}))
and it printed 3 so the above should work.
Tsutomu wrote:so instead of: nnnn(proc,baseptr, off1,off2,off3);
i have put: nnnn(proc,baseptr, off1+off2+off3);
nnnn(proc,baseptr, off1+off2+off3) will give you the wrong value.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 10:46 am
by rock5
I'm not sure what those timers are for and I don't understand how to use them. The one I was talking about is here.
http://www.solarstrike.net/wiki/index.p ... isterTimer

I think the way it works is, you create the timer function to freeze the memory at the begining of the file eg.

Code: Select all

function freezemem()
    Assign the value to memory
end
Then you start the automatic timer like this

Code: Select all

registerTimer("myTimer", 10, freezemem);
Then stop it like this

Code: Select all

unregisterTimer("myTimer")
By the way, I tried freezing that value with cheat engine but it didn't work.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 11:02 am
by Tsutomu
rock5 wrote:I just tried

Code: Select all

print(memoryReadIntPtr(getProc(), 0x9bc394, {0x598,0xec, 0xb4}))
and it printed 3 so the above should work.
It showed 3 in water? That's how it's supposed to behave, when out of water it should show 0. I think. :S

Now it doesn't work, i'll post my little code but will need to find out more about this problem, i'm currently testing what is going on wrong?

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 11:15 am
by Tsutomu
That's the actual address, i wonder what's going on, why it wont freeze. I see i change it with my source code, i've put printf statements in memoryfreeze() too, so i get the value 3-changed successfully. probably some other value too needs changing as it resets it to 0.
Hmmm.... back to the drawing boards xD

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 11:30 am
by Tsutomu

Code: Select all

--9BC394+598+EC+B4 <<-- OFFSETS
local staticcharbase_address = 0x9BC394
offsets = {0x598, 0xEC, 0xB4};
local active = 3;

function memoryfreeze()
	memoryWriteIntPtr(getProc(), staticcharbase_address, offsets, active);
	--swim = memoryReadIntPtr(getProc(), staticcharbase_address, offsets);
   --printf("Swim value: %d\n", swim);
end

function fly()
	registerTimer("flyTimer", 5, memoryfreeze);
	printf("Swimhack ACTIVATED!\n");
end

function flyoff()
	unregisterTimer("flyTimer");
	printf("Swimhack DEactivated.\n");
end
Looking into the problem, might take a while until the problem's located, probbly another adress has to be changed as well.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 12:37 pm
by rock5
Or maybe the server or game just wont let you do it. When I froze it with Cheat Engine, it's supposed to change it every 100ms I think it was, but I saw it flicker to 3 about once a second. Most of the time it was still 0. To tell you the truth I'd be surprised if the hacks could be made to work. Maybe they might have worked once but the devs might have fixed them.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 1:50 pm
by Tsutomu
Well it now works like a charm ;) I've changed the active value to 4 and it accepts it ;)

So here's the link testi t out with fly(); in one waypoint tag
and when you want it to stop type flyoff();

Regards!! :D

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 2:30 pm
by Tsutomu
Well, it works flawlessly, but, my character fly only on normal level not the Y axis (hight), how do i force rombot to make a waypoint 3d instead of 2d?
My waypoint has Y-coordinate but it just won't follow it? Why is that? Some restraint?
Any suggestions on what might cause this?

NOTE: When i use the hack and click to move (outside rombot) it makes it's way to the high point, any point.
But in bot it sort of like flies on top of the water :))) interesting effect, but useless :D

edit: player:mouseclickL(%d, %d, %d, %d);
Maybe this function can help. What it does actually in making a waypoint?

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 3:59 pm
by Alkaiser
Rock5 added preliminary support for y-axis, but he hasn't tackled the movement/camera functions yet, as far as I know.

Being able to bot Malatina's Course of Terror using this would be nice.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Thu Mar 24, 2011 4:20 pm
by Tsutomu
Sure, rombot is a great piece of software, well coded as i've seen, i'm sure we'll figure out a way around this problem and deliver multifunctionality for our automation needs.

Other usefull hacks are coming along too, i just don't know if i'll put it in separate files (addons) or to make all in one file. Maybe it's better to split them, code will be more readable so players can edit more easily to meet their needs, althow usage will be very easy for all -> two functions - one enabling other disabling specific hack.

Tomorrow probably will come the speed hack second most important for instance automation.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Fri Mar 25, 2011 12:30 am
by rock5
Tsutomu wrote:Well, it works flawlessly, but, my character fly only on normal level not the Y axis (hight), how do i force rombot to make a waypoint 3d instead of 2d?
Hm.. I think i know how I can fix it. Basically when the character changes direction if the y axis is included so that the character is 'looking' directly at the destination, then when it moves forward it should go straight there if in water. I'll start working on it.

Edit: I don't understand vectors so I'll have to ask administrator for the formulas.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Fri Mar 25, 2011 5:29 am
by Tsutomu
Great mate! Alway on top of the task.
It would be a great improvement, eagerly waiting for it.
Thanks again!

Today i'm working on a speedhack improvement.
When i fininsh it i will attach the addon file to the first post.

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Fri Mar 25, 2011 5:37 pm
by Tsutomu
-
sorry for dbl-posting
-
I'm working currently on wallhack - it would help bot in situations when it gets stuck.
Very usefull IMHO.

I have a problem though.

I need to write a float value to a memory address that has a read only flag.
I need to make it a read/write and write down new value, then make it read only again.

Anyone has idea? No functions to do this in micromacro library online. :(

Code: Select all

GetWindowThreadProcessId(rClient, &processID); //Get the process ID from the HWND and assign it to our "processID" variable.
	opClient = OpenProcess(PROCESS_ALL_ACCESS, 0, processID); //Open the process and assign it to our "opClient" handle.
	VirtualProtectEx(opClient, (void *) 0x0091D3B4, 4, PAGE_READWRITE, &oldData); //This address is protected from modification, let's fix that.
	WriteProcessMemory(opClient, (void *) 0x0091D3B4, &whVal, 4, 0); //Write the new value
	VirtualProtectEx(opClient, (void *) 0x0091D3B4, 4, oldData, &oldData); //Restore the protection

Re: Idea: RoMbot + MultiHack (keypress collaboration)

Posted: Sat Mar 26, 2011 3:06 am
by Administrator
Tsutomu wrote:
I need to write a float value to a memory address that has a read only flag.
I need to make it a read/write and write down new value, then make it read only again.

Anyone has idea? No functions to do this in micromacro library online. :(
http://www.solarstrike.net/wiki/index.p ... _Functions