Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with visual basic(newbie)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Itachi08
Expert Cheater
Reputation: 0

Joined: 03 Nov 2006
Posts: 101

PostPosted: Mon Apr 01, 2013 9:51 am    Post subject: Help with visual basic(newbie) Reply with quote

I'm trying to make a trainer for some online game and i did it once a few years ago using that trainer maker kit(which doesn't work now i guess for windows 7), anyways i heard visual basic is pretty easy for these things so i kind of started learning today just enough to complete this trainer.
however i have a problem. I have HP Regeneration, mana and etc..
and i downloaded some module that handles writing and reading to process
- called ReadWritingMemory.vb . however, when i try "freezing" the value of the Address i get into trouble. I tried doing a never ending while loop and that causes the trainer to freeze and crash eventually. anyways here's what i've written so far.. its pretty basic and any recommendations are welcome!
Code:

Public Class Form1



    Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
        Dim HPRegen As Single = 500.0

        While CheckBox1.Checked <> False
            WriteFloat("game", &H877FFD8, HPRegen)
            'If CheckBox1.Checked = False Then
            'Exit While
            'End If
        End While


    End Sub

    Private Sub CheckBox2_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox2.CheckedChanged
        Dim MPRegen As Single = 500.0

        While CheckBox2.Checked <> False
            WriteFloat("game", &H11812BD0, MPRegen)
            'If CheckBox2.Checked = False Then
            'Exit While
            'End If
        End While




    End Sub


    Private Sub CheckBox3_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox3.CheckedChanged
        Dim STMRegen As Single = 500.0

        While CheckBox3.Checked <> False
            WriteFloat("game", &H11812B58, STMRegen)
            'If CheckBox3.Checked = False Then
            'Exit While
            'End If
        End While

    End Sub

    Private Sub Button1_Click_1(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim dwUp As Byte = 1
        WriteInteger("game", &H67DBB0, dwUp)
    End Sub

    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick

    End Sub
End Class

_________________
Back to top
View user's profile Send private message
jucce
Advanced Cheater
Reputation: 1

Joined: 02 Apr 2013
Posts: 99

PostPosted: Wed Apr 03, 2013 9:16 pm    Post subject: Reply with quote

You should put the loop in a different thread from the main functionality of the program. That way it won't block execution of your user interface. Also you might want to sleep in the thread for like 50 ms between each time you update the value. That way it is less intensive and changing every 50 ms should be enough, although you should probably experiment with the value.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites