You are free to edit this at any time
EDIT : The news are a bit buggy.
The language is VB 2008 .NET
Orginal release thread : HERE
This is the source code as of version 1.35:
Code:
Option Explicit On
Public Class Launcher
'''''''''' GamerzLauncher ''''''''''
''''''' Programmed by XTZGZoReX.
''''''' Courtesy of http://www.gamerzwow.net.
''''' <CONFIGURATION> '''''
''- Launcher -''
' Should the launcher stay open by default? Yes or No.
Dim StayOpen = "No"
' Allow playing on Blizzard servers? Yes or No.
Dim AllowBlizz = "Yes"
' Allow browsing of other sites in the news browser? Yes or No.
Dim NewsBrowse = "Yes"
''- Client -''
' The client language. Usually enGB or enUS. Can be esES, deDE, krKR, and frFR too.
Dim Lang = "enGB"
' Name of the WoW executable file.
Dim FileName = "wow.exe"
' Address to the realmlist.
Dim RealmList = "logon.gamerzwow.net"
' Address to the patchlist. For info on how this works in this launcher, see the GamerzWoW forums.
Dim PatchList = "logon.gamerzwow.net"
''- Server -''
' The name of the server.
Dim ServerName = "GamerzWoW"
' The server's website.
Dim ServerSite = "http://www.gamerzwow.net"
' The news page of the server.
Dim NewsPage = "http://www.gamerzwow.net/launcher.php"
''- Chat -''
' Text describing what the chat is for.
Dim ChatText = "You can use the chat for support, or just for general chit chat."
' Link to the page containing the Java chat.
Dim ChatLink = "http://www.gamerzwow.net/chat.php"
' Width of the chat Java applet.
Dim ChatWidth = "650"
' Delay until the user can open or close the chat after clicking one of the buttons.
Dim ChatDelay = "7500"
''- Language -''
' Message that shows if WoW couldn't be found by using the two methods available.
Dim NotFound = "The WoW path could not be detected. Furthermore, the WoW executable was not found in the current directory of the launcher. You must place the launcher in your WoW folder, or install the game properly."
' The text at the checkbox that decides whether or not to keep the launcher open.
Dim CheckBox = "Keep Launcher Open"
' The button that launches the chat.
Dim LaunchChat = "Launch Chat"
' The button that closes the chat.
Dim CloseChat = "Close Chat"
' The buttons that launch WoW.
Dim LaunchWoW = "Launch WoW"
' The button that opens the server site.
Dim VisitSite = "Visit Site"
''''' </CONFIGURATION> '''''
Dim BlizzRealmList
Dim BlizzPatchList
Dim ExecPath
Dim RLFPath As String
Dim Key As String = "HKEY_LOCAL_MACHINESOFTWAREBlizzard EntertainmentWorld of Warcraft"
Dim ClientPath As String = Microsoft.Win32.Registry.GetValue(Key, "InstallPath", "NOTFOUND")
Declare Function ShellExecuteA Lib "shell32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Integer) As IntPtr
Private Shared Function FindWindow( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As IntPtr
End Function
Const VERSION = "1.35"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If ClientPath = "NOTFOUND" Then
RLFPath = vbNullString
If System.IO.File.Exists(FileName) = False Then
MsgBox(NotFound, MsgBoxStyle.OkOnly, ServerName & " Launcher")
ExecPath = vbNullString
Button3.Enabled = False
Button3.Enabled = False
Else
ExecPath = FileName
Button3.Enabled = True
Button4.Enabled = True
End If
Else
ExecPath = ClientPath & FileName
RLFPath = ClientPath
Button3.Enabled = True
Button4.Enabled = True
End If
Me.Text = ServerName & " Launcher" & " - Version " & VERSION
WebBrowser2.Navigate(NewsPage)
If NewsBrowse = "Yes" Then
WebBrowser2.AllowNavigation = True
Else
WebBrowser2.AllowNavigation = False
End If
CheckBox1.Text = CheckBox
Button1.Text = LaunchChat
Button2.Text = CloseChat
Button3.Text = LaunchWoW & " - " & ServerName
Button4.Text = LaunchWoW & " - Blizzard"
Button5.Text = VisitSite
Timer1.Interval = ChatDelay
Timer2.Interval = ChatDelay
Label1.Text = ChatText
WebBrowser1.Navigate("about:blank")
Button2.Enabled = False
If StayOpen = "Yes" Then
CheckBox1.Checked = True
Else
CheckBox1.Checked = False
End If
If Not AllowBlizz = "Yes" Then
Button4.Visible = False
End If
If Lang = "enGB" Or Lang = "frFR" Or Lang = "deDE" Or Lang = "esES" Then
BlizzRealmList = "eu.logon.worldofwarcraft.com"
BlizzPatchList = "eu.version.worldofwarcraft.com"
End If
If Lang = "enUS" Then
BlizzRealmList = "us.logon.worldofwarcraft.com"
BlizzPatchList = "us.version.worldofwarcraft.com"
End If
If Lang = "krKR" Then
BlizzRealmList = "kr.logon.worldofwarcraft.com"
BlizzPatchList = "kr.version.worldofwarcraft.com"
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim AppWidth = Me.Width + ChatWidth
Me.Width = AppWidth
WebBrowser1.Visible = True
WebBrowser1.Navigate(ChatLink)
Button1.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Width = "366"
WebBrowser1.Visible = False
WebBrowser1.Navigate("about:blank")
Timer2.Enabled = True
Button2.Enabled = False
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Call Shell(ExecPath)
Dim RealmListFile = RLFPath & "realmlist.wtf"
RealmListFile = Nothing
Dim RealmListFileW As New IO.StreamWriter(RealmListFile)
RealmListFileW.WriteLine(RealmList)
RealmListFileW.WriteLine(PatchList)
RealmListFileW.Dispose()
If Not CheckBox1.Checked = True Then
Me.Width = "366"
WebBrowser1.Visible = False
WebBrowser1.Navigate("about:blank")
Button1.Enabled = True
Button2.Enabled = False
End
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Call Shell(ExecPath)
Dim RealmListFile = RLFPath & "realmlist.wtf"
RealmListFile = Nothing
Dim RealmListFileW As New IO.StreamWriter(RealmListFile)
RealmListFileW.WriteLine(BlizzRealmList)
RealmListFileW.WriteLine(BlizzPatchList)
RealmListFileW.Dispose()
If Not CheckBox1.Checked = True Then
Me.Width = "366"
WebBrowser1.Visible = False
WebBrowser1.Navigate("about:blank")
Button1.Enabled = True
Button2.Enabled = False
End
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ShellExecuteA(Me.Handle, "open", ServerSite, vbNullString, vbNullString, vbNormalFocus)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Button2.Enabled = True
Timer1.Enabled = False
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Button1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser2.DocumentCompleted
WebBrowser2.Visible = True
End Sub
End Class
There's still a lot left to do. For example, it doesn't actually download patches yet. We're not even sure if it will have a patch downloader, or if we'll let WoW handle that.
However, progress has been made.
Changelog:
Code:
Now grabs WoW's path from registry. If not found, it will try to find it in the current directory. If not found, again, it will disallow the user from launching WoW and tell them to install it properly, or, move the launcher to the right location.
Nothing should be hardcoded now.
The language can now be customized in the configuration, so it fits localized servers.
The news browser is no longer hardcoded. You can now put your own URL, and, enable or disable offsite browsing inside the news browser.
Made some minor graphical improvements.
Source: Download
Copyright (C) XTZGZoReX of GamerzWoW