Jump to content
Sign in to follow this  
d4xyjen

Need help send while minimize

Recommended Posts

d4xyjen

my friend gives me this code can anyone help me or modify this code to send in the windows while minimized?

$TITLE = WinGetTitle("[CLASS:ZElementClient Window]")

$WINNAME1 = WinSetTitle($TITLE, "", "ZX Online Bot")

$WINNAME = WinGetTitle("ZX Online Bot")

#region

#endregion

Global Const $GUI_EVENT_CLOSE = -3

Global Const $GUI_EVENT_MINIMIZE = -4

Global Const $GUI_EVENT_RESTORE = -5

Global Const $GUI_EVENT_MAXIMIZE = -6

Global Const $GUI_EVENT_PRIMARYDOWN = -7

Global Const $GUI_EVENT_PRIMARYUP = -8

Global Const $GUI_EVENT_SECONDARYDOWN = -9

Global Const $GUI_EVENT_SECONDARYUP = -10

Global Const $GUI_EVENT_MOUSEMOVE = -11

Global Const $GUI_EVENT_RESIZED = -12

Global Const $GUI_EVENT_DROPPED = -13

Global Const $GUI_RUNDEFMSG = "GUI_RUNDEFMSG"

Global Const $GUI_AVISTOP = 0

Global Const $GUI_AVISTART = 1

Global Const $GUI_AVICLOSE = 2

Global Const $GUI_CHECKED = 1

Global Const $GUI_INDETERMINATE = 2

Global Const $GUI_UNCHECKED = 4

Global Const $GUI_DROPACCEPTED = 8

Global Const $GUI_NODROPACCEPTED = 4096

Global Const $GUI_ACCEPTFILES = $GUI_DROPACCEPTED

Global Const $GUI_SHOW = 16

Global Const $GUI_HIDE = 32

Global Const $GUI_ENABLE = 64

Global Const $GUI_DISABLE = 128

Global Const $GUI_FOCUS = 256

Global Const $GUI_NOFOCUS = 8192

Global Const $GUI_DEFBUTTON = 512

Global Const $GUI_EXPAND = 1024

Global Const $GUI_ONTOP = 2048

Global Const $GUI_FONTITALIC = 2

Global Const $GUI_FONTUNDER = 4

Global Const $GUI_FONTSTRIKE = 8

Global Const $GUI_DOCKAUTO = 1

Global Const $GUI_DOCKLEFT = 2

Global Const $GUI_DOCKRIGHT = 4

Global Const $GUI_DOCKHCENTER = 8

Global Const $GUI_DOCKTOP = 32

Global Const $GUI_DOCKBOTTOM = 64

Global Const $GUI_DOCKVCENTER = 128

Global Const $GUI_DOCKWIDTH = 256

Global Const $GUI_DOCKHEIGHT = 512

Global Const $GUI_DOCKSIZE = 768

Global Const $GUI_DOCKMENUBAR = 544

Global Const $GUI_DOCKSTATEBAR = 576

Global Const $GUI_DOCKALL = 802

Global Const $GUI_DOCKBORDERS = 102

Global Const $GUI_GR_CLOSE = 1

Global Const $GUI_GR_LINE = 2

Global Const $GUI_GR_BEZIER = 4

Global Const $GUI_GR_MOVE = 6

Global Const $GUI_GR_COLOR = 8

Global Const $GUI_GR_RECT = 10

Global Const $GUI_GR_ELLIPSE = 12

Global Const $GUI_GR_PIE = 14

Global Const $GUI_GR_DOT = 16

Global Const $GUI_GR_PIXEL = 18

Global Const $GUI_GR_HINT = 20

Global Const $GUI_GR_REFRESH = 22

Global Const $GUI_GR_PENSIZE = 24

Global Const $GUI_GR_NOBKCOLOR = -2

Global Const $GUI_BKCOLOR_DEFAULT = -1

Global Const $GUI_BKCOLOR_TRANSPARENT = -2

Global Const $GUI_BKCOLOR_LV_ALTERNATE = -33554432

Global Const $GUI_WS_EX_PARENTDRAG = 1048576

Global Const $SS_LEFT = 0

