Im New to the Language, and I need help

jeffijoe

New member
Joined
Feb 25, 2009
Messages
3
Programming Experience
Beginner
Hey all.

Uhm, I am making a Launcher for a Game Called Cabal, and it will be for Private Servers. The thing is, that it is so easy to Hack/cheat on Pservers, and because the files for Cabal we use are old, we dont have good protection against hackers. One of the things is, that when a player presses CTRL+***+*** or something, they acivate a GM command, which is only allowed for GM's. I need to prevent that, and I also need to prevent people from using Cheat Engine. I am also planning on using Update Funcion, so if a player tries to change the CabalMain, so the Version will change (Which must not happen. If they change it to a specifik version, they can use GM commands)
If there is any Anti-Hack out there, which is free, please link it. I have google'd for 1 hour. And more, and just did not find anything.


About the Update Funcion and Game Launch:

My idea is, that when they launch the game through Start The Game Button, the Update Function will check if their version of CabalMain is the specifik Version, without GM Commands, and if it is anything else, it will patch it over with the right one, which will be downloaded from my webserver. It will also download everyting else in the folder in my Web Server. (I use Xampp)
It will download it to the location the launcher is stored, which is the Cabal folder.
If there is no updates, there will be a label that says:"No updates avaivable. You can start the game now."
There will also be a progress bar, but I have no idea on how to code it, so it matches everything...

Also, I want it to prevent people from having 2 CabalMain's open at once..

About the buttons that take you to the diferent site's in the Webbrowser inside my launcher:

I want the buttons to go to the site, which is specified in a settings.ini, and the same for the Update Function. Here is my idea:


settings.ini

VB.NET:
[settings]

Forum = "www.myforumpage.com"

Site = "www.mysite.com"

UpdateHost = "http://myip/update/cabalupdate/"  (Thats where the files to download will be stored.)
 
Rankings = "http://myip/myrankingfolder"         (Thats where the Rankings are, but thats a web script. When the button is pressed, it will appear in the WebBrowser)

HomePage = "http://myip/whateveriwant/newsmaybe.txt"

Donate = "www.paypal.com/whatevertakesmetomydonorpage"

ServerStaff = "http://myip/serverstaff/staff.txt"

ServerFeatures = "http://myip/features/features.txt"

Vote = "www.xtremetop100.com/whateverandwheremyvotepageis" (This one will be opend it IE or Firefox, but I already know how to do that)

Register = "http://myip/register"
________________________________________________________________________________
_______________________________

My Progress So Far:


Layout: [X]

Buttons: [X]

Start The Game with CabalMain with breaklee command: [X]

No border and drag/moveable: [X]

Minimize to Tray: [X]

Exit Button Coded myself: [X]

Minimize to Task Bar Button Made By Myself: [X]

Update Function : []

Settings.ini []

________________________________________________________________________________
_______________________________


As you see, I need loads of help with the settings.ini and the Update Function. I am gonna need all the help I can get.


If you find it in your heart to help a newbie in VB.NET, please, help me with coding my dream-launcher, and add me on MSN:

jeffijoe@hotmail.com (please, IF you add me, say that you are from vbdotnetforums :D

Here is my whole code:

VB.NET:
Public Class Form1

    Dim doDrag As Boolean
    Dim x As Integer
    Dim y As Integer

    Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
        doDrag = True
        x = Windows.Forms.Cursor.Position.X - Me.Left
        y = Windows.Forms.Cursor.Position.Y - Me.Top
    End Sub

    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        If doDrag Then
            Me.Top = Windows.Forms.Cursor.Position.Y - y
            Me.Left = Windows.Forms.Cursor.Position.X - x
        End If
    End Sub

    Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
        doDrag = False
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

        Dim start As String

        start = "This shows the server Staff. I want the names lined up in a column, just no idea how xD"

        MsgBox(start)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If FileIO.FileSystem.FileExists("cabalmain.exe") Then
            Dim p As Process = Process.Start("cabalmain.exe", "breaklee")
            p.WaitForExit()
        Else
            MsgBox("Could not find CabalMain.exe! Did you put this in your Cabal Folder?;)")
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Dim vote As String

        vote = "This will take you to the Vote Page, specified in the .ini whatsthat.gif"

        MsgBox(vote)

    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click



    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        WebBrowser1.Navigate("http://77.212.63.28/test/forum.txt")


    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

        Dim start As String

        start = "This will show the rankings. The rankings are taken from the Database. By that, I mean that it takes the status from the DB. It goes after level, and Alz.;)"

        MsgBox(start)

    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        Dim start As String

        start = "This takes you to the donor page whatsthat.gif"

        MsgBox(start)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        Dim start As String

        start = "This takes you to the Server site, specified in the .ini :D"

        MsgBox(start)

    End Sub

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Dim p As New Process
        p.StartInfo.FileName = "iexplore.exe"
        p.StartInfo.Arguments = "http://forum.ragezone.com/members/jeffijoe-501677.html"
        p.Start()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

        Application.Exit()

    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        Me.WindowState = FormWindowState.Minimized

    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

        MsgBox("Welcome to the Jeffijoe Client, made by Jeffijoe, Owner of TriForCe Cabal. Look around on the Client to see all the functions. Everytime you move your mouse over a word, and it flashes, it have a function. Today find out on what it does, simply click it. The X button Exits the Client, and the _ will minimize it.")




    End Sub

    Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Content_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Content.Click

        MsgBox("Click a button like Register, Rankings, or something, and the result will appear in the Web Browser under me :D                                                                                                            Unless the server is offline, then you should get a navigation error;)")


    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        Me.Hide()
        NotifyIcon1.Visible = True
        NotifyIcon1.Text = "Jeffijoe Client"
    End Sub

    Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
        NotifyIcon1.Visible = True
        Me.Show()
        NotifyIcon1.Text = "Jeffijoe Client"
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

    End Sub
End Class


Here is how the launcher will look: (and it looks like it now)

launcherpic.jpg


The cat in the middle is actually inside a web browser :D

I really hope that you guys will give me a hand on this!


Thank you.

-Jeffijoe


P.S. I'm 14 years old, so dont expect me to know Everything. I just started VB.NET.
 
Can you reduce the length of some of the lines in your code? I have your post spread across two 1600x1200 screens and I'm struggling to read it

Additionally, I have rather a strong aversion to code that is full of Button1, Label47, Checkbox325. Name your variables soemthing proper, because most programmers can't be bothered continuously looking up magic numbers
 
Back
Top