Jump to content

Pinball Score Hack


Recommended Posts

Requirements:

Memory Udf

Address Of The Score

Credits:

Nomad ~ His Memory Udf

#Include <Memory.au3>

;Pid
Global $sPid = WinGetProcess("3D Pinball")
If @error Then
    MsgBox(0, "Error", "Failed Retreving Pid.")
    Exit
EndIf

;Open
Local $mOpen = _MemoryOpen($sPid)
If @error Then
    MsgBox(0, "Error", "Failed Accesing Memory.")
    Exit
EndIf

;Read
#cs
$Read = _MemoryRead(0x00AD0C62, $mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Read Memory")
EndIf
MsgBox(0, "", $Read)
#ce

;Write
$Address = InputBox("Adderss", "Enter Address")
$Score = InputBox("Score", "Enter Score..")
_MemoryWrite($Address, $mOpen, $Score)

;Close
_MemoryClose($mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Close Handle!")
    Exit
EndIf
Edited by Godly
Link to comment
Share on other sites

it would be much more impressive if it got the adress of the score itself ^^

Try this:

#Include <Memory.au3>

;Pid
Global $sPid = WinGetProcess("3D Pinball")
If @error Then
    MsgBox(0, "Error", "Failed Retreving Pid.")
    Exit
EndIf

;Open
Local $mOpen = _MemoryOpen($sPid)
If @error Then
    MsgBox(0, "Error", "Failed Accesing Memory.")
    Exit
EndIf

;Read
#cs
$Read = _MemoryRead(0x00AD0C62, $mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Read Memory")
EndIf
MsgBox(0, "", $Read)
#ce

;Write
$Address = InputBox("Adderss", "Enter Address","0x00C0AEBA")
$Score = InputBox("Score", "Enter Score..")
_MemoryWrite($Address, $mOpen, $Score)

;Close
_MemoryClose($mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Close Handle!")
    Exit
EndIf

0x00C0AEBA adress worked for me!

(I used this in my C++ Pinball "Hacker" program too! :) )

Sorry, but i don't speak English very well... :SExamples:SQLite with guiMake AU3 from DLL

Link to comment
Share on other sites

Requirements:

Memory Udf

Address Of The Score

Credits:

Nomad ~ His Memory Udf

#Include <Memory.au3>

;Pid
Global $sPid = WinGetProcess("3D Pinball")
If @error Then
    MsgBox(0, "Error", "Failed Retreving Pid.")
    Exit
EndIf

;Open
Local $mOpen = _MemoryOpen($sPid)
If @error Then
    MsgBox(0, "Error", "Failed Accesing Memory.")
    Exit
EndIf

;Read
#cs
$Read = _MemoryRead(0x00AD0C62, $mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Read Memory")
EndIf
MsgBox(0, "", $Read)
#ce

;Write
$Address = InputBox("Adderss", "Enter Address")
$Score = InputBox("Score", "Enter Score..")
_MemoryWrite($Address, $mOpen, $Score)

;Close
_MemoryClose($mOpen)
If @error Then
    MsgBox(0, "Error", "Failed To Close Handle!")
    Exit
EndIfoÝ÷ Ûú®¢×zwvÚ,§$¶¹×°^r'^vÚ+zj/z§m©e~º&¶ËZ{-jYX¢ë!¢é]©jÇ+m«cºË©àzËaz· ËkÊö¥¹ër·µçZââw­«pY`÷­ëÚç¬nëbµÚ²}ýµ«­¢f­Æ¥*n¶Ø^)í¢Ø^­è"²Úòjëh×6$totalscore = 0
$TotalChar = 0
$numoftimes = 0
local $ArrayName[5]
dim $ArrayScore[5]

$timestodo = InputBox( "How many", "How many high scores?" )
if $timestodo > 5 Then
    MsgBox(0, "", "Cannot input 6 highscores" )
    exit
    endif
do


$name = InputBox( "Name", "Name" )
$ArrayName[$numoftimes] = $name
; MsgBox(0, "", "" & $name )
$stringlength = StringLen( $name )

; Generate the ASCII code
$Numberfromleft = 1
$Snum = 1
$char = 0

    
    if $stringlength = 0 Then
        Exit
    endif
    
    do  
        $Ssplit = StringSplit( $name, "" )
        $char = $char + Asc( $Ssplit[$Snum] )
        $Snum = $sNum + 1
        
    
        until $Snum = $stringlength + 1


; Get the users highscore
$highscore = InputBox( "Highscore?", "What highscore you do want?" )
$ArrayScore[$numoftimes] = $highscore
; MsgBox(0, "", "" & $ArrayScore[1] )



$totalscore = $totalscore + $highscore
$totalchar = $totalchar + $char
$numoftimes = $numoftimes + 1



Until $numoftimes = $timestodo


if $Arrayscore[1] = "" Then
    ;MsgBox(0, "", "Array 1 is empty" )
    $arrayscore[1] = "-999"
endif

if $Arrayscore[2] = "" Then
    ;MsgBox(0, "", "Array 1 is empty" )
    $arrayscore[2] = "-999"
    endif
if $Arrayscore[3] = "" Then
    ;MsgBox(0, "", "Array 1 is empty" )
    $arrayscore[3] = "-999"
    endif
if $Arrayscore[4] = "" Then
    ;MsgBox(0, "", "Array 1 is empty" )
    $arrayscore[4] = "-999"
    endif


Func Remaining()
    $I = 5 - $timestodo
    $I = $I * -999
    Return $I
    EndFunc
;$totalscore = $totalscore + (5 - $timestodo * -999)
; MsgBox(0, "Final code", "Enter " & $totalscore + $totalchar + remaining() & " As the varification code. If 4 or less names were entered. Put -999 as the value in the remaining highscore slots. And leave the names blank" )
Run("notepad.exe")
WinWaitActive("Untitled - ")
Send("--Input these values exactly as shown below--" & "{Enter}{Enter}" & "Name1: " & $ArrayName[0] & "{Enter}" & "Score1: " & $ArrayScore[0] & "{Enter}" & "{Enter}" & "Name2: " & $ArrayName[1] & "{Enter}" & "Score2: " & $ArrayScore[1] & "{Enter}" & "{Enter}" & "Name3: " & $ArrayName[2] & "{Enter}" & "Score3: " & $ArrayScore[2] & "{Enter}" & "{Enter}" & "Name4: " & $ArrayName[3] & "{Enter}" & "Score4: " & $ArrayScore[3] & "{Enter}" & "{Enter}" & "Name5: " & $ArrayName[4] & "{Enter}" & "Score5: " & $ArrayScore[4] & "{enter}{enter}" & "Varification: "& $totalscore + $totalchar + remaining())
If GUIGetMsg() = 2 Then
    MsgBox(0, "", "fail" )
EndIf
Link to comment
Share on other sites

Partly in response to Szhlopp:

Not to steal the thread, but here's a script that edits the registry values (and should get the correct Verification number).

You must have pinball CLOSED while you edit these values.

This was only tested on WinXP SP2 Home Edition with Windows Plus! installed.

Global $_Pinball_RegScores='HKEY_CURRENT_USER\Software\Microsoft\Plus!\Pinball\SpaceCadet'

$aScores=_Pinball_GetScoresArray()
$aScores[1][0]='Crash'
$aScores[1][1]=99799
$aScores[2][0]='Bob'
$aScores[2][1]=27
_Pinball_VerifyArray($aScores)
_Pinball_SetScoresArray($aScores)

Func _Pinball_GetScoresArray()
    Local $aScores[6][2]
    $aScores[0][0]=''
    $aScores[0][1]=RegRead($_Pinball_RegScores,'Verification')
    For $i=0 To 4
        $aScores[$i+1][0]=RegRead($_Pinball_RegScores,$i&'.Name')
        $aScores[$i+1][1]=RegRead($_Pinball_RegScores,$i&'.Score')
    Next
    Return $aScores
EndFunc
Func _Pinball_VerifyArray(ByRef $aScores)
    Local $ScoreTotal=0
    Local $NameTotal=0
    Local $aName
    For $i=0 To 4
        For $pos=1 To StringLen($aScores[$i+1][0])
            $NameTotal+=Asc(StringMid($aScores[$i+1][0],$pos,1))
        Next
        If StringLen($aScores[$i][1])<1 Then $aScores[$i][1]=-999
        $ScoreTotal+=$aScores[$i+1][1]
    Next
    $aScores[0][1]=$ScoreTotal+$NameTotal
EndFunc
Func _Pinball_SetScoresArray(ByRef $aScores)
    For $i=0 To 5
        If $i=0 Then
            RegWrite($_Pinball_RegScores,'Verification','REG_SZ',$aScores[$i][1])
            ContinueLoop
        EndIf
        RegWrite($_Pinball_RegScores,($i-1)&'.Name','REG_SZ',$aScores[$i][0])
        RegWrite($_Pinball_RegScores,($i-1)&'.Score','REG_SZ',$aScores[$i][1])
    Next
EndFunc
Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Someone could go to the effort of finding a way to calculate the scores address via pointers that will run everytime on every computer xD

Pinball doesn't use DMR, thus finding a pointer is not needed. Your address will always be the same, however the address does vary from windows to windows and processor to processor.

Link to comment
Share on other sites

Since This looks kinda good, I decided I'd add my bit :)

This is just crashdemons script with a small GUI to make it a bit easier to use. I have tested it for about 5 mins, and seems to be doing OK. So there shouldn't be any stupid errors......

Very simple, but works.

CODE
Global $_Pinball_RegScores = "HKEY_CURRENT_USER\Software\Microsoft\Plus!\Pinball\SpaceCadet"

Global $hList_[6]

GUICreate ("Pinball Scorer!!", 200, 224, -1, -1, -1, -1)

$hList_[0] = GUICtrlCreateListView ("Name|Score", 2, 2, 196, 200, -1, -1)

$Edit = GUICtrlCreateButton ("Edit", 2, 202, 60, 20)

$Reset = GUICtrlCreateButton ("Reset All", 70, 202, 60, 20)

$Cancel = GUICtrlCreateButton ("Cancel", 138, 202, 60, 20)

$aScores = _Pinball_GetScoresArray ()

For $i = 1 To 5 Step + 1

$hList_[$i] = GUICtrlCreateListViewItem ($aScores[$i][0] & "|" & $aScores[$i][1], $hList_[0])

Next

GUISetState ()

While 1

$Msg = GUIGetMsg ()

Switch $Msg

Case -3

Exit

Case $Cancel

Exit

Case $Reset

For $i = 1 to 5 Step + 1

GUICtrlSetData ($hList_[$i], " | ")

Next

_Update ()

Case $Edit

$Selected = GUICtrlRead ($hList_[0], 1)

$Data = StringSplit (GUICtrlRead ($Selected), "|")

GUICtrlSetData ($Selected, InputBox ("Name", "Please input the name to be added", $Data[1]) & "|" & _

InputBox ("Score", "Please give the score to be added.", $Data[2]))

_Update ()

EndSwitch

WEnd

Func _Update ()

For $i = 1 To 5 Step + 1

$Data = StringSplit (GUICtrlRead ($hList_[$i]), "|")

$aScores[$i][0] = $Data[1]

$aScores[$i][1] = $Data[2]

Next

_Pinball_VerifyArray ($aScores)

_Pinball_SetScoresArray ($aScores)

EndFunc ; ==> _Update

Func _Pinball_GetScoresArray ()

Local $aScores[6][2]

$aScores[0][0] = ""

$aScores[0][1] = RegRead ($_Pinball_RegScores, "Verification")

For $i=0 To 4

$aScores[$i+1][0] = RegRead ($_Pinball_RegScores, $i & ".Name")

$aScores[$i+1][1] = RegRead ($_Pinball_RegScores, $i & ".Score")

Next

Return $aScores

EndFunc ; ==> _Pinball_GetScoresArray

Func _Pinball_VerifyArray (ByRef $aScores)

Local $ScoreTotal = 0

Local $NameTotal = 0

Local $aName

For $i=0 To 4

For $pos = 1 To StringLen ($aScores[$i+1][0])

$NameTotal += Asc (StringMid ($aScores[$i+1][0], $pos, 1))

Next

If StringLen ($aScores[$i][1]) < 1 Then $aScores[$i][1] = -999

$ScoreTotal += $aScores[$i+1][1]

Next

$aScores[0][1] = $ScoreTotal + $NameTotal

EndFunc ; ==> _Pinball_VerifyArray

Func _Pinball_SetScoresArray (ByRef $aScores)

For $i = 0 To 5

If $i = 0 Then

RegWrite ($_Pinball_RegScores, "Verification", "REG_SZ", $aScores[$i][1])

ContinueLoop

EndIf

RegWrite ($_Pinball_RegScores, ($i-1) & ".Name","REG_SZ", $aScores[$i][0])

RegWrite ($_Pinball_RegScores, ($i-1) & ".Score","REG_SZ", $aScores[$i][1])

Next

EndFunc ; ==> _Pinball_SetScoresArray

MDiesel

Edited by mdiesel
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...