Global Const $SS_CENTER = 1

Global Const $SS_RIGHT = 2

Global Const $SS_ICON = 3

Global Const $SS_BLACKRECT = 4

Global Const $SS_GRAYRECT = 5

Global Const $SS_WHITERECT = 6

Global Const $SS_BLACKFRAME = 7

Global Const $SS_GRAYFRAME = 8

Global Const $SS_WHITEFRAME = 9

Global Const $SS_SIMPLE = 11

Global Const $SS_LEFTNOWORDWRAP = 12

Global Const $SS_BITMAP = 15

Global Const $SS_ETCHEDHORZ = 16

Global Const $SS_ETCHEDVERT = 17

Global Const $SS_ETCHEDFRAME = 18

Global Const $SS_NOPREFIX = 128

Global Const $SS_NOTIFY = 256

Global Const $SS_CENTERIMAGE = 512

Global Const $SS_RIGHTJUST = 1024

Global Const $SS_SUNKEN = 4096

Global Const $GUI_SS_DEFAULT_LABEL = 0

Global Const $GUI_SS_DEFAULT_GRAPHIC = 0

Global Const $GUI_SS_DEFAULT_ICON = $SS_NOTIFY

Global Const $GUI_SS_DEFAULT_PIC = $SS_NOTIFY

#region _Memory

Func _MEMORYOPEN($IV_PID, $IV_DESIREDACCESS = 2035711, $IV_INHERITHANDLE = 1)

If Not ProcessExists($IV_PID) Then

SetError(1)

Return 0

EndIf

Local $AH_HANDLE[2] = [DllOpen("kernel32.dll")]

If @error Then

SetError(2)

Return 0

EndIf

Local $AV_OPENPROCESS = DllCall($AH_HANDLE[0], "int", "OpenProcess", "int", $IV_DESIREDACCESS, "int", $IV_INHERITHANDLE, "int", $IV_PID)

If @error Then

DllClose($AH_HANDLE[0])

SetError(3)

Return 0

EndIf

$AH_HANDLE[1] = $AV_OPENPROCESS[0]

Return $AH_HANDLE

EndFunc

Func _MEMORYREAD($IV_ADDRESS, $AH_HANDLE, $SV_TYPE = "dword")

If Not IsArray($AH_HANDLE) Then

SetError(1)

Return 0

EndIf

Local $V_BUFFER = DllStructCreate($SV_TYPE)

If @error Then

SetError(@error + 1)

Return 0

EndIf

DllCall($AH_HANDLE[0], "int", "ReadProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "")

If Not @error Then

Local $V_VALUE = DllStructGetData($V_BUFFER, 1)

Return $V_VALUE

Else

SetError(6)

Return 0

EndIf

EndFunc

Func _MEMORYWRITE($IV_ADDRESS, $AH_HANDLE, $V_DATA, $SV_TYPE = "dword")

If Not IsArray($AH_HANDLE) Then

SetError(1)

Return 0

EndIf

Local $V_BUFFER = DllStructCreate($SV_TYPE)

If @error Then

SetError(@error + 1)

Return 0

Else

DllStructSetData($V_BUFFER, 1, $V_DATA)

If @error Then

SetError(6)

Return 0

EndIf

EndIf

DllCall($AH_HANDLE[0], "int", "WriteProcessMemory", "int", $AH_HANDLE[1], "int", $IV_ADDRESS, "ptr", DllStructGetPtr($V_BUFFER), "int", DllStructGetSize($V_BUFFER), "int", "")

If Not @error Then

Return 1

Else

SetError(7)

Return 0

EndIf

EndFunc

Func _MEMORYCLOSE($AH_HANDLE)

If Not IsArray($AH_HANDLE) Then

SetError(1)

Return 0

EndIf

DllCall($AH_HANDLE[0], "int", "CloseHandle", "int", $AH_HANDLE[1])

If Not @error Then

DllClose($AH_HANDLE[0])

Return 1

Else

DllClose($AH_HANDLE[0])

SetError(2)

Return 0

EndIf

EndFunc

Func SETPRIVILEGE($PRIVILEGE, $BENABLE)

Const $MY_TOKEN_ADJUST_PRIVILEGES = 32

Const $MY_TOKEN_QUERY = 8

Const $MY_SE_PRIVILEGE_ENABLED = 2

Local $HTOKEN, $SP_AUXRET, $SP_RET, $HCURRPROCESS, $NTOKENS, $NTOKENINDEX, $PRIV

$NTOKENS = 1

$LUID = DllStructCreate("dword;int")

If IsArray($PRIVILEGE) Then $NTOKENS = UBound($PRIVILEGE)

$TOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $NTOKENS) & "]")

