Code:
Func _CHOOSECOLOR(SI_RETURNTYPE = 0, SI_COLORREF = 0, SI_REFTYPE = 0, SH_WND_OWNER = 0)
Local SCUSTCOLORS = "int[16]"
Local SSTRUCT = "dword;int;int;int;ptr;dword;int;ptr;ptr"
Local SP = DllStructCreate(SSTRUCT)
If @error Then
SetError(-1)
Return -1
EndIf
Local SCC = DllStructCreate(SCUSTCOLORS)
If @error Then
SetError(-2)
Return -1
EndIf
If (SI_REFTYPE == 1) Then
SI_COLORREF = Int(SI_COLORREF)
ElseIf (SI_REFTYPE == 2) Then
SI_COLORREF = Hex(String(SI_COLORREF), 6)
SI_COLORREF = "0x" & StringMid(SI_COLORREF, 5, 2) & StringMid(SI_COLORREF, 3, 2) & StringMid(SI_COLORREF, 1, 2)
EndIf
DllStructSetData(SP, 1, DllStructGetSize(SP))
DllStructSetData(SP, 2, SH_WND_OWNER)
DllStructSetData(SP, 4, SI_COLORREF)
DllStructSetData(SP, 5, DllStructGetPtr(SCC))
DllStructSetData(SP, 6, BitOR(SCC_ANYCOLOR, SCC_FULLOPEN, SCC_RGBINIT))
Local SRET = DllCall("comdlg32.dll", "long", "ChooseColor", "ptr", DllStructGetPtr(SP))
If (SRET[0] == 0) Then
SetError(-3)
Return -1
EndIf
Local SCOLOR_PICKED = DllStructGetData(SP, 4)
If (SI_RETURNTYPE == 1) Then
Return "0x" & Hex(String(SCOLOR_PICKED), 6)
ElseIf (SI_RETURNTYPE == 2) Then
SCOLOR_PICKED = Hex(String(SCOLOR_PICKED), 6)
Return "0x" & StringMid(SCOLOR_PICKED, 5, 2) & StringMid(SCOLOR_PICKED, 3, 2) & StringMid(SCOLOR_PICKED, 1, 2)
ElseIf (SI_RETURNTYPE == 0) Then
Return SCOLOR_PICKED
Else
SetError(-4)
Return -1
EndIf
EndFunc
Func _CHOOSEFONT(SS_FONTNAME = "Courier New", SI_SIZE = 10, SI_COLORREF = 0, SI_FONTWEIGHT = 0, SI_ITALIC = 0, SI_UNDERLINE = 0, SI_STRIKETHRU = 0, SH_WND_OWNER = 0)
Local SRET = DllCall("gdi32.dll", "long", "GetDeviceCaps", "long", 0, "long", SLOGPIXELSX)
If (SRET[0] == -1) Then
SetError(-3)
Return -1
EndIf
Local SLFHEIGHT = Round((SI_SIZE * SRET[2]) / 72, 0)
Local SLOGFONT = "int;int;int;int;int;byte;byte;byte;byte;byte;byte;byte;byte;char[32]"
Local SSTRUCT = "dword;int;int;ptr;int;dword;int;int;ptr;ptr;int;ptr;dword;int;int"
Local SP = DllStructCreate(SSTRUCT)
If @error Then
SetError(-1)
Return -1
EndIf
Local SLF = DllStructCreate(SLOGFONT)
If @error Then
SetError(-2)
Return -1
EndIf
DllStructSetData(SP, 1, DllStructGetSize(SP))
DllStructSetData(SP, 2, SH_WND_OWNER)
DllStructSetData(SP, 4, DllStructGetPtr(SLF))
DllStructSetData(SP, 5, SI_SIZE)
DllStructSetData(SP, 6, BitOR(SCF_SCREENFONTS, SCF_PRINTERFONTS, SCF_EFFECTS, SCF_INITTOLOGFONTSTRUCT, SCF_NOSCRIPTSEL))
DllStructSetData(SP, 7, SI_COLORREF)
DllStructSetData(SP, 13, 0)
DllStructSetData(SLF, 1, SLFHEIGHT + 1)
DllStructSetData(SLF, 5, SI_FONTWEIGHT)
DllStructSetData(SLF, 6, SI_ITALIC)
DllStructSetData(SLF, 7, SI_UNDERLINE)
DllStructSetData(SLF, 8, SI_STRIKETHRU)
DllStructSetData(SLF, 14, SS_FONTNAME)
SRET = DllCall("comdlg32.dll", "long", "ChooseFont", "ptr", DllStructGetPtr(SP))
If (SRET[0] == 0) Then
SetError(-3)
Return -1
EndIf
Local SFONTNAME = DllStructGetData(SLF, 14)
If (StringLen(SFONTNAME) == 0 And StringLen(SS_FONTNAME) > 0) Then
SFONTNAME = SS_FONTNAME
EndIf
Local SITALIC = 0
Local SUNDERLINE = 0
Local SSTRIKEOUT = 0
If (DllStructGetData(SLF, 6)) Then
SITALIC = 2
EndIf
If (DllStructGetData(SLF, 7)) Then
SUNDERLINE = 4
EndIf
If (DllStructGetData(SLF, 8)) Then
SSTRIKEOUT = 8
EndIf
Local SATTRIBUTES = BitOR(SITALIC, SUNDERLINE, SSTRIKEOUT)
Local SSIZE = DllStructGetData(SP, 5) / 10
Local SWEIGHT = DllStructGetData(SLF, 5)
Local SCOLORREF = DllStructGetData(SP, 7)
Local SCOLOR_PICKED = Hex(String(SCOLORREF), 6)
Return StringSplit(SATTRIBUTES & "," & SFONTNAME & "," & SSIZE & "," & SWEIGHT & "," & SCOLORREF & "," & "0x" & SCOLOR_PICKED & "," & "0x" & StringMid(SCOLOR_PICKED, 5, 2) & StringMid(SCOLOR_PICKED, 3, 2) & StringMid(SCOLOR_PICKED, 1, 2), ",")
EndFunc
Func _CLIPPUTFILE(SSFILE, SSSEPERATOR = "|")
Local SVDLLCALLTMP, SNGLOBMEMSIZE, SHGLOBAL, SDROPFILES, SI, SHLOCK
Local SGMEM_MOVEABLE = 2, SCF_HDROP = 15
SSFILE = SSFILE & SSSEPERATOR & SSSEPERATOR
SNGLOBMEMSIZE = StringLen(SSFILE) + 20
SVDLLCALLTMP = DllCall("user32.dll", "int", "OpenClipboard", "hwnd", 0)
If @error Or SVDLLCALLTMP[0] = 0 Then
SetError(1)
Return False
EndIf
SVDLLCALLTMP = DllCall("user32.dll", "int", "EmptyClipboard")
If @error Or SVDLLCALLTMP[0] = 0 Then
SetError(2)
Return False
EndIf
SVDLLCALLTMP = DllCall("kernel32.dll", "long", "GlobalAlloc", "int", SGMEM_MOVEABLE, "int", SNGLOBMEMSIZE)
If @error Or SVDLLCALLTMP[0] < 1 Then
SetError(3)
Return False
EndIf
SHGLOBAL = SVDLLCALLTMP[0]
SVDLLCALLTMP = DllCall("kernel32.dll", "long", "GlobalLock", "long", SHGLOBAL)
If @error Or SVDLLCALLTMP[0] < 1 Then
SetError(4)
Return False
EndIf
SHLOCK = SVDLLCALLTMP[0]
SDROPFILES = DllStructCreate("dword;ptr;int;int;int;char[" & StringLen(SSFILE) & "]", SHLOCK)
If @error Then
SetError(5)
Return False
EndIf
DllStructSetData(SDROPFILES, 1, DllStructGetSize(SDROPFILES) - StringLen(SSFILE))
DllStructSetData(SDROPFILES, 2, 0)
DllStructSetData(SDROPFILES, 3, 0)
DllStructSetData(SDROPFILES, 4, 0)
DllStructSetData(SDROPFILES, 5, 0)
DllStructSetData(SDROPFILES, 6, SSFILE)
For SI = 1 To StringLen(SSFILE)
If DllStructGetData(SDROPFILES, 6, SI) = Asc(SSSEPERATOR) Then DllStructSetData(SDROPFILES, 6, 0, SI)
Next
SVDLLCALLTMP = DllCall("user32.dll", "long", "SetClipboardData", "int", SCF_HDROP, "long", SHGLOBAL)
If @error Or SVDLLCALLTMP[0] < 1 Then
SetError(6)
SDROPFILES = 0
Return False
EndIf
SVDLLCALLTMP = DllCall("user32.dll", "int", "CloseClipboard")
If @error Or SVDLLCALLTMP[0] = 0 Then
SetError(7)
SDROPFILES = 0
Return False
EndIf
SVDLLCALLTMP = DllCall("kernel32.dll", "int", "GlobalUnlock", "long", SHGLOBAL)
If @error Then
SetError(8)
SDROPFILES = 0
Return False
EndIf
SVDLLCALLTMP = DllCall("kernel32.dll", "int", "GetLastError")
If SVDLLCALLTMP = 0 Then
SDROPFILES = 0
SetError(8)
Return False
Else
SDROPFILES = 0
Return True
EndIf
EndFunc
Func _IIF(SF_TEST, SV_TRUEVAL, SV_FALSEVAL)
If SF_TEST Then
Return SV_TRUEVAL
Else
Return SV_FALSEVAL
EndIf
EndFunc
Func _MOUSETRAP(SI_LEFT = 0, SI_TOP = 0, SI_RIGHT = 0, SI_BOTTOM = 0)
Local SAV_RET
If @NumParams == 0 Then
SAV_RET = DllCall("user32.dll", "int", "ClipCursor", "int", 0)
Else
If @NumParams == 2 Then
SI_RIGHT = SI_LEFT + 1
SI_BOTTOM = SI_TOP + 1
EndIf
Local SRECT = DllStructCreate("int;int;int;int")
If @error Then Return 0
DllStructSetData(SRECT, 1, SI_LEFT)
DllStructSetData(SRECT, 2, SI_TOP)
DllStructSetData(SRECT, 3, SI_RIGHT)
DllStructSetData(SRECT, 4, SI_BOTTOM)
SAV_RET = DllCall("user32.dll", "int", "ClipCursor", "ptr", DllStructGetPtr(SRECT))
EndIf
Return SAV_RET[0]
EndFunc
Func _SINGLETON(SOCCURENCENAME, SFLAG = 0)
Local SERROR_ALREADY_EXISTS = 183
SOCCURENCENAME = StringReplace(SOCCURENCENAME, "", "")
Local SHANDLE = DllCall("kernel32.dll", "int", "CreateMutex", "int", 0, "long", 1, "str", SOCCURENCENAME)
Local SLASTERROR = DllCall("kernel32.dll", "int", "GetLastError")
If SLASTERROR[0] = SERROR_ALREADY_EXISTS Then
If SFLAG = 0 Then
Exit -1
Else
SetError(SLASTERROR[0])
Return 0
EndIf
EndIf
Return SHANDLE[0]
EndFunc
Func _ISPRESSED(SS_HEXKEY, SV_DLL = "user32.dll")
Local SA_R = DllCall(SV_DLL, "int", "GetAsyncKeyState", "int", "0x" & SS_HEXKEY)
If Not @error And BitAND(SA_R[0], 32768) = 32768 Then Return 1
Return 0
EndFunc
Func _SENDMESSAGE(SH_HWND, SI_MSG, SWPARAM = 0, SLPARAM = 0, SI_R = 0, SS_T1 = "int", SS_T2 = "int")
Local SA_RET = DllCall("user32.dll", "long", "SendMessage", "hwnd", SH_HWND, "int", SI_MSG, SS_T1, SWPARAM, SS_T2, SLPARAM)
If @error Then Return SetError(@error, @extended, "")
If SI_R >= 0 And SI_R <= 4 Then Return SA_RET[SI_R]
Return SA_RET
EndFunc
Func _ISCLASSNAME(SH_HWND, SS_CLASSNAME)
If Not IsHWnd(SH_HWND) Then SH_HWND = GUICtrlGetHandle(SH_HWND)
Local SARESULT = DllCall("user32.dll", "int", "GetClassNameA", "hwnd", SH_HWND, "str", "", "int", 256)
If @error Then Return SetError(@error, @error, "")
If IsArray(SARESULT) Then
If StringUpper(StringMid(SARESULT[2], 1, StringLen(SS_CLASSNAME))) = StringUpper(SS_CLASSNAME) Then
Return 1
Else
Return 0
EndIf
Else
Return SetError(-1, -1, 0)
EndIf
EndFunc
Func _VERSIONCOMPARE(SSVERSION1, SSVERSION2)
If SSVERSION1 = SSVERSION2 Then Return 0
Local SSEP = "."
If StringInStr(SSVERSION1, SSEP) = 0 Then SSEP = ","
Local SAVERSION1 = StringSplit(SSVERSION1, SSEP)
Local SAVERSION2 = StringSplit(SSVERSION2, SSEP)
If UBound(SAVERSION1) <> UBound(SAVERSION2) Or UBound(SAVERSION1) = 0 Then
SetExtended(1)
If SSVERSION1 > SSVERSION2 Then
Return 1
ElseIf SSVERSION1 < SSVERSION2 Then
Return -1
EndIf
Else
For SI = 1 To UBound(SAVERSION1) - 1
If StringIsDigit(SAVERSION1[SI]) And StringIsDigit(SAVERSION2[SI]) Then
If Number(SAVERSION1[SI]) > Number(SAVERSION2[SI]) Then
Return 1
ElseIf Number(SAVERSION1[SI]) < Number(SAVERSION2[SI]) Then
Return -1
EndIf
Else
SetExtended(1)
If SAVERSION1[SI] > SAVERSION2[SI] Then
Return 1
ElseIf SAVERSION1[SI] < SAVERSION2[SI] Then
Return -1
EndIf
EndIf
Next
EndIf
SetError(2)
Return 0
EndFunc
Opt("GUIOnEventMode", 1)
HotKeySet("{F1}", "StartButton")
HotKeySet("{F4}", "CLOSEButton")
Dim SI = "0", SS = "0"
Dim SHR1, SHR2, SPMAS2, SMYG4, SPMAS1
Dim STUK1, STUK2, SPM2 = "Enter here your msg to party Admin", SPM1 = "ID with S"
Dim SSSS
SDOIT = False
SDLL = DllOpen("user32.dll")
GUICreate("AutoSum [F1 - Start] [F4 - Exit]", 250, 200)
GUISetOnEvent(SGUI_EVENT_CLOSE, "CLOSEButton")
GUICtrlCreateGroup("Summon Settings", 2, 1, 248, 50)
#summon
SHR1 = GUICtrlCreateInput(STUK1, 80, 20, 25, 20)
SHR2 = GUICtrlCreateInput(STUK2, 195, 20, 25, 20)
GUICtrlSetLimit(SHR1, 1)
GUICtrlSetLimit(SHR2, 1)
GUICtrlCreateLabel("Horse In: F3 + ", 8, 22, 70, 15)
GUICtrlCreateLabel("Heal Pack: F3 + ", 110, 22, 80, 15)
#other
GUICtrlCreateGroup("Other Settings", 2, 51, 248, 105)
SSEND = GUICtrlCreateCheckbox("Send PM To Party Admin", 10, 70, 180)
SPMAS1 = GUICtrlCreateInput(SPM1, 10, 92, 52, 18)
SPMAS2 = GUICtrlCreateInput(SPM2, 61, 92, 183, 18)
SPM1 = GUICtrlRead(SPMAS1)
SPM2 = GUICtrlRead(SPMAS2)
SHEAL = GUICtrlCreateCheckbox("Auto Heal Horse", 10, 110, 180)
SINFO = GUICtrlCreateCheckbox("On Exit Return INFO", 10, 130, 180)
SCO = GUICtrlCreateLabel("آ© ", 68, 159, 95, 15)
GUICtrlSetFont(SCO, 9, 50, 4)
GUICtrlSetColor(SCO, 16711680)
SCOP = GUICtrlCreateLabel("2007 Monalith_LT", 77.5, 160, 95, 15)
GUICtrlSetFont(SCOP, 8.3, 50, 4)
GUICtrlSetColor(SCOP, 16711680)
SSTART = GUICtrlCreateButton("Start", 75, 180, 80, 15, SBS_FLAT)
GUICtrlSetOnEvent(SSTART, "StartButton")
While 1
GUISetState()
SMSG = GUIGetMsg()
If SDOIT = True Then
If BitAND(GUICtrlRead(SHEAL), SGUI_CHECKED) = SGUI_CHECKED Then
SETAS2()
Else
SETAS1()
EndIf
EndIf
WEnd
Func TERM()
SDOIT = False
GUICtrlSetData(SSTART, "Start")
Sleep(2000)
EndFunc
Func STARTBUTTON()
If SDOIT = False Then
SDOIT = True
GUICtrlSetData(SSTART, "Stop")
Else
SDOIT = False
GUICtrlSetData(SSTART, "Start")
EndIf
EndFunc
Func SETAS2()
SPM1 = GUICtrlRead(SPMAS1)
SPM2 = GUICtrlRead(SPMAS2)
STUK1 = GUICtrlRead(SHR1)
STUK2 = GUICtrlRead(SHR2)
If ProcessExists("sro_client.exe") Then
WinActivate("SRO_Client")
If STUK2 > 0 Then
Sleep(100)
ElseIf STUK2 = 0 Then
GUICtrlSetState(SHEAL, SGUI_UNCHECKED)
MsgBox(4096, "HP Recovery Slot", "Entered 0 or None, You need enter 1 or More", 5)
GUICtrlSetData(SSTART, "Start")
GUICtrlSetState(SDOIT, "False")
EndIf
If STUK1 > 0 Then
Sleep(100)
ElseIf STUK2 = 0 Then
MsgBox(4096, "Horse Slot", "Entered 0 or None, You need enter 1 or More", 5)
GUICtrlSetData(SSTART, "Start")
GUICtrlSetState(SDOIT, "False")
GUICtrlSetData(SHR1, "1")
EndIf
If (PixelGetColor(890, 50) == 16734802) Then
Sleep(8000)
ElseIf (PixelGetColor(763, 686) <> 0) And BitAND(GUICtrlRead(SSEND), SGUI_CHECKED) = SGUI_CHECKED Then
SPM1 = GUICtrlRead(SPMAS1)
SPM2 = GUICtrlRead(SPMAS2)
STUK1 = GUICtrlRead(SHR1)
STUK2 = GUICtrlRead(SHR2)
WinActivate("SRO_Client")
Sleep(500)
MouseClick(120, 705)
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Sleep(500)
Send(SPM1 & "{SPACE}" & SPM2)
Sleep(500)
Send("{ENTER}")
Sleep(500)
Send("{F3}")
MouseClick("right", 400, 400, 1, 1)
Sleep(18200)
Send("{F3}")
Sleep(50)
Send(STUK1)
Sleep(2000)
SI = SI + 1
ElseIf (PixelGetColor(763, 686) <> 0) And BitAND(GUICtrlRead(SSEND), SGUI_UNCHECKED) = SGUI_UNCHECKED Then
WinActivate("SRO_Client")
Sleep(1000)
Sleep(500)
Send("{F3}")
MouseClick("right", 400, 400, 1, 1)
Sleep(18700)
Send("{F3}")
Sleep(50)
Send(STUK1)
Sleep(2000)
SI = SI + 1
Else
If BitAND(GUICtrlRead(SSEND), SGUI_CHECKED) = SGUI_CHECKED And (PixelGetColor(890, 50) == 1579032) Or (PixelGetColor(891, 49) == 1052688) Then
WinActivate("SRO_Client")
Sleep(1000)
Sleep(500)
Send("{F3}")
MouseClick("right", 400, 400, 1, 1)
Sleep(250)
Send(STUK2)
Sleep(1000)
SS = SS + 1
EndIf
EndIf
MsgBox(4096, "Error", " No SRo Runned", 5)
Exit
EndIf
EndFunc
Func SETAS1()
SPM1 = GUICtrlRead(SPMAS1)
SPM2 = GUICtrlRead(SPMAS2)
STUK1 = GUICtrlRead(SHR1)
STUK2 = GUICtrlRead(SHR2)
If ProcessExists("sro_client.exe") Then
WinActivate("SRO_Client")
If STUK1 > 0 Then
Sleep(100)
ElseIf STUK2 = 0 Then
MsgBox(4096, "Horse Slot", "Entered 0 or None, You need enter 1 or More", 5)
GUICtrlSetData(SSTART, "Start")
GUICtrlSetState(SDOIT, "False")
GUICtrlSetData(SHR1, "1")
EndIf
If (PixelGetColor(890, 50) == 16734802) Then
Sleep(8000)
ElseIf (PixelGetColor(763, 686) <> 0) And BitAND(GUICtrlRead(SSEND), SGUI_CHECKED) = SGUI_CHECKED Then
ToolTip("siunciam")
SPM1 = GUICtrlRead(SPMAS1)
SPM2 = GUICtrlRead(SPMAS2)
STUK1 = GUICtrlRead(SHR1)
STUK2 = GUICtrlRead(SHR2)
WinActivate("SRO_Client")
Sleep(500)
MouseClick("left", 120, 705, 1, 1)
Sleep(50)
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Send("{BS}")
Sleep(500)
Send(SPM1 & "{SPACE}" & SPM2)
Sleep(500)
Send("{ENTER}")
Send("{ENTER}")
Sleep(500)
Send("{F3}")
MouseClick("right", 400, 400, 1, 1)
Sleep(18200)
Sleep(50)
Send(STUK1)
Sleep(2000)
SI = SI + 1
ElseIf (PixelGetColor(6, 686) <> 0) And BitAND(GUICtrlRead(SSEND), SGUI_UNCHECKED) = SGUI_UNCHECKED Then
WinActivate("SRO_Client")
Sleep(1000)
Sleep(500)
Send("{F3}")
MouseClick("right", 400, 400, 1, 1)
Sleep(18700)
Send("{F3}")
Sleep(50)
Send(STUK1)
Sleep(2000)
SI = SI + 1
EndIf
Else
MsgBox(4096, "Error", " No SRo Runned", 5)
Exit
EndIf
EndFunc
DllClose(SDLL)
Func CLOSEBUTTON()
SDOIT = False
If BitAND(GUICtrlRead(SINFO), SGUI_CHECKED) = SGUI_CHECKED Then
MsgBox(0, "Total Info", "Total Used: " & @LF & "Horses: " & SI & @LF & "HP Kits: " & SS & @LF & "__________" & @LF & "Mr.SwaDDie ")
EndIf
Exit
EndFunc
To thread starter, post some SnapShots. Also, Maybe some Quick small Tutorial for each if needed. ^^