Solitaire beispiel fuer NomadMemory.au3

  • so nach erlaubnis vom chef dachte ich mir mal das ich das mal hochladen kann fuer leute die es interessiert... :D

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <GuiStatusBar.au3>
    #include <GuiMenu.au3>
    #include <WindowsConstants.au3>
    #include <NomadMemory.au3>
    ;#NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    Global $Pointer = 0x01007170
    Global $pOffSet = 0x30
    Global $tOffSet = 0x33
    Global $ID = _MemoryOpen(ProcessExists("sol.exe"))
    ;Global $hItem1
    #Region ### START Koda GUI section ### Form=
    $gui = GUICreate("WindowsXPSolitaireTrainer", 267, 207, -1, -1)
    $Group1 = GUICtrlCreateGroup("Current States", 8, 6, 161, 67)
    GUICtrlCreateLabel("Points:", 18, 26, 36, 17)
    $cPoints = GUICtrlCreateLabel("0000", 54, 26, 106, 17)
    GUICtrlCreateLabel("Time:", 18, 48, 30, 17)
    $cTime = GUICtrlCreateLabel("0000", 48, 48, 112, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Trainer", 10, 84, 185, 97)
    GUICtrlCreateLabel("Set Points:", 18, 100, 55, 17)
    $pInput = GUICtrlCreateInput("1337", 16, 118, 121, 20)
    $pSet = GUICtrlCreateButton("Set", 140, 118, 51, 20)
    $pFreeze = GUICtrlCreateCheckbox("Freeze Points", 16, 142, 97, 17)
    $tFreeze = GUICtrlCreateCheckbox("Freeze Time", 16, 162, 97, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $bExit = GUICtrlCreateButton("Exit", 182, 48, 75, 25)
    $bRun = GUICtrlCreateButton("Run Solitaire", 182, 10, 75, 25)
    $status = _GUICtrlStatusBar_Create($gui, 2)
    _GUICtrlStatusBar_SetParts($status, 2, 125)
    GUISetState(@SW_SHOW)
    Do
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000)
    Exit
    EndIf
    If $msg = $bExit Then
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000)
    Exit
    EndIf
    If $msg = $bRun Then
    Run(@WindowsDir & "\system32\sol.exe")
    GUICtrlSetState($bRun, $GUI_DISABLE)
    CreateMenu()
    EndIf
    Until ProcessExists("sol.exe")
    GUICtrlSetState($bRun, $GUI_DISABLE)
    Sleep(200)
    GetAddress()
    AdlibEnable("CurrentState", 250)

    [/autoit] [autoit][/autoit] [autoit]

    Global $pfAddress = _FindNewAddress($Pointer, $pOffSet)
    Global $tfAddress = _FindNewAddress($Pointer, $tOffSet)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000)
    _MemoryClose($ID)
    Exit
    Case $pSet
    SetPoints()
    Case $pFreeze
    Global $pAddress = "0x" & Hex(_FindNewAddress($Pointer, $pOffSet))
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    Global $pfValue = _MemoryRead($pfAddress, $ID)
    _MemoryClose($ID)
    Case $tFreeze
    Global $tAddress = "0x" & Hex(_FindNewAddress($Pointer, $tOffSet))
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    Global $tfValue = _MemoryRead($tfAddress, $ID)
    _MemoryClose($ID)
    Case $bExit
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00090000)
    _MemoryClose($ID)
    Exit
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _FindNewAddress(ByRef $P, ByRef $OSet)
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    $New_Address = _MemoryRead($P, $ID) + $OSet
    _MemoryClose($ID)
    Return $New_Address
    EndFunc ;==>_FindNewAddress

    [/autoit] [autoit][/autoit] [autoit]

    Func GetAddress()
    $txAddress = _FindNewAddress($Pointer, $tOffSet)
    $pxAddress = _FindNewAddress($Pointer, $pOffSet)
    _GUICtrlStatusBar_SetText($status, "Points: 0x" & Hex($pxAddress), 0)
    _GUICtrlStatusBar_SetText($status, "Time: 0x" & Hex($txAddress), 1)
    EndFunc ;==>GetAddress

    [/autoit] [autoit][/autoit] [autoit]

    Func CurrentState()
    $tAddress = "0x" & Hex(_FindNewAddress($Pointer, $tOffSet))
    $pAddress = "0x" & Hex(_FindNewAddress($Pointer, $pOffSet))
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    $pValue = _MemoryRead($pAddress, $ID)
    $tValue = _MemoryRead($tAddress, $ID)
    GUICtrlSetData($cPoints, $pValue)
    GUICtrlSetData($cTime, $tValue / 1000)
    If GUICtrlRead($pFreeze) = 1 Then
    FreezePoints()
    EndIf
    If GUICtrlRead($tFreeze) = 1 Then
    FreezeTime()
    EndIf
    EndFunc ;==>CurrentState

    [/autoit] [autoit][/autoit] [autoit]

    Func SetPoints()
    $pAddress = "0x" & Hex(_FindNewAddress($Pointer, $pOffSet))
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    $newPValue = GUICtrlRead($pInput)
    _MemoryWrite($pAddress, $ID, $newPValue)
    _MemoryClose($ID)
    EndFunc ;==>SetPoints

    [/autoit] [autoit][/autoit] [autoit]

    Func FreezePoints()
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    _MemoryWrite($pAddress, $ID, $pfValue)
    _MemoryWrite($pfAddress, $ID, $pfValue)
    EndFunc ;==>FreezePoints

    [/autoit] [autoit][/autoit] [autoit]

    Func FreezeTime()
    $ID = _MemoryOpen(ProcessExists("sol.exe"))
    _MemoryWrite($tAddress, $ID, $tfValue)
    _MemoryWrite($tfAddress, $ID, $tfValue)
    EndFunc ;==>FreezeTime

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    aber da es wohl keinen interesiert ;( ... egal es is da und ich machs auch nichmehr weg :P
    auser wegen bugs und anderem ungeziefer :rock:

    • Offizieller Beitrag

    Ich mag es gar nicht, wenn in steter Regelmäßigkeit die Bot-Problematik hochgekocht wird.
    Das Bsp. Solitaire ist im Grenzbereich. Ich habe früher jede Manipulation verdammt, inzwischen sage ich mir: Wenn derjenige sich selbst ein X für ein U vormacht, solls mir egal sein, solange daraus keine Vorteilsnahme oder Verstöße gegen bestehende Bestimmungen/Gesetze entstehen.
    Aus diesem Grund halte ich mich hier zurück (Auch wenn ich das schonmal anders betrachtet habe, ich werde auch älter und ruhiger).
    @No0oB: Du solltest hier aber bitte auch den Ball flach halten und das nicht weiter forcieren. Und damit, hoffe ich, ist das Thema erledigt.