$NEWTOKEN_PRIVILEGES = DllStructCreate("dword;dword[" & (3 * $NTOKENS) & "]")

$HCURRPROCESS = DllCall("kernel32.dll", "hwnd", "GetCurrentProcess")

$SP_AUXRET = DllCall("advapi32.dll", "int", "OpenProcessToken", "hwnd", $HCURRPROCESS[0], "int", BitOR($MY_TOKEN_ADJUST_PRIVILEGES, $MY_TOKEN_QUERY), "int*", 0)

If $SP_AUXRET[0] Then

$HTOKEN = $SP_AUXRET[3]

DllStructSetData($TOKEN_PRIVILEGES, 1, 1)

$NTOKENINDEX = 1

While $NTOKENINDEX <= $NTOKENS

If IsArray($PRIVILEGE) Then

$PRIV = $PRIVILEGE[$NTOKENINDEX - 1]

Else

$PRIV = $PRIVILEGE

EndIf

$RET = DllCall("advapi32.dll", "int", "LookupPrivilegeValue", "str", "", "str", $PRIV, "ptr", DllStructGetPtr($LUID))

If $RET[0] Then

If $BENABLE Then

DllStructSetData($TOKEN_PRIVILEGES, 2, $MY_SE_PRIVILEGE_ENABLED, (3 * $NTOKENINDEX))

Else

DllStructSetData($TOKEN_PRIVILEGES, 2, 0, (3 * $NTOKENINDEX))

EndIf

DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 1), (3 * ($NTOKENINDEX - 1)) + 1)

DllStructSetData($TOKEN_PRIVILEGES, 2, DllStructGetData($LUID, 2), (3 * ($NTOKENINDEX - 1)) + 2)

DllStructSetData($LUID, 1, 0)

DllStructSetData($LUID, 2, 0)

EndIf

$NTOKENINDEX += 1

WEnd

$RET = DllCall("advapi32.dll", "int", "AdjustTokenPrivileges", "hwnd", $HTOKEN, "int", 0, "ptr", DllStructGetPtr($TOKEN_PRIVILEGES), "int", DllStructGetSize($NEWTOKEN_PRIVILEGES), "ptr", DllStructGetPtr($NEWTOKEN_PRIVILEGES), "int*", 0)

$F = DllCall("kernel32.dll", "int", "GetLastError")

EndIf

$NEWTOKEN_PRIVILEGES = 0

$TOKEN_PRIVILEGES = 0

$LUID = 0

If $SP_AUXRET[0] = 0 Then Return 0

$SP_AUXRET = DllCall("kernel32.dll", "int", "CloseHandle", "hwnd", $HTOKEN)

If Not $RET[0] And Not $SP_AUXRET[0] Then Return 0

Return $RET[0]

EndFunc

#endregion _Memory

$Form = GUICreate("ZX Bot Ver. 1.0", 538, 300, 245, 194)

GUISetBkColor(0xFF00FF)

$HP_DISLAY = GUICtrlCreateLabel("", 16, 24, 140, 20)

$MP_DISLAY = GUICtrlCreateLabel("", 16, 56, 148, 28)

$GroupBox1 = GUICtrlCreateGroup("Character HP/MP Information", 8, 1, 209, 89)

GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")

GUICtrlCreateGroup("", -99, -99, 1, 1)

$READ_DISLAY = GUICtrlCreateButton("Read data", 230, 259, 75, 25, 0)

GUICtrlSetOnEvent(-1, "Read")

$START = GUICtrlCreateButton("Start", 317, 259, 75, 25, 0)

GUICtrlSetOnEvent($START, "Start")

