[Help] Making Launcher - 40 Views, no comments -.-

Do you think you've got the skills to help me with this?

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 2223 Views - Last Post: 21 February 2009 - 02:43 PM Rate Topic: ***-- 2 Votes

#1 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

[Help] Making Launcher - 40 Views, no comments -.-

Post icon  Posted 12 February 2009 - 04:07 AM

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...


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

 

[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 (Thanks to Dream.In.Code for helping me with this): [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 Dream.In.Code! :D


Here is my whole code:


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 ^^/>"

		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 ^^/>"

		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)


Posted Image

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 ;)

This post has been edited by jeffijoe: 12 February 2009 - 12:23 PM


Is This A Good Question/Topic? 0
  • +

Replies To: [Help] Making Launcher - 40 Views, no comments -.-

#2 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 08:25 AM

Arent there anyone? ^__^
Was This Post Helpful? 0
  • +
  • -

#3 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 11:44 AM

Aww, cmon! No1 got the guts, or arent you capable of doing anything like this? xD :P
Was This Post Helpful? 0
  • +
  • -

#4 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 01:49 PM

Whats wrong?!.. Why wont anyone help me? :(
Was This Post Helpful? 0
  • +
  • -

#5 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 725
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 01:59 PM

Just an FYI - people have day jobs and volunteer their time to offer help. It is not a requirement.

Your post isn't even 12 hours old - we are not here to jump at your beckon call. Continuously posting about it is not going to yield the results you want either.
Was This Post Helpful? 0
  • +
  • -

#6 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2240
  • View blog
  • Posts: 9,410
  • Joined: 29-May 08

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 02:18 PM

Bumping your post does annoy the people that could help you.
Also some will have looked at the code you've posted and notice that you already have what you need.
But in my opinion you're too lazy to apply it to the other buttons.
If you used the 12 hour doing a code review you would have spotted it.

This post has been edited by AdamSpeight2008: 12 February 2009 - 02:18 PM

Was This Post Helpful? 0
  • +
  • -

#7 xPapeRCuTx  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 79
  • Joined: 15-January 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 12 February 2009 - 03:56 PM

Microsoft has discouraged ini use for nearly a decade now.

Why don't you use the built in application settings?
Much easier...
Was This Post Helpful? 0
  • +
  • -

#8 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 13 February 2009 - 03:13 AM

View PostxPapeRCuTx, on 12 Feb, 2009 - 02:56 PM, said:

Microsoft has discouraged ini use for nearly a decade now.

Why don't you use the built in application settings?
Much easier...



I know, but I want to share my launcher, but not the source..


View PostAdamSpeight2008, on 12 Feb, 2009 - 01:18 PM, said:

Bumping your post does annoy the people that could help you.
Also some will have looked at the code you've posted and notice that you already have what you need.
But in my opinion you're too lazy to apply it to the other buttons.
If you used the 12 hour doing a code review you would have spotted it.




And what exacly do you mean with that 12 hour code review? I have been working on my launcher for 3 days, and I havent found anyway to let it download stuff the way I want it to.

Maybe you should "review" my post. It says Im new to this, I cant know so much as you guys, and Im 14 years old!..

I bumped it, because if I didnt, no1 would see my topic, because it was not on the first page. And then no1 would help.

This post has been edited by jeffijoe: 13 February 2009 - 03:18 AM

Was This Post Helpful? 0
  • +
  • -

#9 xPapeRCuTx  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 79
  • Joined: 15-January 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 13 February 2009 - 06:31 AM

I'm 13 ^-^
Was This Post Helpful? 0
  • +
  • -

#10 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 13 February 2009 - 06:32 AM

View PostxPapeRCuTx, on 13 Feb, 2009 - 05:31 AM, said:

I'm 13 ^-^


Good for you. How long you coded?
Was This Post Helpful? 0
  • +
  • -

#11 jens  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 67
  • View blog
  • Posts: 430
  • Joined: 09-May 08

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 13 February 2009 - 06:59 AM

Hi there!

What we are trying to tell you is that it is considered rude to bump ones questions, at least before a couple of days has gone by.

People here are trying to help but often we have other - more pressing - things to do. Also it usually takes some time to think through what the problem is, how to solve it and how to explain it. This means that patience is nessecary...

Some times the problem seems so simple - and the solution so obvious (maybe even present in the presented code) - that we are lead to believe that the poster just copied somthing from somwhere without thought, in order to fullfill the requirement on presenting code to get help.

We will certainly help you if you show good effort, explain your problem clearly and have patience.

Now you might feel upset that I throw all these do and don't at you but I'm not writing these lines only for you - there are others reading too. :)

