questions zu decrypt and basepointer

02/06/2010 03:13 zhadow32#61
Quote:
Originally Posted by FeonDust View Post
Guys, try making your own first. I'm sure people will reply to this thread to help you out, including me.

What I first did was google "WoW autoit level bot" and looked at the codes of a few bots to understand how to create my own. Look carefully at how functions work, they're a lifesaver.

You'll want to figure out which kind of bot you want to make. The first bot is mainly used for high HP chars.
What mine does is hit "D" to turn the character, and then "TAB" to lock onto a monster. After it's locked on, it'll go and attack, then use a potion if necessary and repeat. This means the char will eventually run around the entire map killing every kind of monster. This kind of bot is bad for aggro monsters, as you will get ganged up and probably will die pretty quickly if you're not looking at the screen.

The second kind is a lot safer, but a lot slower at leveling. You set your char in the middle of a map, and the bot will have your char sit until an aggro attacks you. It'll detect the monster and attack until the monster is dead, loot, and sit back down until another monster attacks.

After that, you can either do pixel detection or memory read for monster detection and healing. For my first bot I used pixel detection which totally sucked for using potions, because there are very few places you can detect the HP color because of your HP text.

Which led me to working on memory reading. Search on the AutoIT forum about "nomadmemory" and "_MemoryRead" to get some examples. Working with this took me about 4 days to figure out..but once your script successfully reads the values you want, you're in business.
nice to know someone else is doing GF bots, i have two questions, can u help me with making a memory based bot? and are u able to controlsend to GF while its inactive?
also a good way to make ur attck bot is to make it search the white or red color of monsters name with pixeldetection.if u know how to do it then do this
search for the pixel if its there then make a func using ur desired attacks.
if it doesnt find any pixel then use a func attck that has tab in it.
it works cuz , mines working, also the pixelbased auto HP-MP works for me, just get the pixel next to the '/' in ur amount since that pixel never changes.
02/06/2010 13:28 Alucard#62
MY NOT COMPLETELY WORKING BOT

HTML Code:
#include <GUIConstantsEx.au3> 
GUICreate("AutoIT", 335, 100) 
GUISetState(@SW_SHOW) 

If WinExists("XXX") Then
	WinActivate("XXX")
	WinWaitActive("XXX")
EndIf

While1
	If PixelGetColor (560, 70) = 0x00FF00 Then            
		Send("1")             
	Else
		Sleep (1000)
		Send("3")
		Sleep (1000)
		Send("2")
	EndIf 
WEnd
(560, 70) <-- there it detects the color of the level, change it to the pixel u want

0x00FF00 <-- thats the color of the level. in this case it detects only green, lowerlevel mobs

("1") <-- there is the attack
("3") <-- loot items
("2") <-- sit down

the bot doesnt work yet, it spams the keys all the time. detection and killing works fine, but it keeps pressing "2" if no mob is attacking u, so that u sit down and stand up in a big loop, until u get attacked again ... if anyone could help?
02/06/2010 17:36 zhadow32#63
Quote:
Originally Posted by Alucard View Post
MY NOT COMPLETELY WORKING BOT

HTML Code:
#include <GUIConstantsEx.au3> 
GUICreate("AutoIT", 335, 100) 
GUISetState(@SW_SHOW) 

If WinExists("XXX") Then
	WinActivate("XXX")
	WinWaitActive("XXX")
EndIf

While1
	If PixelGetColor (560, 70) = 0x00FF00 Then            
		Send("1")             
	Else
		Sleep (1000)
		Send("3")
		Sleep (1000)
		Send("2")
	EndIf 
WEnd
(560, 70) <-- there it detects the color of the level, change it to the pixel u want

0x00FF00 <-- thats the color of the level. in this case it detects only green, lowerlevel mobs

("1") <-- there is the attack
("3") <-- loot items
("2") <-- sit down

the bot doesnt work yet, it spams the keys all the time. detection and killing works fine, but it keeps pressing "2" if no mob is attacking u, so that u sit down and stand up in a big loop, until u get attacked again ... if anyone could help?
ok i kinda fixed the spam part and added better things, if probs tell me or PM me..
keys it uses
2 2nd most
3 used the most
4 3rd most
5-only use once
all attacks
7 loot
and of course tab

here: run as admin, oh and i think this works for aggro monster only
[Only registered and activated users can see links. Click Here To Register...]
02/07/2010 01:30 Alucard#64
could u please upload the script, i am to dumb to edit this exe xD
02/14/2010 06:37 FeonDust#65
Quote:
Originally Posted by zhadow32 View Post
nice to know someone else is doing GF bots, i have two questions, can u help me with making a memory based bot? and are u able to controlsend to GF while its inactive?
also a good way to make ur attck bot is to make it search the white or red color of monsters name with pixeldetection.if u know how to do it then do this
search for the pixel if its there then make a func using ur desired attacks.
if it doesnt find any pixel then use a func attck that has tab in it.
it works cuz , mines working, also the pixelbased auto HP-MP works for me, just get the pixel next to the '/' in ur amount since that pixel never changes.
ControlSend works fine in chat, but for some reason doesn't work to control the character or do hotkeys.
Easier way is once you learn the memory reading for AutoIT, there's a nifty address. Value 0 when you don't have a monster selected, and 1 when the monster status is at the top of your screen.