$EXIT = GUICtrlCreateButton("Exit", 405, 259, 75, 25, 0)

GUICtrlSetOnEvent($EXIT, "AltQ")

$Group1 = GUICtrlCreateGroup("Potion Settings", 8, 104, 209, 177)

GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")

$HP_CHECK_D = GUICtrlCreateCheckbox("Auto HP Potion", 16, 120, 113, 17)

GUICtrlSetState(-1, $GUI_CHECKED)

$Label1 = GUICtrlCreateLabel("Hot Key", 32, 142, 44, 19)

$HP_KEY_D = GUICtrlCreateCombo("", 88, 142, 89, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "9")

$Label2 = GUICtrlCreateLabel("If HP is <", 32, 169, 52, 19)

$HP_DANGER_D = GUICtrlCreateInput("500", 88, 167, 89, 23)

$MP_CHECK_D = GUICtrlCreateCheckbox("Auto MP Potion", 16, 192, 113, 17)

GUICtrlSetState(-1, $GUI_CHECKED)

$Label3 = GUICtrlCreateLabel("Hot Key", 32, 216, 44, 19)

$MP_KEY_D = GUICtrlCreateCombo("", 88, 214, 89, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "0")

$Label4 = GUICtrlCreateLabel("If MP is <", 32, 240, 54, 19)

$MP_DANGER_D = GUICtrlCreateInput("150", 88, 239, 89, 23)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Group2 = GUICtrlCreateGroup("Skill Settings", 224, 33, 297, 161)

$Label8 = GUICtrlCreateLabel("Hot Key", 232, 80, 42, 17)

$Label9 = GUICtrlCreateLabel("Delay in Ms", 232, 120, 59, 17)

$Label10 = GUICtrlCreateLabel("Repeat", 232, 160, 39, 17)

$SKILL1_KEY_D = GUICtrlCreateCombo("", 301, 80, 57, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "1")

$SKILL2_KEY_D = GUICtrlCreateCombo("", 373, 80, 57, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "2")

$SKILL3_KEY_D = GUICtrlCreateCombo("", 445, 80, 57, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "3")

$SKILL1_TIMER_D = GUICtrlCreateInput("500", 301, 120, 57, 21)

$SKILL2_TIMER_D = GUICtrlCreateInput("1000", 373, 120, 57, 21)

$SKILL3_TIMER_D = GUICtrlCreateInput("1500", 445, 120, 57, 21)

$SKILL1_REPEAT_D = GUICtrlCreateInput("1", 301, 160, 57, 21)

$SKILL2_REPEAT_D = GUICtrlCreateInput("2", 373, 160, 57, 21)

$SKILL3_REPEAT_D = GUICtrlCreateInput("3", 445, 160, 57, 21)

$SKILL1_CHECK_D = GUICtrlCreateCheckbox("Skill 1", 301, 56, 57, 17)

GUICtrlSetState(-1, $GUI_CHECKED)

$SKILL2_CHECK_D = GUICtrlCreateCheckbox("Skill 2", 373, 56, 57, 17)

GUICtrlSetState(-1, $GUI_CHECKED)

$SKILL3_CHECK_D = GUICtrlCreateCheckbox("Skill3", 448, 56, 57, 17)

GUICtrlSetState(-1, $GUI_CHECKED)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Label5 = GUICtrlCreateLabel("Pick Hotkey", 224, 224, 62, 17)

$PICK_KEY_D = GUICtrlCreateCombo("", 296, 224, 57, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "4")

$Radio7 = GUICtrlCreateCheckbox("Use Item/Skill Before Attack", 376, 200, 153, 17)