Unfortunately I am not the one to help you but I want you to understand that you are welcome and that I and others will try to help you the best we can, taken in to consideration the stuff above.

In the mean time, try looking at some of the tutorials on VB.NET. (You will find them along the right edge of the site).

Regards
/Jens

PS: Since you are a beginner, maybe you should not lable your questions "Advanced", it is misleading and that just irritates people. You see, we try to help with stuff we know and when somthing is labled "Advanced" maybe some intermediate persons will not try to help.

This post has been edited by jens: 13 February 2009 - 07:05 AM

Was This Post Helpful? 0
  • +
  • -

#12 Ändrew  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 25
  • View blog
  • Posts: 312
  • Joined: 21-April 08

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 14 February 2009 - 02:50 AM

For that cheat engine you could just do a loop that when cheat engine is open it termiates it.
Was This Post Helpful? 0
  • +
  • -

#13 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 14 February 2009 - 03:39 AM

@ Jens

Okay, I am sorry for the bumping, but it was because I was so exited to get it working.. I bookmarked my thread, so I can always find it again

^ ^


I did post the code, but there is no Update Function in there. Do you see one? :P
What I want by making this thread is, that if you could give me a hand with it.


@ Andrew

What exacly is a loop, and how will I make one? Could you be alittle more specific? ^.^

This post has been edited by jeffijoe: 14 February 2009 - 03:41 AM

Was This Post Helpful? 0
  • +
  • -

#14 londasgt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 14 February 2009 - 11:32 AM

This should put some light on the "Update Function"...

It is a combination of FTP & MySQL
And I will explain Loops at the end of the post w/ some of my code.

'This requires: System.Data.SqlClient & MySql.Data.MySqlClient Imports

Dim Connect As New MySqlConnection()
Connect = New MySqlConnection
Connect.ConnectionString = "Server=updateserver.com; user id=username; password=password; database=updatedatabase"
Try
Connect.Open()
MsgBox("Connected.", MsgBoxStyle.OkOnly, "Connection")
Catch SQLErr As MySqlException
MsgBox(SQLErr.Message, MsgBoxStyle.Critical)
End
End Try

'Set Textbox1 to contain name of Launcher/Executable
Textbox1.Text = "CabalLauncher"

'Setup MySQL Connection & Query
Dim Adapter As New MySqlDataAdapter
Dim Query = "SELECT * FROM updates WHERE update = '" + TextBox1.Text"'"

Dim Command As New MySqlCommand
Command.Connection = Connect
Command.CommandText = SQLQuery
MyAdapter.SelectCommand = Command

'Execute Query
Dim Data As MySqlDataReader
Data = Command.ExecuteReader()

'Check if TextBox1 matches entry text
If Data.Hasrows = 0 then
MsgBox("No Update Available", MsgBoxStyle.OkOnly, "Updater")
Else

'Connect to FTP and download file
Try
Dim clsRequest As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://ftp.ftp.com/"), System.Net.FtpWebRequest)
clsRequest.Credentials = New System.Net.NetworkCredential("username", "password")
clsRequest.Method = System.Net.WebRequestMethods.Ftp.DownloadFile
Dim bFile() As Byte = System.IO.File.ReadAllBytes("ftp://ftp.ftp.com/updates/" & Textbox1.Text)
Catch Exc As Exception
MsgBox(Exc.Message, MsgBoxStyle.OkOnly, "Exception")
End Try
End if


What this does is, connects to an SQL server, checks to see if the admin put "CabalLauncher" as in entry for table "updates"
If so, then that means that the admin has uploaded an update to the FTP server for you to download,
so if the entry says "CabalLauncher" it goes... Ok that must mean that there is a file needed to be download on the FTP
And goes and downloads it, if there are any messups, exception will catch them
If you use this code, make sure when you upload the update to the FTP, it is named the same as 'Textbox1.Text',
same for SQL

Loops can be done with Goto statements, an easy way (I think) and best way is to Setup a ... IF, Else, EndIf loop w/ goto statement(s)

'This requires: System.IO & System Imports

ProcOpen:

Dim npProc() As Process
npProc = Process.GetProcesses
For Each proc As Process In npProc

If proc.ProcessName = "notepad" Then

Try
MsgBox("Please Close NotePad", MsgBoxStyle.OkOnly, "Error!")

Catch Exc As Exception

