Tailor Made Tools/Programs for You - AHK

05/01/2009 09:52 Darkyy#436
[QUOTE=Evan Lim;2145809]Darkyy@
like this?
Code:
x1=106
y1=143
x2=882
y2=609
loop
{
 IfWinActive, [Conquer2.0]
 {
 PixelSearch, Px, Py, x1, y1, x2, y2, 0x0303B8, 10, Fast
 if ErrorLevel = 0
 {
firstclickx := Px - 5
firstclicky := Py + 20
send {ctrl down}
sleep 100
click %firstclickx%,%firstclicky%
sleep 50
send {ctrl up}
secondclickx := Px + 10
secondclicky := Py - 20
  click %secondclickx%,%secondclicky%
  sleep 400
 }
 if errorlevel = 1
 {
  send {ctrl down}
  Click 251,158
  sleep 1000
  click 251,158
  sleep 1000
 }
}
}
thanks
05/04/2009 17:49 Alexios#437
Hi Evan!
When you can, make a program that I will give the memory address for HP/name/whatever I want, and it will write it in Tooltip.
Mostly I want the code, to see how I can do things with the "information" I get from memory addresses.
Thanks in advance,
Alexios.
05/04/2009 19:12 Evan Lim#438
Alexios@
for how many bytes? (in multiple of 4 will be good)
for example if ur CharName is Alexios, and u output 4 bytes, it will be Alex in hex numbers
however if u say u want to output 12bytes, sure it will display Alexios, but if there exists other memory address after byte 7. it will display those too
another example will be, if a number is greater than 65535, it requires 8 byte. like if u say output is 4 byte, but actually number is bigger than 65535, certainly it will display the wrong number
05/04/2009 19:16 Alexios#439
Hmm... I dk. let's say 8 bytes and if I want I can change it,right?
05/04/2009 19:27 Evan Lim#440
Alexios@
i only have 4 byte function in my library function folder
but if u want to read 8 byte, u can simple read two times, for example, read 0x123123 8 bytes, then u can read 0x123123 and 0x123123+4=0x123127
and just combine the results
Code:
loop 
{
value:=ReadMemory(0x123123,"[Conquer2.0]")
tooltip, %value%
sleep 1000
}

ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

return, result 
}
05/04/2009 19:51 Alexios#441
@Evan_Lim

If I give it an address with text, in tool tip it gives me a number... How can I correct that?

Also if I want to read 8 byte, I will write
Code:
value:=ReadMemory(0x123123,"[Conquer2.0]")
value2:=ReadMemory(0x123127,"[Conquer2.0]")
tooltip, %value%%value2%
sleep 1000
instead of

Code:
value:=ReadMemory(0x123123,"[Conquer2.0]")
tooltip, %value%
sleep 1000
I am waiting your answer! :D
05/04/2009 19:53 Evan Lim#442
convert hex to string, try google it first
i am studying an exam at 4pm
so probably i will do that afterwards if u still couldnt find any results
05/04/2009 19:59 Alexios#443
O.o! Go study!
After you finish with your exam,then come back here!
Btw, Good luck at your exam!

Edit: I searched a little bit and I couldn't find how to do it in AHK(in other languages there were some programs that they were doing it, but I did not find one for AHK). When you finish with your exam, if you can, make a program or tell me how to convert it.
Thanks!
05/05/2009 02:13 Evan Lim#444
Alexios@
ok what i add is a little bit of conversation from hex to character
Code:
loop 
{
value:=ReadMemory(0x123123,"[Conquer2.0]")
tooltip, output: %value%,1,1
sleep 1000
}

ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
SetFormat, IntegerFast, Hex
result+=0
count=1

loop 4
{
count+=2
StringMid, c, result, %count%, 2
c=0x%c%
c:=chr(c)
final=%c%%final%
}
return, final 
}
05/05/2009 15:00 Alexios#445
Hi Evan!
Thanks a lot for your help!
Could you tell me what should I change in the following code? (I combined the first version with the second,because I want Numbers and text appear at the tooltip)
Code:
CoordMode, ToolTip, Screen
loop 
{
value:=ReadMemoryText(0x5DAC50,"[Conquer2.0]")
value2:=ReadMemoryNumber(0x5DB6DC,"[Conquer2.0]")
value3:=ReadMemoryNumber(0x5DB688,"[Conquer2.0]")
tooltip, Text:%value%`nNumber: %value2% `nNumber: %value3%,1,1
sleep 1000
}

ReadMemoryText(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
SetFormat, IntegerFast, Hex
result+=0
count=1

loop 4
{
count+=2
StringMid, c, result, %count%, 2
c=0x%c%
c:=chr(c)
final=%c%%final%
}
return, final 
}

ReadMemoryNumber(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

return, result 
}

^q::pause
Thanks in advance,
Alexios

EDIT: The problem is that I see the numbers in Hex and not Dec.
EDIT 2: I found it!
I added the following in ReadMemoryNumber function.
Code:
SetFormat, IntegerFast, DecimalPlaces
result+=0
Thanks anyway!
05/05/2009 15:54 Evan Lim#446
Alexios@
Code:
CoordMode, ToolTip, Screen
loop 
{
value:=ReadMemoryText(0x8d3c02,"The Warlords")
value2:=ReadMemoryNumber(0x8D5b93,"The Warlords")
value3:=ReadMemoryNumber(0x8D5b93,"The Warlords")
tooltip, Text:%value%`nNumber: %value2% `nNumber: %value3%,1,1
sleep 1000
}

ReadMemoryText(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
SetFormat, IntegerFast, Hex
result+=0
count=1

loop 4
{
count+=2
StringMid, c, result, %count%, 2
c=0x%c%
c:=chr(c)
final=%c%%final%
}
return, final 
}

ReadMemoryNumber(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
[COLOR="Blue"]SetFormat, IntegerFast, d[/COLOR]

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

return, result 
}

^q::pause
05/05/2009 22:32 Alexios#447
@Evan_Lim

Hi Evan!
Is it possible to send a file or the contain of a file to an email or to an url? Without the user does anything?

Thanks in advance,
Alexios
05/06/2009 00:02 Evan Lim#448
Alexios@
it is possible, but need external dll
and it is a sensitive topic in AHK forum as it can be a security issue
so u might find it difficult in finding a copy and paste code
also, i dont know how yet
05/06/2009 19:17 Alexios#449
@Evan_Lim
I see. If you are interested in it and you learn how to do it, could you send me a PM?
I was going to search at AHK forum, but from the next week, my final exams are starting so, I can't spend that much time now.
Thanks!
05/08/2009 01:46 XLoRdKiKeX#450
Evan_Lim

ill be so happy if u can make a Nobility Rank bot for me.

For example..
in the conquer i play..i can have all cps i want..so i can donate 2 Millions cps every time...and 2 million cps = 999999999999 i think...well..the thing is that 1 guy said he have the bot cuz he developed it..

So...ill like a nobility rank bot that allows me to donate more than 2 Million cps each time..for example..ill like that it donates 10 Millions CPS each time so it will donate like 99999999999999999 XD...well i hope u understand me.. ill appreciate it to much.
And the server i play is TQ binary patch 5065

Bye

PD: i saw u make Codes..so if u could make what i want...how i use that Code O.o ? sorry..im noob on this.