$BUFF_KEY_D = GUICtrlCreateCombo("", 408, 224, 35, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|0", "8")

$Label6 = GUICtrlCreateLabel("Key", 376, 224, 22, 17)

$BUFF_COUNT_D = GUICtrlCreateCombo("", 488, 224, 35, 25)

GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9", "1")

$Label7 = GUICtrlCreateLabel("Times", 448, 224, 32, 17)

$Label99 = GUICtrlCreateLabel("Home = Start/Pause Bot End = Exit", 240, 8, 270, 17)

GUISetState(@SW_SHOW)

Opt("GUIOnEventMode", 1)

Opt("SendKeyDelay", 10)

Opt("SendKeyDownDelay", 10)

Opt("SendCapslockMode", 0)

Opt("TrayMenuMode", 1)

SETKEYS()

Dim $BASEMOD = 10047252, $HP_MOD, $MEMID, $PID, $HP_MOD_BUFFER, $HP_BUFFER, $TRAYMSG, $PICK_KEY_D1, $SKILL1_KEY_D1, $SKILL2_KEY_D1, $SKILL3_KEY_D1

Dim $BASEPET = 15487972, $HP_PET_CURREN, $HP_PET_MAX, $HP_PET_CHECK, $HP_PET_DANGER, $HP_KEY_D1, $MP_KEY_D1, $BUFF_CURREN, $BUFF_CHECK_D

Dim $SUM_TIMER, $CURREN_TIMER, $TIMERINFO, $TIMERSTAMP, $TIMERTAB, $TIMER_HP, $TIMER_MP, $TIME_MOD, $BUFF_KEY_D1, $BUFF_CHECK, $BUFF_KEY_D

Dim $HP_CURREN, $HP_MAX, $MP_CURREN, $MP_MAX, $SENDOK = False, $MP_OK = True, $HP_OK = True, $HP_CHECK, $MP_CHECK, $HP_DANGER, $MP_DANGER, $READOK = False

Dim $BASEADD = 10047252, $BUFF_COUNT, $BUFF_COUNT_D

Dim $SKILL1_CHECK, $SKILL2_CHECK, $SKILL1_CHECK, $SKILL2_CHECK, $SKILL1_TIME, $SKILL2_TIME, $SKILL3_CHECK, $SKILL3_TIME, $SKILL1_REPEAT, $SKILL3_REPEAT, $SKILL2_REPEAT, $CURENTSKILL

$PID = WinGetProcess($WINNAME)

$MEMID = _MEMORYOPEN($PID)

$HP_BUFFER = _MEMORYREAD($BASEADD, $MEMID)

$HP_BUFFER = _MEMORYREAD($HP_BUFFER + 40, $MEMID)

While 1

If $READOK Then

If TimerDiff($TIMERINFO) > 500 Then

INFO()

$TIMERINFO = TimerInit()

EndIf

EndIf

HP_MOD()

If $SENDOK Then

If HP_MOD() = 0 Then

For $I = 0 To 10

Send($PICK_KEY_D1)

Sleep(100)

Next

If HP_MOD() = 0 Then

Send("{Tab}")

Sleep(500)

EndIf

EndIf

If $HP_CHECK Then HP_CHECK()

If $MP_CHECK Then MP_CHECK()

If HP_MOD() > 0 Then SKILL()

If $BUFF_CHECK Then BUFF_CHECK()

EndIf

$NMSG = GUIGetMsg()

If ($NMSG = $GUI_EVENT_CLOSE) Then Exit

WEnd

Func HP_MOD()

$HP_MOD = _MEMORYREAD($HP_BUFFER + 3840, $MEMID)

Return $HP_MOD

EndFunc

Func BUFF_CURREN()

$BUFF_CURREN = _MEMORYREAD($HP_BUFFER + 280, $MEMID)

Return $BUFF_CURREN

EndFunc

Func HP_CURREN()

$HP_CURREN = _MEMORYREAD($HP_BUFFER + 584, $MEMID)

Return $HP_CURREN

EndFunc

Func HP_MAX()

$HP_MAX = _MEMORYREAD($HP_BUFFER + 608, $MEMID)

Return $HP_MAX

EndFunc

Func MP_MAX()

$MP_MAX = _MEMORYREAD($HP_BUFFER + 612, $MEMID)

Return $MP_MAX

EndFunc

Func MP_CURREN()

$MP_CURREN = _MEMORYREAD($HP_BUFFER + 588, $MEMID)

Return $MP_CURREN

EndFunc

Func READ()

$READOK = Not $READOK

If $READOK Then

GUICtrlSetData($READ_DISLAY, "Reset data")

If GUICtrlRead($MP_CHECK_D) = $GUI_CHECKED Then

$MP_CHECK = True

Else

$MP_CHECK = False

EndIf

If GUICtrlRead($HP_CHECK_D) = $GUI_CHECKED Then

$HP_CHECK = True

Else

$HP_CHECK = False

EndIf

$SKILL1_TIME = GUICtrlRead($SKILL1_TIMER_D)

$SKILL2_TIME = GUICtrlRead($SKILL2_TIMER_D)

$SKILL3_TIME = GUICtrlRead($SKILL3_TIMER_D)

$HP_DANGER = GUICtrlRead($HP_DANGER_D)

$MP_DANGER = GUICtrlRead($MP_DANGER_D)

If GUICtrlRead($SKILL1_CHECK_D) = $GUI_CHECKED Then

$SKILL1_REPEAT = GUICtrlRead($SKILL1_REPEAT_D)

Else

$SKILL1_REPEAT = 0

EndIf

If GUICtrlRead($SKILL2_CHECK_D) = $GUI_CHECKED Then

$SKILL2_REPEAT = GUICtrlRead($SKILL2_REPEAT_D)

Else

$SKILL2_CHECK = False

$SKILL2_REPEAT = 0

EndIf

If GUICtrlRead($SKILL3_CHECK_D) = $GUI_CHECKED Then

$SKILL3_REPEAT = GUICtrlRead($SKILL3_REPEAT_D)

Else

$SKILL3_CHECK = False

$SKILL3_REPEAT = 0

EndIf

If GUICtrlRead($BUFF_CHECK_D) = $GUI_CHECKED Then

$BUFF_CHECK = True

Else

$BUFF_CHECK = False

EndIf

Else

GUICtrlSetData($READ_DISLAY, "Read")

EndIf

EndFunc

Func START()

$SENDOK = Not $SENDOK

If $SENDOK Then

GUICtrlSetData($START, "Stop")

$TIMERSTAMP = TimerInit()

$CURENTSKILL = 1

READ()

$HP_KEY_D1 = GUICtrlRead($HP_KEY_D)

$MP_KEY_D1 = GUICtrlRead($MP_KEY_D)

$BUFF_COUNT = GUICtrlRead($BUFF_COUNT_D)

$SKILL1_KEY_D1 = GUICtrlRead($SKILL1_KEY_D)

$SKILL2_KEY_D1 = GUICtrlRead($SKILL2_KEY_D)

$SKILL3_KEY_D1 = GUICtrlRead($SKILL3_KEY_D)

$PICK_KEY_D1 = GUICtrlRead($PICK_KEY_D)

$BUFF_KEY_D1 = GUICtrlRead($BUFF_KEY_D)

ToolTip("")

GUICtrlSetState($BUFF_KEY_D, $GUI_DISABLE)

GUICtrlSetState($PICK_KEY_D, $GUI_DISABLE)

GUICtrlSetState($BUFF_COUNT_D, $GUI_DISABLE)

GUICtrlSetState($SKILL1_KEY_D, $GUI_DISABLE)

GUICtrlSetState($SKILL2_KEY_D, $GUI_DISABLE)

GUICtrlSetState($SKILL3_KEY_D, $GUI_DISABLE)

GUICtrlSetState($SKILL1_TIMER_D, $GUI_DISABLE)

GUICtrlSetState($SKILL2_TIMER_D, $GUI_DISABLE)

GUICtrlSetState($SKILL3_TIMER_D, $GUI_DISABLE)

GUICtrlSetState($SKILL1_REPEAT_D, $GUI_DISABLE)

GUICtrlSetState($SKILL2_REPEAT_D, $GUI_DISABLE)

GUICtrlSetState($SKILL3_REPEAT_D, $GUI_DISABLE)

GUICtrlSetState($HP_KEY_D, $GUI_DISABLE)

GUICtrlSetState($MP_KEY_D, $GUI_DISABLE)

GUICtrlSetState($HP_DANGER_D, $GUI_DISABLE)

GUICtrlSetState($MP_DANGER_D, $GUI_DISABLE)

Else

ToolTip("")

GUICtrlSetData($START, "Start")

GUICtrlSetState($BUFF_COUNT_D, $GUI_ENABLE)

GUICtrlSetState($BUFF_KEY_D, $GUI_ENABLE)

GUICtrlSetState($PICK_KEY_D, $GUI_ENABLE)

GUICtrlSetState($SKILL1_KEY_D, $GUI_ENABLE)

GUICtrlSetState($SKILL2_KEY_D, $GUI_ENABLE)

GUICtrlSetState($SKILL3_KEY_D, $GUI_ENABLE)

GUICtrlSetState($SKILL1_TIMER_D, $GUI_ENABLE)

GUICtrlSetState($SKILL2_TIMER_D, $GUI_ENABLE)

GUICtrlSetState($SKILL3_TIMER_D, $GUI_ENABLE)

GUICtrlSetState($SKILL1_REPEAT_D, $GUI_ENABLE)

GUICtrlSetState($SKILL2_REPEAT_D, $GUI_ENABLE)

GUICtrlSetState($SKILL3_REPEAT_D, $GUI_ENABLE)

GUICtrlSetState($HP_KEY_D, $GUI_ENABLE)

GUICtrlSetState($MP_KEY_D, $GUI_ENABLE)

GUICtrlSetState($HP_DANGER_D, $GUI_ENABLE)

GUICtrlSetState($MP_DANGER_D, $GUI_ENABLE)

Sleep(500)

WinActive($WINNAME)

EndIf

EndFunc

Func INFO()

GUICtrlSetData($HP_DISLAY, "Hp " & HP_CURREN() & "/" & HP_MAX())

GUICtrlSetData($MP_DISLAY, "Mp " & MP_CURREN() & "/" & MP_MAX())

If $HP_PET_CHECK Then GUICtrlSetData($HP_PET_DISPLAY, "PetHp " & HP_PET_CURREN() & "/" & HP_PET_MAX())

EndFunc

Func HP_CHECK()

If Not $HP_OK Then

If TimerDiff($TIMER_HP) > 5000 Then

$HP_OK = True

EndIf

EndIf

If (HP_CURREN() <> 0) And (HP_CURREN() < $HP_DANGER) And $HP_OK Then

Send($HP_KEY_D1)

Sleep(100)

$HP_OK = False

$TIMER_HP = TimerInit()

EndIf

EndFunc

Func MP_CHECK()

If Not $MP_OK Then

If TimerDiff($TIMER_MP) > 5000 Then

$MP_OK = True

EndIf

EndIf

If (MP_CURREN() <> 0) And (MP_CURREN() < $MP_DANGER) And $MP_OK Then

Send($MP_KEY_D1)

Sleep(100)

$MP_OK = False

$TIMER_MP = TimerInit()

EndIf

EndFunc

Func BUFF_CHECK()

If (BUFF_CURREN() < $BUFF_COUNT) Then

Send($BUFF_KEY_D1)

Sleep(2000)

EndIf

EndFunc

Func SKILL()

If HP_MOD() > 0 Then

For $I = 1 To $SKILL1_REPEAT

Sleep(500)

Send($SKILL1_KEY_D1)

Sleep($SKILL1_TIME)

Next

EndIf

If HP_MOD() > 0 Then

For $I = 1 To $SKILL2_REPEAT

Sleep(500)

Send($SKILL2_KEY_D1)

Sleep($SKILL2_TIME)

Next

EndIf

If HP_MOD() > 0 Then

For $I = 1 To $SKILL3_REPEAT

Sleep(500)

Send($SKILL3_KEY_D1)

Sleep($SKILL3_TIME)

Next

EndIf

EndFunc

Func SETKEYS()

HotKeySet("{End}", "AltQ")

HotKeySet("{Home}", "Start")

EndFunc

Func ALTQ()

Exit

EndFunc

Share this post


Link to post
Share on other sites
d4xyjen

ask your "friend" ?

hehehe unfortunately he is very un reachable now he is out of the country busy working

Try ControlSend

where would I put it? newbie here

Share this post


Link to post
Share on other sites
Jos

hehehe unfortunately he is very un reachable now he is out of the country busy working

Email /MSN ?

Try ControlSend

where would I put it? newbie here

Try learning the language first before trying to modify lengthy scripts like this. You end up asking us to modify it for you which ain't going to happen,

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×