Register for your free account! | Forgot your password?

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

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

Advertisement



Offset and adress read Problem. FOR HP Autopot short code...

Discussion on Offset and adress read Problem. FOR HP Autopot short code... within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 2
Received Thanks: 0
Question Offset and adress read Problem. FOR HP Autopot short code...

#Include <NomadMemory.au3>


WinActivate ("*** Online ")
Do
$PID = _MemoryOpen(WinGetProcess("*** Online") )

$Adresse = 0x0143C888
Dim $Offset[2] = [0, 0x3b8]
While 1
$Process = _MemoryOpen(ProcessExists("client.exe"))
If Not @error Then
$HP = _MemoryPointerRead($Adresse, $Process, $Offset)
If Not @error Then ToolTip($HP[1], 0, 0)
_MemoryClose($Process)
if $HP < 5000 Then
Send("9")
sleep (5000)
EndIf
Sleep(400)
EndIf
Sleep(100)
WEnd

Until GuiGetMsg()

im new start autoit where i can fault? my char hp error read..i search forum but very code not read char hp...i need offset and adress read after hp pot used...Thanks
wiz88 is offline  
Old 05/04/2014, 18:34   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
try $HP[2] instead of $HP[1]


or try convert your value into 4 bytes
fear-x is offline  
Thanks
1 User
Old 05/05/2014, 17:16   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
"$HP[2]" will produce an error. The return value is an array with two elements. The first element contains the address and the second one contains the value. If you try to access the third element, the range is exceeded and an error occurs.


KDeluxe is offline  
Thanks
1 User
Old 05/15/2014, 00:13   #4
 
Mr.Netwolf's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 80
Received Thanks: 6
well i can see one problem
or at least i had my problems with that
Quote:
Dim $Offset[2] = [0, 0x3b8]
try changing these lines
Code:
Dim $Offset[2] 
$Offset[0] = 0
$offset[1] = 0x3b8
or try my script
Offset[0] would be 1 in your case.
and Offset[1] obviously 0x3b8
$HP = _memoryread(finaladdress(blbablabla), $process)
If Not @error Then ToolTip($HP, 0, 0)
you only need $vtype for debugs in case your value is a float or Hex.

btw inttofloat() is not my own work. but it works like a charm to turn integer into float

theres some debugs in the function to show you the results of pointer conversion and ofc the value of the read. you just need to remove the ;

Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.10.2
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <NomadMemory.au3>

func finaladress($pointer, $offset, $vtype, $ProcessID)
dim $value
dim $i
dim $read
if IsArray($offset) Then
$value = _MemoryOpen($ProcessID)
	for $i = 1 to  $offset[0]
$pointer = _MemoryRead($pointer, $value) + $offset[$i]
Next
_MemoryClose($value)
EndIf
$value = _MemoryOpen($ProcessID)
$read = _MemoryRead($pointer, $value)
if $vtype = "float" Then
$read = IntToFlt($read)
ElseIf $vtype = "hex" Then
$read = Hex($read)
EndIf
_MemoryClose($value)
;MsgBox(16,"test",hex($pointer))
;MsgBox(16,"test",$read)
Return $pointer
EndFunc
;credits to some random on the net... lol
Func IntToFlt($iVal)
Local $result
$fs = DllStructCreate("float")
$is = DllStructCreate("int64",DllStructGetPtr($fs))

DllStructSetData($is,1,$iVal)

$result =  DllStructGetData($fs,1)
$fs = 0
$is = 0
return $result

endfunc
Mr.Netwolf is offline  
Thanks
1 User
Old 05/15/2014, 08:47   #5
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Quote:
Originally Posted by Mr.Netwolf View Post
try changing these lines
Code:
Dim $Offset[2] 
$Offset[0] = 0
$offset[1] = 0x3b8
Using that instead of
Code:
Dim $Offset[2] = [0, 0x3B8]
would bring no change. Actually the 2nd version is better.
alpines is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Marvel Update Short Code For Disable AI and Agent
11/17/2013 - Facebook - 1 Replies
Note... Disable Leethax In Firefox To See The Code 1st Scan.... d0 30 20 80 ?? 63 05 d1 ?? ?? 00 00 ?? 48 Change to... d0 30 20 40 ?? 63 05 d1 ?? ?? 00 00 ?? 48 1st Scan.... 11 e8 ff ff 08 ?? 08 ?? 26 48 00 00 Change to.... 11 e8 ff ff 08 ?? 08 ?? 27 48 00 00 Do this Two Code beacause If only 1 Code Maybe The Other Ai will Attack you...
Base Adress + sein static Offset
04/06/2012 - General Coding - 2 Replies
Also ich möchte vom BasePointer seinen static Offset finden, ohne CE,Olly oder andere solche Programme zu nutzen Alle kennen ja sowas als Pointer: Client.exe+0x7218(->such ich) und meine Frage ist, ob man diesen offset herausfinden kann und wenn ja wie ? wenn ich den offset habe ist es leicht den ointer zu finden normalerweise mach ich das so solange ich den offset hab, aber wie bekommt man den offset, ohne wie gesagt CE,Olly usw zu benutzen ?
Finding Values/Offset of the following: *read me*
05/27/2011 - Need for Speed World - 3 Replies
Hello, good day! I am Looking for a tutorial that would let me do the following: - How to find the offset of pursuit loader. - How to find 'tagged cops' / 'killed cops'. - Tank Mode - Speed hack (the one like Deerhunter had) So far that's more important there is to it. I don't know exactly what value to search in game nor what type it is.
[Release]Twelve Sky AutoPot/Offset Information
01/03/2010 - General Gaming Discussion - 10 Replies
UPDATED. This is for Client 1.10 and works as of July 25, 2008. Here is an Auto HP/MP Pill or Meditation program I've been working on. Place HP Pills in the 1st or 2nd Pill slots and MP Pills in the 3rd and 4th Pill slots. You can also choose to enable auto meditation instead to restore your MP. You will need to set the Key to your meditation key(F1-F8). The default setting is F5 for the MedKey and Meditation is on by default. You can also set the HP/MP percent, the percent of...
Autopot adress mayn games
09/09/2009 - 12Sky2 - 4 Replies
i cant find the adress in the cheatengine... can any1 post them? pls



All times are GMT +1. The time now is 01:31.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.