Code:
Global $ProcessID = ProcessExists("GrandFantasia.exe")
Global $HPPointer = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $HPOffset1 = Dec("8")
Global $HPOffset2 = Dec("4")
Global $MPPointer = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $MPOffset1 = Dec("8")
Global $MPOffset2 = Dec("8")
Global $MonsterADD = IniRead("gfbot.ini", "Main", "MonsterAddress", "0")
Code:
$MemOpen = _MemoryOpen($ProcessID)
	$CurrentHP = _MemoryRead($HPPointer, $MemOpen)
	$LVL1 = '0x' & Hex($CurrentHP + $HPOffset1)
	$CurrentHP = _MemoryRead($LVL1, $MemOpen)
	$LVL2 = '0x' & Hex($CurrentHP + $HPOffset2)
	$CurrentHP = _MemoryRead($LVL2, $MemOpen)
	$CurrentMP = _MemoryRead($MPPointer, $MemOpen)
	$MP1 = '0x' & Hex($CurrentMP + $MPOffset1)
	$CurrentMP = _MemoryRead($MP1, $MemOpen)
	$MP2 = '0x' & Hex($CurrentMP + $MPOffset2)
	$CurrentMP = _MemoryRead($MP2, $MemOpen)
	$MonsterDetect = _MemoryRead($MonsterADD, $MemOpen)
	_MemoryClose($ProcessID)
Alright, took that out from my bot, so you'll have to edit it a little. Replace the two IniReads for HP and MP with 0x00(whatever current char base pointer is) and the IniRead from $MonsterADD with the monster address I told you about earlier in the post. It's a static address, so no need grabbing a pointer for it.
I just have it read from an .ini file because it's a lot easier to replace the address after each game update, than to repackage a new .exe each time.

You can test to see if it's reading your values by placing this before _MemoryClose
Code:
MsgBox("Info", "Result", $CurrentHP)
MsgBox("Info", "Result", $CurrentMP)
MsgBox("Info", "Result", $MonsterDetect)
The rest is up to you :P.

Right, almost forgot. YOU MUST HAVE NomadMemory.au3 in your /includes folder for AutoIT.

Also, if you have Vista/Win7 you need to add this at the top of your script or else it won't read values.
Code:
#RequireAdmin
02/17/2010 07:02 zhadow32#66
Damn how didn't I se this earlier? Lol , anyhow tHanx a bunch, 1 am here so I'll check it 2morow, again thanx.. But how did u gEt the pointer? Game keeps crashing on me.
02/18/2010 05:26 zhadow32#67
i finally found a way to find the pointers but need help with setiing up the autoit script

heres the pointer info
Quote:
EAX=0000032E
EBX=00395C23
ECX=050653D8
EDX=05B4D158
ESI=050653D8
EDI=00000000
EBP=0012FD58
ESP=0012FC14
EIP=004518F2

Probable base pointer =05B4D158

004518e7 - mov edx,[esi+08]
004518ea - mov eax,[esp+10]
004518ee - mov [edx+edi*4+04],eax
004518f2 - pop edi
004518f3 - pop esi
and is this correct? i know i need the cap for health but just tell me if the idea is correct
Quote:
#RequireAdmin
#include <NomadMemory.au3>

Global $ProcessID = ProcessExists("GrandFantasia.exe")
Global $HPPointer =
Global $HPOffset1 = Dec("4")
Global $HealthPercent = $CurrentHP / $MaxHP * 100

$MemOpen = _MemoryOpen($ProcessID)
$CurrentHP = _MemoryRead($HPPointer, $MemOpen)
$LVL1 = '0x' & Hex($CurrentHP + $HPOffset1)
$CurrentHP = _MemoryRead($LVL1, $MemOpen)
_MemoryClose($ProcessID)

While 1
if $HealthPercent = 50 Then
Send(pots)
EndIf
WEnd
thanx for getting me this far
02/18/2010 16:55 ck_fizz#68
could you guys send the bot with me? sorry i dont know autoit. would really thank you guys if you could send it to me.. email is [Only registered and activated users can see links. Click Here To Register...] thanks
02/18/2010 17:04 ck_fizz#69
could you guys send the bot with me? sorry i dont know autoit. would really thank you guys if you could send it to me.. email is [Only registered and activated users can see links. Click Here To Register...] thanks
02/19/2010 04:14 FeonDust#70
The static pointers in this game need multi-level pointer.

