Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Hotkey problem


Rekomendowane odpowiedzi

Opublikowano

Witam mam taki skrypt na bota i mam problem z nim gdy wskaze mu jakis hotkey np F3 i czas to pisze mi na czacie gry czy pomoze mi ktos rozwiazac problem ? Z góry dziekuje.

 

Tutaj Skrypt:

 

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Timers.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("BOT", 461, 440, 314, 161)
    GUISetBkColor(0xFF00FF)
    $Label1 = GUICtrlCreateLabel("Wpisz wymagane dane. Pamietaj, ze w polu klawisz wpisz hotkey w {}, a czas normalnie w sekundach !", 16, 8, 164, 49)
    GUICtrlSetBkColor(-1, 0x00FF00)
    $Input1 = GUICtrlCreateInput("{Klawisz}", 16, 72, 161, 21)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Input2 = GUICtrlCreateInput("Czas", 16, 104, 161, 21)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Uruchom !", 16, 144, 161, 41)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    $Label2 = GUICtrlCreateLabel("Uzupelnianie HP  (w polu ilosc hp podaj ilosc kiedy ma zostac uzyty hotkey)  ", 256, 8, 188, 49)
    GUICtrlSetBkColor(-1, 0x00FF00)
    $Input3 = GUICtrlCreateInput("Klawisz w {}", 256, 72, 185, 21)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Input4 = GUICtrlCreateInput("Ilosc hp", 256, 104, 185, 21)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button2 = GUICtrlCreateButton("Uruchom!", 256, 144, 185, 41)
    GUICtrlSetBkColor(-1, 0xFFFF00)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Button1
                $ff=GUICtrlRead($Input2)
                $ff *= 1000
                _Timer_SetTimer($form1,$ff,"hotkey")
                $ks=GUICtrlRead($Input1)
            Case $Button2
                $x=GUICtrlRead($Input3)
                $pid = ProcessExists("Tibia.exe")
                $memaaa = _MemoryOpen($pid)
                _Timer_SetTimer($form1,500,"hotkey1")
        EndSwitch
    WEnd

    Func hotkey($1,$2,$3,$4)
        ControlSend("Tibia","","",$ks)
    EndFunc
   Func hotkey1 ($1,$2,$3,$4)
    $y=GUICtrlRead($Input4)
    $mem = _MemoryRead((0x557000 - 0x400000) +  _MemoryGetBaseAddress($memaaa, 1), $memaaa)
    if $mem>=$y Then
        ControlSend("Tibia","","",$x)
        MsgBox(0,"","INPUT:"&$y&"  MEM:"&$mem)
        EndIf
        EndFunc
    Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0)

        Local $iv_Address = 0x00100000
        Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
        Local $vData
        Local $vType

        If Not IsArray($ah_Handle) Then
            SetError(1)
            Return 0
        EndIf


        DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))

        If Not @error Then

            $vData = Hex(DllStructGetData($v_Buffer, 2))
            $vType = Hex(DllStructGetData($v_Buffer, 3))

            While $vType <> "00000080"
                DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
                $vData = Hex(DllStructGetData($v_Buffer, 2))
                $vType = Hex(DllStructGetData($v_Buffer, 3))
                If Hex($iv_Address) = "01000000" Then ExitLoop
                $iv_Address += 65536

            WEnd

            If $vType = "00000080" Then
                SetError(0)
                If $iHexDec = 1 Then
                    Return Dec($vData)
                Else
                    Return $vData
                EndIf

            Else
                SetError(2)
                Return 0
            EndIf

        Else
            SetError(3)
            Return 0
        EndIf

    EndFunc   ;==>_MemoryGetBaseAddress

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...