RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Full instructions for myrunuo (02/13/04)

Zulu

Wanderer
Full instructions for myrunuo (06/17/04)

RC0 Update:
There are not a lot of extra features, most just converted the RC0 files. Add MS sql server connection string, tables and MS sql commands. Added a fix for an error when displaying skills on the player.asp page.

Here are complete instructions for setting up myrunuo in RC0.
You can read new instructions http://142.179.148.248/myrunuo.pdf
**backup at http://www.myzh.com/myrunuo.pdf


http://142.179.148.248/MYRunUO-1.0-RC0.zip - includes myrunuo.pdf
**backup at http://www.myzh.com/MYRunUO-1.0-RC0.zip

You can see the working version at http://www.myzh.com

Here is a screen shot of what you can do.
 

Zulu

Wanderer
  • 1) You only need to edit ONE script.[/list:u]

    Scripts\Engines\MyRunUO\config.cs

    Find and edit the following 3 lines, save the file.

    public static bool Enabled = true;
    public static string DatabaseUserID = "";
    public static string DatabasePassword = "";

    **keep in mind there is no user account or password, you can read up on how to create user accounts and passwords. Then you can recreate everything with account names and passwords.**

    That is all you need to run myrunuo on b36.

    Next update will show you how to display stuff on website.
 

Zulu

Wanderer
I will be posting two more pages.

  • one for guilds
    one for paperdoll[/list:u]

    The pages I created are basic version with no backgrounds or extra images.

    The scripts will run unedited on any version of windoze computer with IIS installed.
 

Zulu

Wanderer
I have never written any php before. I have not tested any of this. any fixes or help are welcome. Link to this page to pull up a list of all players.

players.php
[code:1]<html>
<head>
<title>Shard Players</title>
</head>
<?
$username="";
$password="";
$database="MyRunUO";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="select char_id,char_name,char_public from myrunuo_characters WHERE char_public = '1' ORDER by char_name";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

echo "<b><center>Character List</center></b>";

$i=0;
while ($i < $num) {

$char_id=mysql_result($result,$i,"char_id");
$char_public=mysql_result($result,$i,"char_public");

echo "<a href='player.php?id=$char_id'>$char_public</a>";
++$i;
}

?>
</body>
</html>[/code:1]
 

Zulu

Wanderer
I have never written any php before. I have not tested any of this. any fixes or help are welcome.

searchplayers.php
[code:1]<html>
<head>
<title>Search Players</title>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<font face="verdana" size="4">Character Search</font>

<form action="searchplayers.php" method="post">
<font face="verdana" size="2">Search for character named</font> <input type="text" name="charname">
<input type="submit" name="submit" value="SEARCH">
</form>

<font face="verdana" size="2">
<?
$username="";
$password="";
$database="MyRunUO";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="select char_id,char_name,char_public from myrunuo_characters WHERE char_public = '1' AND char_name LIKE '%$_POST["charname"]' ORDER by char_name";
$result=mysql_query($query);
$num=mysql_numrows($result);

mysql_close();

echo "Your search returned the following characters:";

$i=0;
while ($i < $num) {

$char_id=mysql_result($result,$i,"char_id");
$char_public=mysql_result($result,$i,"char_public");

echo "<a href='player.php?id=$char_id'>$char_public</a>";
++$i;
}

?>
</font>
</body>
</html>
[/code:1]
 

tobagin

Sorceror
you forgot to change .asp to .php
echo "<a href='player.asp?id=$char_id'>$char_public</a>";

