1. Tải bản cài đặt AutoIT mới nhất

    Chào Khách. Nếu bạn mới tham gia và chưa cài đặt AutoIT.
    Vui lòng vào topic trên để tải bản AutoIT mới nhất nhé
    Dismiss Notice
  2. Quy định và nội quy

    Chào Khách. Vui lòng đọc kỹ nội quy và quy định của diễn đàn
    Để tránh bị ban một cách đáng tiếc nhé!
    Dismiss Notice
  3. Hướng dẫn chèn mã AutoIT trong diễn đàn

    Chào Khách. Vui lòng xem qua bài viết này
    Để biết cách chèn mã AutoIT trong diễn đàn bạn nhé :)
    Dismiss Notice

Hỏi đáp Anh em sửa giúp code AuTo Sro Silkroad em tìm thấy trên mạng với

Thảo luận trong 'Thảo luận chung - Hỏi đáp' bắt đầu bởi tonyhoaivu, 29/10/17.

  1. tonyhoaivu

    tonyhoaivu Thành viên mới
    • 1/6

    Tham gia ngày:
    9/10/17
    Bài viết:
    8
    Đã được thích:
    0
    Opt ("TrayMenuMode", 1)
    #Include <GuiListView.au3>
    Dim $ listview [3] = ['Vành đai', 'Vùng', 'Trễ'], $ child_buf_ok = -1, $ child_atk_ok = -1, $ swsroCharname = 0xA9DB98, $ ecsroCharname = 0xA9DBB8, $ mysroCharname = 0xA00340, $ run = False, $ epointer = 0xA9EE64, $ spointer = 0xA9EE44, $ zerkoffset = 0x7E6
    Dim $ m = 0, $ e = 0, $ s = 0
    $ GUI = GUICINTCATREATE ('Private Server Bot', 341, 370, @ DesktopWidth / 2-370 / 2, @ DesktopHeight / 2-341 / 2, 0x100A0000)
    GUICtrlCreateGroup ("Ký tự", 5, 5, 325, 45)
    $ char = GUICtrlCreateCombo ( "", 10, 20, 230, -1, 3)
    GUICtrlSetFont (-1, 10)
    $ refresh = GUICtrlCreateButton ( "Refresh", 250, 19, 70, 26)

    GUICtrlCreateGroup ( "Buff", 5, 50, 160 , 250)
    $ buf = GUICtrlCreateListView ("Belt | Slot | Delay", 10, 65, 150, 200)
    _GUICtrlListView_SetColumnWidth ($ buf, 2, -2)
    Đối với $ i = 0 Đến 2
    _GUICtrlListView_SetColumn ($ buf, $ i, $ listview [$ i], -1, 2)
    Tiếp
    $ buf_add = GUICtrlCreateButton ( "Add", 10, 270, 70)
    $ buf_del = GUICtrlCreateButton ( "Delete", 90, 270, 70)
    GUICtrlCreateGroup ( "Tấn công Kỹ năng", 170, 50, 160, 250)
    $ atk = GUICtrlCreateListView ("Belt | Slot", 175, 65, 150, 200)
    Với $ i = 0 Để 1
    _GUICtrlListView_SetColumnWidth ($ atk, $ i, 73)
    _GUICtrlListView_SetColumn ($ atk, $ i, $ listview [$ i], -1, 2)
    Tiếp theo
    $ atk_add = GUICtrlCreateButton ("Thêm", 175, 270,70)
    $ atk_del = GUICtrlCreateButton ("Xóa", 255, 270, 70)

    $ zerk = GUICtrlCreateCheckbox ("Sử dụng Zerk", 10, 307)

    $ start = GUICtrlCreateButton ("Bắt đầu Bot", 75, 305, 120)
    $ stop = GUICtrlCreateButton ("Stop-Bot", 205, 305, 120)

    CharList ()
    ini ()

    Trong khi 1
    Switch GUIGetMsg ()
    Case -3
    Exit
    Case -4
    Tray ()
    Trường hợp $ buf_add
    $ child = GUICreate ("Thêm Buff", 100, 150, -1, -1, 0x10000000, 0x88)
    GUICtrlCreateLabel ("Belt : ", 5, 13)
    $ child_belt = GUICtrlCreateCombo (" ", 45, 10, 40, -1, 3)
    GUICtrlSetData (-1," F1 "F2 | F3" F1 ")
    GUICtrlCreateLabel (" Khe cắm:", 5, 43)
    $ child_slot = GUICtrlCreateCombo ("", 45, 40, 40, -1, 3)
    GUICtrlSetData (-1, "0/1/2/3/4/5/6/7/8/9", 1)
    GUICtrlCreateLabel ( "Delay:", 5, 73)
    $ child_delay = GUICtrlCreateInput (100, 45, 70, 40)
    $ child_buf_ok = GUICtrlCreateButton ("OK", 5, 100, 85, 20, 1)
    Trường hợp $ child_buf_ok
    GUICtrlCreateListViewItem (GUICtrlRead ($ child_belt ($ Child_delay), $ buf)
    GUIDelete ($ con)
    Trường hợp $ buf_del
    _GUICtrlListView_DeleteItemsSelected ($ buf)
    Trường hợp $ atk_add
    $ con = GUICreate ("Thêm kỹ năng tấn công" ) & "|" & GUICtrlRead ($ child_slot) & "|" & GUICtrlRead, 100, 120, -1, -1, 0x10000000, 0x88)
    GUICtrlCreateLabel ("Belt:", 5, 13)
    $ child_belt = GUICtrlCreateCombo ("", 45, 10, 40, -1, 3)
    GUICtrlSetData (-1, "F1" | F2 | F3 | F4 "" F1 ")
    GUICtrlCreateLabel ( "Slot:", 5, 43)
    $ child_slot = GUICtrlCreateCombo ("", 45, 40, 40, -1, 3)
    GUICtrlSetData (-1, "0/1/2/3/4/5/6/7 / 8/9 ", 1)
    $ child_atk_ok = GUICtrlCreateButton (" OK ", 5, 70, 85, 20, 1)
    Trường hợp $ child_atk_ok
    GUICtrlCreateListViewItem (GUICtrlRead ($ child_belt) &" | "và GUICtrlRead ($ child_slot),$ atk)
    GUIDelete ($ con)
    Trường hợp $ atk_del
    _GUICtrlListView_DeleteItemsSelected ($ atk)
    Case $ refresh
    CharList ()
    ini ()
    Trường hợp $ bắt đầu
    FileDelete (GUICtrlRead ($ char) & "ini ")
    Đối với $ i = 0 Để _GUICtrlListView_GetItemCount ($ ATK) -1
    IniWrite (GUICtrlRead ($ char) &". Ini" "atk_skill" , $ i + 1, _GUICtrlListView_GetItemTextString ($ atk, $ i))
    Next
    For $ i = 0 Để _GUICtrlListView_GetItemCount ($ buf) -1
    IniWrite (GUICtrlRead ($ char) & ". ini" "buf_skill", $ i + 1, _GUICtrlListView_GetItemTextString ($ buf, $ i))
    Tiếp theo
    Nếu GUICtrlRead ($ zerk) = 1 Sau đó
    IniWrite (GUICtrlRead ($ char) & ". Ini" "zerk", "on", "1")
    Khác
    IniWrite (GUICtrlRead ($ char) & "ini" "zerk", "on", "0")
    EndIf
    $ run =
    Trường hợp thực sự $ stop
    $ run =
    Trường hợp giả mạo $ char
    ini ()
    Case Else
    InputCheck ()
    Nếu $ chạy Sau đó bot (GUICtrlRead ($ char))
    EndSwitch
    InputCheck ()
    Switch TrayGetMsg ()
    Trường hợp - 13
    Khay ()
    EndSwitch
    InputCheck ()
    WEnd

    Func bot ($ charname)
    $ buff_skill = IniReadSection ($ charname & ". Ini" "buf_skill")
    Nếu IsArray ($ buff_skill) Và $ buff_skill [0] [0] <>0 Sau đó
    Với $ i = 1 $ buff_skill [0] [0]
    Nếu $ run = True thì
    $ string = StringSplit ($ buff_skill [$ i] [1] "|")
    Buff ($ charname, $ string [1], $ string [2], $ string [3])
    InputCheck ()
    endif
    Sleep (10)
    Tiếp
    endif
    $ attack_skill = IniReadSection ($ charname & "ini" "atk_skill")
    Nếu IsArray ($ attack_skill) và $ attack_skill [0] [0] <> 0 Then
    Đối với $ i = 1 $ attack_skill [0] [0]
    Nếu $ chạy = True Sau đó,
    $ string = StringSplit ($ attack_skill [$ i] [1] "|")
    Kỹ năng ($ charname, $ string [1 ],$ string [2])
    InputCheck ()
    Zerk ()
    endif
    Sleep (10)
    Tiếp
    endif
    EndFunc

    Func Kỹ năng ($ charname, $ bar, $ khe, $ chậm trễ = 0,5)
    Nếu Không IsDeclared ($ charname & "kỹ năng" & thanh $ & khe $) Sau đó
    Đối với $ i = 1 đến 5
    SendSro (GetHandle ($ charname), $ bar)
    Tiếp theo
    SendSro (GetHandle ($ charname), $ slot)
    Chỉ định ($ charname & "skill" và $ bar & $ slot, TimerInit (), 2)
    ElseIf TimerDiff (Eval $ charname & "skill" & $ bar & slot $))> $ delay * 1000 Sau đó
    Đối với $ i = 1 đến 5
    SendSro (GetHandle ($ charname)$ bar)
    Tiếp theo
    SendSro (GetHandle ($ charname), $ slot)
    Gán ($ charname & "kỹ năng" & thanh $ & khe $, TimerInit (), 2)
    endif
    EndFunc

    Func Buff ($ charname, $ bar, $ khe, $ chậm trễ = 300)
    Nếu Không IsDeclared ($ charname & "da bò" & $ bar & $ slot) Sau đó,
    SleepWithCheck (2000)
    Với $ i = 1 đến 5
    SendSro (GetHandle ($ charname), $ bar)
    Tiếp theo
    SendSro (GetHandle ($ charname), $ slot)
    SleepWithCheck (2000)
    Assign ($ charname & "buff "$ bar & $ slot, TimerInit (), 2)
    ElseIf TimerDiff (Eval ($ charname &" buff "& $ bar & slot $))> $ delay * 1000 Sau đó
    Gán ($ charname &" buff ", TimerInit ()2)
    SleepWithCheck (2000)
    Đối với $ i = 1 đến 5
    SendSro (GetHandle ($ charname), $ bar)
    Tiếp theo
    SendSro (GetHandle ($ charname), $ slot)
    SleepWithCheck (2000)
    Assign ($ charname & "buff" và $ bar & $ slot, TimerInit (), 2)
    EndIf
    EndFunc

    Func () [
    $ LIST = CLIENT] ")
    Đối với $ i = 1 đến $ list [0] [0]
    Local $ mid = memopen (WinGetProcess ($ list [$ i] [1]))
    Local $ name = memread ($ mid, $ swsroCharname, 'char [12]')
    Nếu $ name <> "Sau đó GUICtrlSetData ($ char, $ name, $ name)
    Local $ name = memread ($ giữa, $ ecsroCharname, 'char [12] ')
    Nếu $ name <> "Sau đó GUICtrlSetData ($ char, $ name, $ name)
    Tên $ local = memread ($ mid, $ mysroCharname, 'char [12]')
    Nếu $ name <> "& $ name <> '? ŻQ' và $ name <> 'h ?? =' & $ Name ($ Charname, $ name)
    memclose ($ mid)
    Next
    EndFunc

    Func GetHandle ($ charname)
    Local $ list = WinList ("[CLASS: CLIENT]") Sau đó, GUICtrlSetData ($ char,
    Đối với $ i = 1 đến $ list [0] [0]
    Local $ mid = memopen (WinGetProcess ($ list [$ i] [1]))
    Local $ name = memread ($ giữa, $ mysroCharname, 'char [12] ')
    Nếu $ name = $ charname Sau đó
    ghi lại ($ giữa)
    Global $ m = 1
    Global $ e = 0
    Global $ s = 0
    Trở lại $ list [$ i] [1]
    EndIf
    Tên miền địa phương $ name = memread ($ mid, $ swsroCharname, 'char [12]')
    Nếu $ name = $ charname Sau đó
    Global $ m = 0
    Global $ e = 0
    Global $ s = 1
    memclose ($ mid)
    Return $ list [ $ i] [1]
    EndIf
    Local $ name = memread ($ mid, $ ecsroCharname, 'char [12]')
    Nếu $ name = $ charname Sau đó
    Global $ m = 0
    Global $ e = 1
    Global $ s = 0
    memclose $ mid)
    Return $ danh sách [$ i] [1]
    endif
    memclose ($ mid)
    Sleep (10)
    Tiếp
    EndFunc
    Func SendSro ($ handle, $ key)
    Chuyển $ key
    Trường hợp "F1"
    $ k = 0x70
    Trường hợp "F2"
    $ k = 0x71
    Trường hợp "F3"
    $ k = 0x72
    Trường hợp "F4"
    $ k = 0x73
    Trường hợp khác
    $ k = 0x30 + $ key,
    EndSwitch
    DllCall ("User32.dll" "int", "PostMessageA", "hwnd", $ handle, "int", 0x100, "int", $ k, "int", 0)
    DllCall ("User32.dll "int", "PostMessageA", "hwnd", $ handle, "int", 0x101, "int", $ k, "int", "0)
    EndFunc

    Func ini ()
    _GUICtrlListView_DeleteAllItems ($ atk)
    _GUICtrlListView_DeleteAllItems ($ buf)
    Nếu
    FileExists (GUICtrlRead ($ char) & ". Ini") Sau đó $ section = IniReadSection (GUICtrlRead ($ char) & ". Ini" "atk_skill")
    nếu IsArray (phần $) Sau đó
    cho $ i = 1 đến $ phần [ 0] [0]
    GUICtrlCreateListViewItem ($ section [$ i] [1], $ aTK)
    Tiếp
    endif
    $ section = IniReadSection (GUICtrlRead ($ char) & "ini" "buf_skill")
    Nếu IsArray ($ section) sau đó
    Đối với $ i = 1 đến $ section [0] [0]
    GUICtrlCreateListViewItem ($ section [$ i] [1], $ buf)
    Tiếp
    endif
    Nếu IniRead (GUICtrlRead ($ char) & "ini" "zerk", "trên", "0") = "1" Sau đó, GUICtrlSetState ($ zerk, 1)
    EndIf
    EndFunc

    Func memopen ($ pid)
    Local $ mid = DllCall ('kernel32.dll', 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $ pid)
    Quay trở lại $ giữa [ 0]
    EndFunc

    Func memread ($ mid, $ address, $ type = 'dword')
    Local $ struct = DllStructCreate ($ type)
    DllCall ('kernel32.dll', 'int', 'ReadProcessMemory', 'int', $ giữa , 'int', $ address, 'ptr', DllStructGetPtr ($ struct), 'int', DllStructGetSize ($ struct), 'int', ")
    Quay lại DllStructGetData ($ struct, 1)
    EndFunc

    Func memreaddynamic ($ giữa, $ con trỏ, $ offset, $ type = "dword")
    $ newadress = memread ($ giữa,$ con trỏ chuột) + $ bù
    lại Quay trở lại memread ($ mid, $ newadress, $ type)
    EndFunc

    Func memwrite ($ mid, $ address, $ byte)
    $ Local $ struct = DllStructCreate ('byte')
    DllStructSetData ($ struct, 1, $ byte)
    DllCall ('kernel32.dll', 'int', 'WriteProcessMemory', 'int', $ giữa, 'int', $ địa chỉ, 'int', DllStructGetSize ($ struct), 'int', 0)
    EndFunc

    Func memclose ($ mid)
    DllCall ('kernel32.dll', 'int', 'CloseHandle', ' int', $ mid)
    EndFunc

    Func Tray ()
    Nếu BitAND (WinGetState ($ GUI), 2) Sau đó
    WinSetState ($ GUI, "", @SW_HIDE)
    Else
    WinSetState ($ GUI, "", @SW_SHOW)
    endif
    EndFunc

    Func IsPressed ($ sHexKey, $ vDLL = 'user32.dll')
    Local $ a_R = DllCall ($ vDLL, "int", "GetAsyncKeyState", "int", $ sHexKey)
    Nếu Không @error Và Bitand ($ a_R [0], 0x8000) = 0x8000 Sau đó trở về 1
    Quay trở lại 0
    EndFunc; ==> _IsPressed

    Func InputCheck ()
    Nếu $ e = 1 Sau đó
    $ CharBase = $ epointer
    ElseIf $ s = 1 Sau đó
    $ CharBase = $ spointer
    endif
    Nếu WinActive (GetHandle (GUICtrlRead ($ char))) Sau đó
    Nếu IsPressed (0x74) Sau đó,
    Nếu $ chạy Sau đó
    $ chạy = False
    Else
    $ chạy = True
    endif
    Để
    ngủ (1)
    Cho đến Không IsPressed (0x74)
    endif
    Nếu IsPressed (0x75) Sau đó,
    $ mid = memopen (WinGetProcess (GetHandle (GUICtrlRead ($ char)))
    Nếu memread ($ mid, $ CharBase + 8, 'bytes') = 1 Sau đó
    memwrite ($ mid, $ CharBase + 8, 0)
    Else
    memwrite ( $ mid, $ CharBase + 8, 1)
    endif
    memclose ($ mid)
    Để
    ngủ (1)
    Cho đến Không IsPressed (0x75)
    endif
    Nếu IsPressed (0x76) Sau đó
    $ mid = memopen (WinGetProcess (GetHandle (GUICtrlRead ($ char))) )
    Nếu memread ($ giữa, $ CharBase + 9, 'byte') = 1 Sau đó,
    memwrite ($ mid, $ CharBase + 9, 0)
    Else
    memwrite ($ mid, $ CharBase + 9, 1)
    endif
    memclose ($ mid)
    Để
    Ngủ (1)
    Cho đến Không IsPressed (0x76)
    endif
    Nếu IsPressed (0x77) Sau đó WinSetState (GetHandle (GUICtrlRead ($ char)) "", @ SW_MINIMIZE)
    endif
    EndFunc

    Func zerk ()
    Nếu GUICtrlRead ($ zerk) = 1 Sau đó
    Nếu $ e = 1 Sau đó
    $ CharBase = $ epointer
    ElseIf $ s = 1 Sau đó
    $ CharBase = $ spointer
    endif
    $ địa phương xử lý = GetHandle (GUICtrlRead ($ char ))
    Local $ mid = memopen (WinGetProcess ($ handle))
    $ Zerkpoints local = memreaddynamic ($ mid, $ CharBase, $ zerkoffset, 'byte')
    Nếu $ zerkpoints = 5 Sau đó
    DllCall ( "User32.dll" "int", "PostMessageA", "hwnd", $ xử lý, "int" , 0x109, "int", 0x09, "int",
    0x09, "int", 0x09, "int", 0 "msgstr" int", 0)
    endif
    memclose ($ mid)
    endif
    EndFunc

    Func SleepWithCheck ($ thời gian)
    Assign ( 'ngủ', TimerInit (),2)
    Để
    InputCheck ()

    Chuyển GUIGetMsg ()
    Trường hợp -3
    Thoát
    trường hợp -4
    Khay ()
    Case $ stop
    $ run = False
    EndSwitch
    Sleep (10)
    Cho đến khi TimerDiff (Eval ('ngủ'))> $ time
    EndFunc
     
  2. tonyhoaivu

    tonyhoaivu Thành viên mới
    • 1/6

    Tham gia ngày:
    9/10/17
    Bài viết:
    8
    Đã được thích:
    0
    em anh xem lại giúp giùm code này em tìm dc trên mạng
     
  3. systemerror

    systemerror Phạm Huy Thiên
    • 8/11

    Tham gia ngày:
    23/2/19
    Bài viết:
    70
    Đã được thích:
    23
    vãi cả gooooooooogle dịch code :v
     
  4. Trầm Cảm

    Trầm Cảm Thành viên
    • 8/11

    Tham gia ngày:
    10/5/19
    Bài viết:
    45
    Đã được thích:
    9
    Bạn để im ko dịch có thể chạy đc code , cái này hàm cũng có tiếng việt , mấy cái hàm lặp nó cũng dịch thành tiếng việt luôn

    for ... để ... next vãi chưa, comment nó ko dùng dấu ; luôn ...
     

Chia sẻ trang này

Đang tải...