[Release] Open Source Rose Launcher[VB .Net] 2.4 Released!

Joined
Jun 11, 2006
Messages
518
Reaction score
0
Location
London, Ontario
Welcome to the Open Source Rose Online Launcher Project.
MjClarke1 - [Release] Open Source Rose Launcher[VB .Net] 2.4 Released! - RaGEZONE Forums

Table of Contents
  1. News
  2. Information
  3. Downloads
  4. Lesson 1 - Configuring the PHP
  5. Lesson 2 - MySql Query for adding news in the Lil News Thing.
  6. Lesson 3 - Launching after update.
  7. Lesson 4 - Adding users for the Admin CP in 2.4
  8. Credits























News:
Sunday, February 18th 2007
Launcher 2.4 Released with Admin Login Feature





Saturday, February 17th 2007
Launcher 2.3 Source released.

-----------------------------------------------------------------


Information

Open Source Launcher 2.4 RELEASED
Features:
News
Server Status
Rankings
Register
Terms of Service
Exit
Start
Update
Multiple Downloads
Upgraded interface
Admin CP

Screenshot:
MjClarke1 - [Release] Open Source Rose Launcher[VB .Net] 2.4 Released! - RaGEZONE Forums


-----------------------------------------------------------------

Downloads

Source 2.4 Code Download:

PHP Files:



PHP Download for

Server Status
Rankings
Register

Found at:



News area can be found at:
http://forum.ragezone.com/rose-online/lil-web-release-roseon-like-news-system-181031.html



----------------------------Lesson 1---------------------------------

Configuring the PHP.

Once extracted open up the PHP folder and open config.php

Code:
<?php

$db['host']			=			'IPADDRESS'; // Database Host
$db['user']			=			'Username'; // Database User
$db['pass']			=			'Password'; // Database Pass
$db['name']			=			'Database'; // Database Name
$serv['title']		=			'Server Title'; // Server Title
?>

Kind of obvious but... replace IPADDRESS with the MySQL Servers IP Address.
Replace username with the login for the sql server
Replace password with the password for the sql server
Replace Database with the name of the database with the roseon files.
Replace Server Title with your servers title.

-------------------------------------------------------------------------

Open Status.php

Code:
<?php
require("config.php");
?>
<table width="270" border="1">
  <tr>
    <td width="107">Login Server: </td>
    <td width="147"><?php

$checkLOGIN = @fsockopen('IPADDRESS', '29000', $ERRNO, $ERRSTR, 1);
if($checkLOGIN) {
echo('<font color=green><b>Online!</font></b>');
} else {
echo('<font color=red><b>Offline!</font></b>');
}
?> </td>
  </tr>
  <tr>
    <td>Character Server: </td>
    <td><?php

$checkCHAR = @fsockopen('IPADDRESS', '29100', $ERRNO, $ERRSTR, 1);
if($checkCHAR) {
echo('<font color=green><b>Online!</font></b>');
} else {
echo('<font color=red><b>Offline!</font></b>');
}
?></td>
  </tr>
  <tr>
    <td>World Server: </td>
    <td><?php

$checkWORLD = @fsockopen('IPADDRESS', '29200', $ERRNO, $ERRSTR, 1);
if($checkWORLD) {
echo('<font color=green><b>Online!</font></b>');
} else {
echo('<font color=red><b>Offline!</font></b>');
}
?>

</td>
<table width="200" border="1">
        <tr>
          <td width="100">Players Online:</td>
          <td width="75"><strong>
          <?php include 'count.php';?>
          </strong></td>
        </tr>
    </table>
  </tr>
</table>
<p><a href="status.php"><BR><BR>Check Again </a></p>

Replace all the IPADDRESS with your servers IP Address

-------------------------------------------------------------------------

Open up count.php

Code:
<?php

/* **************************************************
   EDIT THE FOLLOWING 4 WITH YOUR MYSQL INFORMATION
************************************************** */

$host = "IPADDRESS";     // Name of machine mysql is running on.
$user = "Username";        // Username to access mysql
$pass = "Password";    // Password to access mysql
$dbname = "Database";    // Database with roseon files
/* **************************************************
                 DO NOT CHANGE BELOW
   ************************************************** */

$link = mysql_connect($host, $user, $pass);
mysql_select_db($dbname, $link);
$query = mysql_query("SELECT `online` FROM `accounts`");
$online = mysql_fetch_row($query);
echo($online[0]);
?>

Replace IPADDRESS with the MySQL Servers IP Address.
Replace username with the login for the sql server
Replace password with the password for the sql server
Replace Database with the name of the database with the roseon files.

Configuring Done



---------------------------Lesson 2---------------------------------------


The MySQL Query to add news if you are using the news system is.