MsgBox(Exc.Message, MsgBoxStyle.Critical, "OpenFileError")

End Try

GoTo ProcOpen

Else

File.Open("C:\file.txt")

End If


For this loop example, there are some try and end try statements that aren't needed, but you can keep them encase you want to add something to it, I just had copied this from a program I wrote which checks if a game is open and if it is, trys to get info on it...

If you need any help with any of this code or have any questions, feel free

Your Welcome!

This post has been edited by londasgt: 14 February 2009 - 11:48 AM

Was This Post Helpful? 0
  • +
  • -

#15 jeffijoe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 11-February 09

Re: [Help] Making Launcher - 40 Views, no comments -.-

Posted 15 February 2009 - 10:03 AM

View Postlondasgt, on 14 Feb, 2009 - 10:32 AM, said:

This should put some light on the "Update Function"...

It is a combination of FTP & MySQL
And I will explain Loops at the end of the post w/ some of my code.

'This requires: System.Data.SqlClient & MySql.Data.MySqlClient Imports

Dim Connect As New MySqlConnection()
Connect = New MySqlConnection
Connect.ConnectionString = "Server=updateserver.com; user id=username; password=password; database=updatedatabase"
Try
Connect.Open()
MsgBox("Connected.", MsgBoxStyle.OkOnly, "Connection")
Catch SQLErr As MySqlException
MsgBox(SQLErr.Message, MsgBoxStyle.Critical)
End
End Try

'Set Textbox1 to contain name of Launcher/Executable
Textbox1.Text = "CabalLauncher"

'Setup MySQL Connection & Query
Dim Adapter As New MySqlDataAdapter
Dim Query = "SELECT * FROM updates WHERE update = '" + TextBox1.Text"'"

Dim Command As New MySqlCommand
Command.Connection = Connect
Command.CommandText = SQLQuery
MyAdapter.SelectCommand = Command

'Execute Query
Dim Data As MySqlDataReader
Data = Command.ExecuteReader()

'Check if TextBox1 matches entry text
If Data.Hasrows = 0 then
MsgBox("No Update Available", MsgBoxStyle.OkOnly, "Updater")
Else

'Connect to FTP and download file
Try
Dim clsRequest As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://ftp.ftp.com/"), System.Net.FtpWebRequest)
clsRequest.Credentials = New System.Net.NetworkCredential("username", "password")
clsRequest.Method = System.Net.WebRequestMethods.Ftp.DownloadFile
Dim bFile() As Byte = System.IO.File.ReadAllBytes("ftp://ftp.ftp.com/updates/" & Textbox1.Text)
Catch Exc As Exception
MsgBox(Exc.Message, MsgBoxStyle.OkOnly, "Exception")
End Try
End if


What this does is, connects to an SQL server, checks to see if the admin put "CabalLauncher" as in entry for table "updates"
If so, then that means that the admin has uploaded an update to the FTP server for you to download,
so if the entry says "CabalLauncher" it goes... Ok that must mean that there is a file needed to be download on the FTP
And goes and downloads it, if there are any messups, exception will catch them
If you use this code, make sure when you upload the update to the FTP, it is named the same as 'Textbox1.Text',
same for SQL

Loops can be done with Goto statements, an easy way (I think) and best way is to Setup a ... IF, Else, EndIf loop w/ goto statement(s)

'This requires: System.IO & System Imports

ProcOpen:

Dim npProc() As Process
npProc = Process.GetProcesses
For Each proc As Process In npProc

If proc.ProcessName = "notepad" Then

Try
MsgBox("Please Close NotePad", MsgBoxStyle.OkOnly, "Error!")

Catch Exc As Exception

MsgBox(Exc.Message, MsgBoxStyle.Critical, "OpenFileError")

End Try

GoTo ProcOpen

Else

File.Open("C:\file.txt")

End If


For this loop example, there are some try and end try statements that aren't needed, but you can keep them encase you want to add something to it, I just had copied this from a program I wrote which checks if a game is open and if it is, trys to get info on it...

If you need any help with any of this code or have any questions, feel free

Your Welcome!


Thank you very much. Uhm, the thing is, I dont really understand so much about this, but I am learning :)

Uhm, the thing is also, that Cabal Server's use MSSQL for the databse :D

Do you think you could add my MSN? We could talk about it on MSN. Dont worry, I wont ask you to do my "Homework" for me :P
If you could add me, you could explain all this, maybe in a way so I might understand it :D


Thank you :)

This post has been edited by jeffijoe: 15 February 2009 - 10:04 AM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2