Code:
#RequireAdmin
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\DNIcon3.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Run_Tidy=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
#include <GuiListView.au3>
#include <Nomadmemory.au3>
#include <Array.au3>
#include <Misc.au3>
#include <Timers.au3>
#include <file.au3>
SetPrivilege("SeDebugPrivilege", 1)
#region ### START Koda GUI section ### Form=C:\Users\Forever30\Documents\My Hack Form.kxf
$Form1 = GUICreate("PlayDGN Trainer v78 - XKhen", 466, 250 + 20, 8, 8)
$Menu1 = GUICtrlCreateMenu("&Trainer")
$refresh = GUICtrlCreateMenuItem("Reset", $Menu1)
$acthot = GUICtrlCreateMenuItem("Activate Hotkey", $Menu1)
WinSetTrans($Form1, "", 240)
$Group1 = GUICtrlCreateGroup(" Teleport Box ", 8, 8, 321, 233)
$List1 = GUICtrlCreateListView("Name |X Coord |Y Coord |Z Coord ", 16, 24, 305, 149, $LVS_SINGLESEL, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT))
$hList1 = ControlGetHandle($Form1, '', $List1)
_GUICtrlListView_SetColumnWidth($List1, "", $LVSCW_AUTOSIZE)
$mname = GUICtrlCreateInput("", 16, 184, 65, 21)
$xcpy = GUICtrlCreateInput("0", 96, 184, 65, 21)
$ycpy = GUICtrlCreateInput("0", 176, 184, 65, 21)
$zcpy = GUICtrlCreateInput("0", 256, 184, 65, 21)
GUICtrlCreateUpdown($xcpy)
GUICtrlCreateUpdown($ycpy)
GUICtrlCreateUpdown($zcpy)
$add = GUICtrlCreateButton("Add", 16, 216, 49, 17)
$remove = GUICtrlCreateButton("Clear", 80, 216, 49, 17)
$teleport = GUICtrlCreateButton("Teleport", 144, 216, 49, 17)
$save = GUICtrlCreateButton("Save", 208, 216, 49, 17)
$load = GUICtrlCreateButton("Load", 272, 216, 49, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup(" Coordinates ", 336, 8, 121, 97)
$Label1 = GUICtrlCreateLabel("X:", 344, 32, 14, 17)
$Label2 = GUICtrlCreateLabel("Y:", 344, 48, 14, 17)
$Label3 = GUICtrlCreateLabel("Z:", 344, 64, 14, 17)
$copy = GUICtrlCreateButton("copy", 344, 80, 105, 17)
$xco = GUICtrlCreateLabel("0", 360, 32, 70, 17)
$yco = GUICtrlCreateLabel("0", 360, 48, 70, 17)
$zco = GUICtrlCreateLabel("0", 360, 64, 70, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup(" Utilities ", 336, 112, 121, 129)
$whc = GUICtrlCreateCheckbox("WallHack (Off)", 344, 136, 100, 17)
$ncd = GUICtrlCreateCheckbox("NoCooldown (Off)", 344, 160, 100, 17)
$Label4 = GUICtrlCreateLabel("Animation :", 344, 184, 56, 17)
$anim = GUICtrlCreateCombo("*Class*", 344, 208, 105, 25)
GUICtrlSetData(-1, "Warrior|Cleric|Academic|Archer|Sorceress", "")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
$button1status = 0
$button2status = 0
$pid = 0
$hotkey = 0
$process = "DragonNest.exe"
$timedelay = _Timer_Init()
$alhunting = 0
Global $hCMenu = GUICtrlCreateContextMenu($List1)
Global $hCMenuText = GUICtrlCreateMenuItem("Remove", $hCMenu)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $add
GUICtrlCreateListViewItem(GUICtrlRead($mname) & "|" & GUICtrlRead($xcpy) & "|" & GUICtrlRead($ycpy) & "|" & GUICtrlRead($zcpy), $List1)
Sleep(10)
GUICtrlSetData($mname, "")
GUICtrlSetData($xcpy, 0)
GUICtrlSetData($ycpy, 0)
GUICtrlSetData($zcpy, 0)
Case $copy
GUICtrlSetData($xcpy, GUICtrlRead($xco))
GUICtrlSetData($ycpy, GUICtrlRead($yco))
GUICtrlSetData($zcpy, GUICtrlRead($zco))
Case $remove
_GUICtrlListView_DeleteAllItems($hList1)
Case $hCMenuText
GUICtrlDelete(GUICtrlRead($List1))
Case $save ;save
$Count = _GUICtrlListView_GetItemCount($List1) ; find out how many items are in the listview
$File = FileSaveDialog("Save your coordinates", "", "Text files (*.txt)", 16, "*.txt")
If @error Then
MsgBox(0, "", "No file saved")
Else
For $I = 0 To $Count - 1 ; loop through the items in the listview
$sListviewItem = _GUICtrlListView_GetItemTextString($List1, $I) ; get the text of the items one at a time
FileWriteLine($File, $sListviewItem) ; write that info to the file
Next
EndIf
Case $load
Local $Read
$open = FileOpenDialog("Select coordinate settings", "", "Text files (*.txt)")
If @error Then
MsgBox(0, "File", "No File selected")
Else
_FileReadToArray($open, $Read)
For $I = 1 To $Read[0]
GUICtrlCreateListViewItem($Read[$I], $List1)
Next
EndIf
Case $teleport
$xcoordinate = _GUICtrlListView_GetItemText($List1, Int(_GUICtrlListView_GetSelectedIndices($List1)), 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, Int(_GUICtrlListView_GetSelectedIndices($List1)), 2)
_cor()
Case $whc
If $pid > 0 Then
If $button1status Then
$button1status = 0
GUICtrlSetData($whc, "WallHack (Off)")
Else
$button1status = 1
GUICtrlSetData($whc, "WallHack (On)")
EndIf
Else
Beep(1000, 500)
EndIf
Case $acthot
If $hotkey Then
$hotkey = 0
GUICtrlSetData($acthot, "Activate Hotkey")
Else
$hotkey = 1
GUICtrlSetData($acthot, "Deactivate Hotkey")
EndIf
Case $ncd
If $pid > 0 Then
If $button2status Then
$button2status = 0
GUICtrlSetData($ncd, "NoCooldown (Off)")
Else
$button2status = 1
GUICtrlSetData($ncd, "NoCooldown (On)")
EndIf
Else
Beep(1000, 500)
EndIf
Case $refresh
$pid = 0
TrayTip("Reset", "Reset Successful", 1)
EndSwitch
;Comment
If $pid = 0 And _Timer_Diff($timedelay) > 250 Then
$pid = ProcessExists($process)
If $pid > 0 Then
$hwnd = _MemoryOpen($pid)
$BaseAddr = _MemoryGetBaseAddress($hwnd, 1)
EndIf
ElseIf $pid > 0 And _Timer_Diff($timedelay) > 250 Then
_XValue()
_YValue()
_ZValue()
If _IsPressed(79) Then
If $alhunting Then
$alhunting = 0
TrayTip("Gem Bot", "West Armor Hunting Deactivated", 1)
Sleep(500)
Else
$alhunting = 1
TrayTip("Gem Bot", "West Armor Hunting Activated", 1)
Sleep(500)
EndIf
EndIf
If _IsPressed(78) Then
If $hotkey Then
$hotkey = 0
GUICtrlSetData($acthot, "Activate Hotkey")
TrayTip("", "F1-F5 hotkey Deactivated", 1)
Sleep(500)
Else
$hotkey = 1
GUICtrlSetData($acthot, "Deactivate Hotkey")
TrayTip("", "F1-F5 hotkey Activated", 1)
Sleep(500)
EndIf
EndIf
If $alhunting Then
$map = _MemoryRead(Dec("18ED84"), $hwnd)
If $map == 15 Then
$xcoordinate = 6550
$ycoordinate = 1999
_cor()
EndIf
If $map == 14 Then
$xcoordinate = -1200
$ycoordinate = -7449
_cor()
EndIf
EndIf
;If _IsToggled(14) Then
;Academic
If GUICtrlRead($anim) == "Academic" Then
If _IsPressed(57) Then
$ac = 124
_animationbar()
EndIf
;Warrior
ElseIf GUICtrlRead($anim) == "Warrior" Then
If _IsPressed(57) Then
$ac = 220
_animationbar()
EndIf
;Archer
ElseIf GUICtrlRead($anim) == "Archer" Then
If _IsPressed(57) Then
$ac = 90
_animationbar()
EndIf
;Cleric
ElseIf GUICtrlRead($anim) == "Cleric" Then
If _IsPressed(57) Then
$ac = 76
_animationbar()
EndIf
;Mage
ElseIf GUICtrlRead($anim) == "Sorceress" Then
If _IsPressed(57) Then
$ac = 68
_animationbar()
EndIf
EndIf
EndIf
;F1
If $hotkey Then
$Count = _GUICtrlListView_GetItemCount($List1)
If _IsPressed(70) Then
If _GUICtrlListView_GetItemCount($List1) == 0 Then
MsgBox(0, "No Records", "Please save atleast " & 1 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 0, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 0, 2)
_cor()
EndIf
EndIf
;F2
If _IsPressed(71) Then
If _GUICtrlListView_GetItemCount($List1) <= 1 Then
MsgBox(0, "No Records", "Please save atleast " & 2 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 1, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 1, 2)
_cor()
EndIf
EndIf
;F3
If _IsPressed(72) Then
If _GUICtrlListView_GetItemCount($List1) <= 2 Then
MsgBox(0, "No Records", "Please save atleast " & 3 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 2, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 2, 2)
_cor()
EndIf
EndIf
;F4
If _IsPressed(73) Then
If _GUICtrlListView_GetItemCount($List1) <= 3 Then
MsgBox(0, "No Records", "Please save atleast " & 4 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 3, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 3, 2)
_cor()
EndIf
EndIf
;F5
If _IsPressed(74) Then
If _GUICtrlListView_GetItemCount($List1) <= 4 Then
MsgBox(0, "No Records", "Please save atleast " & 5 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 4, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 4, 2)
_cor()
EndIf
EndIf
;ALT+1
If _IsPressed(12) And _IsPressed(31) Then
If _GUICtrlListView_GetItemCount($List1) <= 5 Then
MsgBox(0, "No Records", "Please save atleast " & 6 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 5, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 5, 2)
_cor()
EndIf
EndIf
;ALT+2
If _IsPressed(12) And _IsPressed(32) Then
If _GUICtrlListView_GetItemCount($List1) <= 6 Then
MsgBox(0, "No Records", "Please save atleast " & 7 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 6, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 6, 2)
_cor()
EndIf
EndIf
;ALT+3
If _IsPressed(12) And _IsPressed(33) Then
If _GUICtrlListView_GetItemCount($List1) <= 7 Then
MsgBox(0, "No Records", "Please save atleast " & 8 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 7, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 7, 2)
_cor()
EndIf
EndIf
;ALT+4
If _IsPressed(12) And _IsPressed(34) Then
If _GUICtrlListView_GetItemCount($List1) <= 8 Then
MsgBox(0, "No Records", "Please save atleast " & 9 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 8, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 8, 2)
_cor()
EndIf
EndIf
;ALT+5
If _IsPressed(12) And _IsPressed(35) Then
If _GUICtrlListView_GetItemCount($List1) <= 9 Then
MsgBox(0, "No Records", "Please save atleast " & 10 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 9, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 9, 2)
_cor()
EndIf
EndIf
;ALT+6
If _IsPressed(12) And _IsPressed(36) Then
If _GUICtrlListView_GetItemCount($List1) <= 10 Then
MsgBox(0, "No Records", "Please save atleast " & 11 - $Count & " more coordinate")
ElseIf $Count <> 0 Then
$xcoordinate = _GUICtrlListView_GetItemText($List1, 10, 1)
$ycoordinate = _GUICtrlListView_GetItemText($List1, 10, 2)
_cor()
EndIf
EndIf
;Else
_null()
;EndIf
;End of Hotkeys
;==========
;WH NCD
If $button1status Then
_whe()
Else
_whd()
EndIf
If $button2status Then
_ncde()
Else
_ncdd()
EndIf
EndIf
WEnd
Func _cor()
;X-axis
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("4c4"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("8"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("30"))
$ValueZ = _MemoryWrite($Static, $hwnd, $xcoordinate, "Float")
;Y-axis
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("4c4"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("8"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("38"))
$ValueZ = _MemoryWrite($Static, $hwnd, $ycoordinate, "Float")
EndFunc ;==>_cor
Func _XValue()
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("4c4"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("8"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("30"))
$ValueX = _MemoryRead($Static, $hwnd, "Float")
If $ValueX <> GUICtrlRead($xco) Then GUICtrlSetData($xco, $ValueX)
EndFunc ;==>_XValue
Func _YValue()
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("4c4"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("8"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("38"))
$ValueY = _MemoryRead($Static, $hwnd, "Float")
If $ValueY <> GUICtrlRead($yco) Then GUICtrlSetData($yco, $ValueY)
EndFunc ;==>_YValue
Func _ZValue()
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("4c4"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("8"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("34"))
$ValueZ = _MemoryRead($Static, $hwnd, "Float")
If $ValueZ <> GUICtrlRead($zco) Then GUICtrlSetData($zco, $ValueZ)
EndFunc ;==>_ZValue
Func _animationbar()
$Static = "0x" & Hex($BaseAddr + Dec("B1A4D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("6D0"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("10"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("140"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("14"))
$Pointer = _MemoryRead($Static, $hwnd)
$Static = "0x" & Hex($Pointer + Dec("54"))
$animation = _MemoryWrite($Static, $hwnd, $ac)
EndFunc ;==>_animationbar
Func _whe()
If $pid > 0 Then
$Write = _MemoryWrite(Dec("0056ED78"), $hwnd, '0x9090', 'byte[2]') ;Address GM
$Write = _MemoryWrite(Dec("0056ED85"), $hwnd, '0x909090', 'byte[3]') ;Address AOE
EndIf
EndFunc ;==>_whe
Func _whd()
If $pid > 0 Then
$Write = _MemoryWrite(Dec("0056ED78"), $hwnd, '0x8908', 'byte[2]') ;Address GM
$Write = _MemoryWrite(Dec("0056ED85"), $hwnd, '0x894808', 'byte[3]') ;Address AOE
EndIf
EndFunc ;==>_whd
Func _ncde()
If $pid > 0 Then
$ncde = _MemoryWrite(Dec("0065E1B3"), $hwnd, '0x9090d99fd8010000', 'byte[8]')
EndIf
EndFunc ;==>_ncde
Func _ncdd()
If $pid > 0 Then
$ncde = _MemoryWrite(Dec("0065E1B3"), $hwnd, '0x7a08d99fd8010000', 'byte[8]')
EndIf
EndFunc ;==>_ncdd
Func _null()
EndFunc ;==>_null