Problem with Trainer.

03/03/2010 20:59 kokoiv#1
Hey guys at the moment im working on a Vac for the game WYD.
However i wrote some trainers before but never had a problem like this one. In my eyes im doing it correct. But somehow it just doesnt work. Might anyone could look at it?
(This is just a poorly coded one since im just trying to fix the mistake as fast as possible. It just includes the diffrent ways and some tests. So dont wonder .)

Ok This is my situation:

At the moment i got following pointers. ( I will only need one example later )
Character X - 1/4
Character X - 2/4
Character X - 3/4
Character X - 4/4
Character Y - 1/4
Character Y - 2/4
Character Y - 3/4
Character Y - 4/4
Universal Mob Pointer X (ORC)
Universal Mob Pointer X (ORC)
Universal Mob Pointer X (ORC)
Universal Mob Pointer X (ORC)
Universal Mob Pointer Y (ORC)
Universal Mob Pointer Y (ORC)
Universal Mob Pointer Y (ORC)
Universal Mob Pointer Y (ORC)

Later i will need to make the uni pointer (= to the Character ones.)

To test weather my trainer works until now i only want to write something to my Character X. (So i will only show you the X 1/4 now)
It looks like following:

[Only registered and activated users can see links. Click Here To Register...]

so what i have to do to get the base adress is calculating

00285D40+ 0400000 = 685D40 which i can store as my pointer.

And now my code looks following:

Code:
Public Class Form1
    Private Declare Function ReadProcessMemory Lib "KERNEL32" (ByVal Handle As Integer, ByVal ByValAdress As Integer, ByRef Value As Long, ByVal Size As Integer, ByRef BytesWritten As Integer) As Long
    Private Declare Function WriteProcessMemory Lib "KERNEL32" (ByVal Handle As Integer, ByVal Adress As Integer, ByRef Value As Long, ByVal Size As Integer, ByRef BytesWritten As Integer) As Long
    Private Declare Sub PushKeys Lib "KeyPush.dll" (ByVal Keystrokes As String)
    Private charPointer As Integer
    Declare Auto Function SendMessage Lib "user32" ( _
ByVal hWnd As IntPtr, _
ByVal Msg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim myProcesses As Process() = Process.GetProcessesByName("WYDWO")
        If myProcesses.Length = 0 Then
            MsgBox("Unable to Find the wyd process.", MsgBoxStyle.OkCancel, "Error")
            End
        Else
            If Not OpenProcess(myProcesses(0).Id) Then
                MsgBox("Unable to open the wyd process.")
                End

            Else
                charPointer = readInteger(&H685D40) 
            End If
        End If

    End Sub 'Open wyd Process


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim Open = Process.GetProcessesByName("WYDWO")
        If Open.Length = 0 Then
            Exit Sub
        End If
        Dim pointer As Long
        pointer = readInteger(&H400000 + &H285D40)
   
        writeFloat(pointer + &H224, 555)
        writeFloat(charpointer + &H224, 55)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim posY As Long
        Dim pointer As Integer
        pointer = readInteger(&H685D40)
        posY = readFloat(Pointer + &H224).ToString
        TextBox3.Text = CStr(posY)
    End Sub
End Class

This code is totaly messed since i tried SHIT LOADS of diffrent ways. However it SHOULD work. If i use a static adress it works. So its not a matter of protection or something. Theres something wrong with the pointer calculation. But its not wrong calculated since if i add the offset to the calculated pointer on CE im getting the correct adress.

Any idea?