I Get this error can you help me out?

Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.net scripts...no files found.
Scripts: Verifying...done (1922 items, 471 mobiles)
World: Loading...Loading Jailings
Loaded Jail object:Amanda releases:2
Loaded Jail object:laercio releases:1
Loaded Jail object:vanessa releases:1
Loaded Jail object:mst releases:1
Loaded Jail object:joaop releases:2
Loaded Jail object:warl0ck releases:1
Loaded Jail object:zenom releases:1
7 Jailings Loaded:7
done (124558 items, 5873 mobiles) (11,7 seconds)
Regions: Loading...done
Address: 127.0.0.1:2593
Address: 192.168.254.1:2593
Address: 192.168.0.1:2593
Address: 200.164.9.98:2593
Warning: 4 bad spawns detected, logged: 'badspawn.log'
MyRunUO: Updating status database
MyRunUO: Updating character database
Weather: BrewingStorm
BrewingStorm
Season: Fall
MyRunUO: Unable to connect to the database
System.Data.Odbc.OdbcException: ERROR [HYC00] [MySQL][ODBC 3.51 Driver]Transacti
ons are not enabled
at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE
hType, RETCODE retcode)
at System.Data.Odbc.OdbcTransaction.set_AutoCommit(Boolean value)
at System.Data.Odbc.OdbcTransaction.BeginTransaction()
at System.Data.Odbc.OdbcConnection.BeginTransactionObject(IsolationLevel isol
evel)
at System.Data.Odbc.OdbcConnection.BeginTransaction(IsolationLevel isolevel)
at System.Data.Odbc.OdbcConnection.BeginTransaction()
at Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
MyRunUO: Unable to connect to the database
System.Data.Odbc.OdbcException: ERROR [HYC00] [MySQL][ODBC 3.51 Driver]Transacti
ons are not enabled
at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE
hType, RETCODE retcode)
at System.Data.Odbc.OdbcTransaction.set_AutoCommit(Boolean value)
at System.Data.Odbc.OdbcTransaction.BeginTransaction()
at System.Data.Odbc.OdbcConnection.BeginTransactionObject(IsolationLevel isol
evel)
at System.Data.Odbc.OdbcConnection.BeginTransaction(IsolationLevel isolevel)
at System.Data.Odbc.OdbcConnection.BeginTransaction()
at Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
MyRunUO: Database statements compiled in 12,94 seconds
 

Ceday

Page
btw, if anyone using MS SQL need to change some:

[code:1]
public static string DatabaseDriver= "{SQL Server}";

string connectionString = String.Format( "DRIVER={0};SERVER={1};DATABASE={2};UID={3};PWD={4};", DatabaseDriver, DatabaseServer, DatabaseName, DatabaseUserID, DatabasePassword );
[/code:1]

they are all in Config.cs
 

Ceday

Page
no, you dont have to. System.Data.dll should be there but its there by default..

your problem might be you disabled transactions?? check Config.cs

another problem:

guildtype should be varchar, not int..(myrunuo_guilds)
 

tobagin

Sorceror
Ceday said:
no, you dont have to. System.Data.dll should be there but its there by default..

your problem might be you disabled transactions?? check Config.cs

another problem:

guildtype should be varchar, not int..(myrunuo_guilds)

config.cs[code:1]using System;
using System.Threading;

namespace Server.Engines.MyRunUO
{
public class Config
{
// Is MyRunUO enabled?
public static bool Enabled = true;

// Details required for database connection string
public static string DatabaseDriver = "{MySQL ODBC 3.51 Driver}";
public static string DatabaseServer = "***.***.***.***";
public static string DatabaseName = "*******";
public static string DatabaseUserID = "*******";
public static string DatabasePassword = "*******";

// Should the database use transactions? This is recommended
public static bool UseTransactions = true;

// Database communication is done in a seperate thread. This value is the 'priority' of that thread, or, how much CPU it will try to use
public static ThreadPriority DatabaseThreadPriority = ThreadPriority.BelowNormal;

// Any character with an AccessLevel equal to or higher than this will not be displayed
public static AccessLevel HiddenAccessLevel = AccessLevel.Counselor;

// Export character database every 30 minutes
public static TimeSpan CharacterUpdateInterval = TimeSpan.FromMinutes( 30.0 );

// Export online list database every 5 minutes
public static TimeSpan StatusUpdateInterval = TimeSpan.FromMinutes( 5.0 );

public static string CompileConnectionString()
{
string connectionString = String.Format( "DRIVER={0};SERVER={1};DATABASE={2};UID={3};PASSWORD={4};",
DatabaseDriver, DatabaseServer, DatabaseName, DatabaseUserID, DatabasePassword );

return connectionString;
}
}
}[/code:1]
 
Top