Jump to content

Autoit Delphi Translation.


Recommended Posts

Hello guys.

I am looking for someone who would translate some code from AutoIT to delphi. I would even be willing to pay for it.

The code is the following :

#include <EditConstants.au3>

#include <GUIConstantsEx.au3>

#include <ListViewConstants.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#include <NomadMemory.au3>

#include <GuiListView.au3>

Global $BASE_ADDRESS = 0x009F450C

Global $BASE_OFFSET = 0x20

Global $TARGET_OFFSET = 0xB00

Global $PID = ProcessExists("elementclient.exe")

Global $startmob = 0

Global $endmob = 700

$hGuiMain = GUICreate("Test GUI", 478, 510, 192, 124)

$Label1 = GUICtrlCreateLabel("Your Targets ID:", 4, 4, 82, 17)

$Label2 = GUICtrlCreateLabel("Scan Mobs from:", 200,4,-1,17)

$Label3 = GUICtrlCreateLabel("to:", 340,4,-1,17)

$InputTargetID = GUICtrlCreateInput("0x00000000", 88, 2, 93, 21)

$InputMobStart = GUICtrlCreateInput("0", 285, 2, 50, 21)

$InputMobEnd = GUICtrlCreateInput("750", 360, 2, 50, 21)

$Buttonstart = GUICtrlCreateButton("Start",420,4,45,20)

$ListViewMobList = GUICtrlCreateListView("ID |NAME|LVL|X|Y|Z", 4, 28, 468, 476)

GUISetState(@SW_SHOW)

While 1

Switch GUIGetMsg()

Case $GUI_EVENT_CLOSE

Exit

Case $Buttonstart

GET_MOBS_LIST()

EndSwitch

_GetTarget()

WEnd

Func _Exit()

Exit

EndFunc ;==>_Exit

Func _GetTarget()

$address = _FindNewAddress($BASE_ADDRESS, $BASE_OFFSET)

$address = _FindNewAddress($address, $TARGET_OFFSET)

$id = _MemoryOpen(ProcessExists("elementclient.exe"))

$tarid = _MemoryRead($address, $id)

GUICtrlSetData($InputTargetID, "0x" & Hex($tarid))

_MemoryClose($id)

EndFunc ;==>_GetTarget

Func MONSTER($OFSET, $INFO, $TYPE = 0, $NAME = 0)

$PROCESS = _MemoryOpen($PID)

$READPOINTER = "0x" & Hex(_MemoryRead($BASE_ADDRESS, $PROCESS) + 8, 8)

$READPOINTER = _FindNewAddress($READPOINTER, 36)

$READINFO = _FindNewAddress($READPOINTER, 24)

$READINFO = _FindNewAddress($READINFO, $OFSET)

$READINFO = _FindNewAddress($READINFO, 4)

$READINFO = _FindNewAddress($READINFO, $INFO)

If $NAME == 1 Then

$READINFO = _FindNewAddress($READINFO, 0)

EndIf

If $TYPE == 0 Then

Return _MemoryRead($READINFO, $PROCESS)

ElseIf $TYPE = 1 Then

Return _MemoryRead($READINFO, $PROCESS, "wchar[64]")

Else

Return (_MemoryRead($READINFO, $PROCESS, "float"))

EndIf

_MemoryClose($PROCESS)

EndFunc ;==>MONSTER

Func GET_MOBS_LIST()

Local $MobInfos = ""

Local $startmob = GUICtrlRead($InputMobStart)

Local $endmob = GUICtrlRead($InputMobEnd)

_GUICtrlListView_DeleteAllItems($ListViewMobList)

Local $I = $startmob

GUICtrlSetData($Buttonstart,"Stop")

For $I = $startmob To $endmob

$I += 1

$A = "0x" & Hex($I * 4)

$T_ID = MONSTER($A, 284)

$MONLVL = MONSTER($A, 292)

$MONX = Int(("0x" & Hex(MONSTER($A, 60, 3))) / 10 + 400)

$MONY = Int(("0x" & Hex(MONSTER($A, 68, 3))) / 10 + 550)

$MONZ = Int(("0x" & Hex(MONSTER($A, 64, 3))) / 10)

$MONNAME = MONSTER($A, 596, 1, 1)

$MobInfos = "0x" & Hex($T_ID) & "|" & $MONNAME & "|" & $MONLVL & "|" & $MONX & "|" & $MONY & "|" & $MONZ

If $MONLVL <> 0 Then

GUICtrlCreateListViewItem($MobInfos, $ListViewMobList)

EndIf

_GetTarget()

TrayTip("Scanning Mobs", $I & "/" & $endmob, 0)

If GUIGetMsg() = $Buttonstart Then

$I = $endmob

EndIf

Next

GUICtrlSetData($Buttonstart,"Start")

TrayTip("","",0)

EndFunc ;==>GET_MOBS_LIST

Func _FindNewAddress($POINTER, $OFFSET)

$PROCESS = _MemoryOpen($PID)

Return "0x" & Hex(_MemoryRead($POINTER, $PROCESS) + $OFFSET, 8)

_MemoryClose($PROCESS)

EndFunc ;==>_FindNewAddress

The nomadmemory unit is commonly avaliable over the internet.

If anyone is interested, then please pm me.

I will pay money only if I can compile the code with delphi 7. Payable over paypal.

Thank you.

Link to comment
Share on other sites

  • Moderators

Manuel,

We do not support game bots in this forum - read here.

So best you go and ask somewhere else. Bye-bye. :mellow:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...