When you find your HP address, and see what accesses, find any of the addresses in the list that have a +4 in the brackets, since we know the first HP offset is a +4.

Double click that, and it'll bring up the box which you have shown. The "Probable base pointer" must be scanned like a value. Copy the address, and checkmark "Hex" next to the value box. Make sure it's on 4byte and paste the address and then scan.

After the search is done, double click the first couple addresses in the list and "Find out what accesses" again. For every single pointer I've found, the second offset is almost always +8, so pick an address with a +8 in the brackets.

Do the same thing with "Probable pointer", scan 4byte with Hex checkmarked, and you'll find your green static base pointer address.


For every pointer you want to do, you have to repeat the process until you find a green/static address. The address you find when doing thie search described above can be used for almost every single one of the pointers you will search for.

This means you only need to scan and "Find what accesses" once, since the base will almost always be static addy +8 offset. CE and AutoIT will automatically calculate the addresses, so all you'll need is that second offset you get when you do your first "Find what accesss"
02/19/2010 22:52 zhadow32#71
uhm a bit confused, i found the adrss for hp, then found the probable pointer, search that up in hex, see what access it the offset is +4 like always, did it again for new pointer, got offset +8, i took the probable pointer from that and scanned it, i got the green(static)adress.

so do i just take the two probable pointers and the two offsets and make the script like urs just changing the parts that has the ini file with the pointers?
one more thing i dont use the static pointer in the script, correct?

and thank you for getting me this far, once again
02/20/2010 01:03 budrys11#72
zhadow32 how did you manage to find that static address while gf crashes after attaching debugger? what software do you use?

EDIT:
ok i've found out how to find those, just need to use pointer scan
but there's one more problem
reseult of searching pointer was like that:
GrandFantasia.exe+005A29A0 OFFSET0:+8 OFFSET1:+4

how i am supposed to read that value (HP)?
is it something like that (pseudocode):
HP = readmem(readmem(readmem(005A29A0)+8)+4)
i tried using delphi under windows 7 with windows xp compatibility mode and it shows me not correct value, other than cheat engine does

EDIT2:
ok, i got it now: GrandFantasia.exe+005A29A0 means 00400000+005A29A0
02/22/2010 05:45 FeonDust#73
Quote:
Originally Posted by zhadow32 View Post
uhm a bit confused, i found the adrss for hp, then found the probable pointer, search that up in hex, see what access it the offset is +4 like always, did it again for new pointer, got offset +8, i took the probable pointer from that and scanned it, i got the green(static)adress.

so do i just take the two probable pointers and the two offsets and make the script like urs just changing the parts that has the ini file with the pointers?
one more thing i dont use the static pointer in the script, correct?

and thank you for getting me this far, once again
Sorry for the late reply.

The two variables $HPOffset and $MPOffset read the same address from my .ini, which is the green address you found. As long as you have that green address, you don't need any other address, only the offset numbers, which are listed below the address in my snippet.

Just replace it so it reads like:
Global $HPPointer = 0x009xxxxx
Or whatever the current static is at.

Quote:
Originally Posted by budrys11 View Post
how i am supposed to read that value (HP)?
is it something like that (pseudocode):
HP = readmem(readmem(readmem(005A29A0)+8)+4)
i tried using delphi under windows 7 with windows xp compatibility mode and it shows me not correct value, other than cheat engine does

EDIT2:
ok, i got it now: GrandFantasia.exe+005A29A0 means 00400000+005A29A0
Yes, you've found it. Just look back at page 7 towards the bottom now.
So it would be:
Global $HPPointer = 0x009A29A0
02/22/2010 20:54 zhadow32#74
thanx for the reply, but i found out how to use it, thanx anyways

i just need help in making the gui for it, where the user inserts the percent at which they would like the pots to be used at, it works fine without the gui and in set predetermined percent, but i have a couple of problems, first i cannot click on anything in the gui i have to tab click to get to the insert and start button, i have two while statements one one whithin the func which has the gui within and the while statement in which the bot reads the memory and uses the pots, also i have a label boe which is suppose to represent the current health, i replace the text with $currenthealth, but when the gui is started you cannot see the current health.

if you need to see the script just ask and ill PM it. thanx

EDIT:
ok i fixed it, it works like i wanted it too, thanx for all of you that helped!
04/07/2010 19:51 rjmafia#75
hi thanks for this topic am able to make my bot...
ok the problem is the base pointer of the monster...
u only give a monster detect base pointer which is only 0 or 1...
i want to detect the monster hp so that i can only attack a specific monster
or if he select a world boss he freaking run away to him. is this possible
please help me get the base pointer of the monster hp...
tyvm for this topic