Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Adding offsets

Discussion on Adding offsets within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2014
Posts: 4
Received Thanks: 0
Adding offsets

Hello, I've something like this

And I want to ask - how should I add this?
This is what I wrote, but.. You know.. It isn't works.
Code:
 
Func Check()
$1 = "07340230" + "0x310"
$2 = $1 + "0x258"
$3 = $2 + "0x68"
$4 = $3 + "0x7E0"
$5 = $4 + "22C"
$points= $4 + "0x22C"
MsgBox(0, "", $points)
EndFunc
Pan Stefan.
Pan69Stefan is offline  
Old 05/04/2015, 20:22   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Better use _MemoryPointerRead.
$aOffset[] = [0, ....]

$a = _MemoryPointerRead
[0] = address
[1] = value
alpines is offline  
Old 05/04/2015, 20:37   #3
 
elite*gold: 0
Join Date: Sep 2014
Posts: 4
Received Thanks: 0
I don't really know how to do that, can u help me?
How it should looks like?
Code:
$aOffset[]=[0, 310, 258, 68, 7e0, 22c]
$a = _MemoryPointerRead(?, $MemoryOpen, ?)
Pan Stefan.
Pan69Stefan is offline  
Old 05/04/2015, 21:04   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Use it like this.

$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(07340230, $hOpen, $aOffset)
$a[0] = dynamic address
$a[1] = value

If this doesn't work switch the order of the offsets but keep the zero.
$aOffset[6] = [0, 0x22C, ........, 0x310]
alpines is offline  
Old 05/04/2015, 22:16   #5
 
FacePalmMan's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 426
Received Thanks: 129
Pointers dont work like: Address = Base + Offset1 + Offset2 + Offset3 + Offset4
They work like: Address = Read(Read(Read("base" + Offset1) + Offset2) + Offset3) + Offset4

Its like following a path. You read the "base" address, which gives you the next address. You go to the address the base gave you, and it gives you the address of the third one, and so on, until you find your destination.
The offsets only mark how far the way to those addresses needs to be corrected.
FacePalmMan is offline  
Old 05/05/2015, 19:06   #6
 
elite*gold: 0
Join Date: Sep 2014
Posts: 4
Received Thanks: 0
So, I've wrote something like this.
Code:
Func Check()
$hOpen = _MemoryOpen(ProcessExists("NostaleX.dat"))
$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(08880230, $hOpen, $aOffset)
MsgBox(0, "", $a[1])
EndFunc
And the bot crashes. Switching the order of the offsets didn't help.

Pan Stefan.
Pan69Stefan is offline  
Old 05/09/2015, 10:24   #7
 
FacePalmMan's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 426
Received Thanks: 129
Quote:
Originally Posted by Pan69Stefan View Post
So, I've wrote something like this.
Code:
Func Check()
$hOpen = _MemoryOpen(ProcessExists("NostaleX.dat"))
$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(08880230, $hOpen, $aOffset)
MsgBox(0, "", $a[1])
EndFunc
And the bot crashes. Switching the order of the offsets didn't help.

Pan Stefan.
Is this the full bot? because if this is all you wrote, you should think about what a function is, and why it exists.
FacePalmMan is offline  
Reply


Similar Threads Similar Threads
Adding NPC's and Adding Items in Shopping Mall
03/19/2015 - CO2 Private Server - 21 Replies
Hello there, I have an 5518 source; Albetros Source. Now I have a few questions about it. 1. How do you add new NPC's and where can I find them in the Source? 2. How to add items in the Shopping Mall. I tried a few things but that didn't helped me alot. 3. How to set game char to GM. I tried to give it 5 but that didn't helped either. I looked in the Commands file and that was 5. But it didn't helped. Thanks...
[Request Help] In adding new Uniques Spawn + adding its notice
03/14/2013 - SRO Private Server - 13 Replies
Hello ... I am learning some DB Editing .. i wanted any one to explain HOW TO , add new unique spawn at one place , like add a Devil shitan at jangan door ever 2 hours from last kill .. ++ i wanted to know how to add Unique Notice .. like " Demon shitan has appeared in Roc Mt. "



All times are GMT +2. The time now is 04:29.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.