Code:
INSERT INTO `news_roseon` VALUES (1, 'Welcome', 'Hello World, '2007-02-16', '0');

Break Down:

1 - The article number

Welcome - The News title

Hello World - Article Body when user clicks title

2007-02-16 - The date the article was posted

0 - The amount of "hits". When a user opens the article, this number goes up by 1.

--------------------------------Lesson 3----------------------------------

Launching after a download.

Looks like
Code:
Private Sub cmdDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDownload.Click

        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If

        'DO THE DOWNLOAD
        Try
            _Downloader = New WebFileDownloader
            _Downloader.DownloadFileWithProgress(txtURL.Text, txtDownloadTo.Text.TrimEnd("\"c) & GetFileNameFromURL(txtURL.Text))
        Catch ex As Exception
            MessageBox.Show("Error: " & ex.Message)
        End Try
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If

    End Sub

Where you see the
Code:
        End If

    End Sub

Add

Code:
Shell ("yourexe.exe")

or 

Shell ("C:/XXXX/XXX/XXX/yourexe.exe")


--------------------------------Lesson 4----------------------------------

Adding users in the Administrator Control Panel.


Open up the project. On the side menu, you will see "users.xml". Double click this to show the source.

It should look like.
Code:
<?xml version="1.0" encoding="utf-8" ?> 
<users>
	<user>
		<name>Test</name>
		<password>pass</password>
		<role>Manager</role>
	</user>
</users>

Explanation:

<name> and </name> -- Opens and closes the name field
<password> and </password> -- Opens and closes the password field.
<role> and </role> -- Opens and closes the "role" field (Not needed yet, when I add a GM CP, It will be need.)
-----------------------------
Now, change test to a name you want for the login.
Then change "pass" to the password you want.
Never touch "role".

If you want to add more users then just copy and paste this:
Code:
	<user>
		<name>Test</name>
		<password>pass</password>
		<role>Manager</role>
	</user>
and configure it.


kthx.
----------------------------------Credits----------------------------------

99.9% Credit to Me! =D

0.1% Credit to DanTheMage for the Tabs idea.

100% Credits to Matt for the PHP codes.
 
Last edited by a moderator:
MJ, can you PM me the updater VB source. I tried to figure out how to do it, and crack the narose one, but couldn't get real far.
 
why ppl dont just make launcher unique for her servers and by themselfs?? i know this is req C++ but without that the server worth nothing...
I can also be done in VB, it is I think less hard. My idea is the server is more worth if they have a own launcher with there own banner. On the other side, yes, it is maybe less worth but it will compete with other Rose p.s and btw it's 'Open Source' I've seen alot of great program which are Open Source and do you think normal are able to code that? It's because ppl share the code. And there are alot of ppl on this forum who can't code. MjClarke1 deserved respect for what he have made cuz there are always a bunch or retards who 'steal' the code and say it is theirs.
 
Re: Open Source Rose Launcher[VB .Net] 2.4 Released!

--------------------------------Lesson 3----------------------------------

Launching after a download.

Looks like
Code:
Private Sub cmdDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDownload.Click
 
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
        'DO THE DOWNLOAD
        Try
            _Downloader = New WebFileDownloader
            _Downloader.DownloadFileWithProgress(txtURL.Text, txtDownloadTo.Text.TrimEnd("\"c) & GetFileNameFromURL(txtURL.Text))
        Catch ex As Exception
            MessageBox.Show("Error: " & ex.Message)
        End Try
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
    End Sub

Where you see the
Code:
        End If
 
    End Sub

Add

Code:
Shell ("yourexe.exe")
 
or 
 
Shell ("C:/XXXX/XXX/XXX/yourexe.exe")
you lost me at that part please explaine more
 
Re: Open Source Rose Launcher[VB .Net] 2.4 Released!

If you want the downloaded program to launch after downloading it succesfully. You just add
Example

Shell ("C:\Program Files\Triggersoft\Rose Online Evolution\trose.exe")

Under
Code:
Private Sub cmdDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDownload.Click
 
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
        'DO THE DOWNLOAD
        Try
            _Downloader = New WebFileDownloader
            _Downloader.DownloadFileWithProgress(txtURL.Text, txtDownloadTo.Text.TrimEnd("\"c) & GetFileNameFromURL(txtURL.Text))
        Catch ex As Exception
            MessageBox.Show("Error: " & ex.Message)
        End Try
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
    End Sub

So it would look like



Code:
Private Sub cmdDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDownload.Click
 
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
        'DO THE DOWNLOAD
        Try
            _Downloader = New WebFileDownloader
            _Downloader.DownloadFileWithProgress(txtURL.Text, txtDownloadTo.Text.TrimEnd("\"c) & GetFileNameFromURL(txtURL.Text))
        Catch ex As Exception
            MessageBox.Show("Error: " & ex.Message)
        End Try
        'VERIFY A DIRECTORY WAS PICKED AND THAT IT EXISTS
        If Not IO.Directory.Exists(txtDownloadTo.Text) Then
            MessageBox.Show("Not a valid directory to download to, please pick a valid directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
 
    End Sub
Shell ("C:\Program Files\Triggersoft\Rose Online Evolution\trose.exe")
 
Re: Open Source Rose Launcher[VB .Net] 2.4 Released!

When I open the project, I dont see users.xml anywhere, nor can I find that file in the project folder.
 
Back