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!

MyRunUOv1.2 - PHP/mySQL - for Linux (mono) and Windows RunUO!

Ixtabay

Sorceror
Updated 2/20.2012 r1.3!
Added new skills and icons

Spellweaving 54
Mysticism 55
Imbuing 56
Throwing 57


This guide is for getting myrunuo working with apache/mysql/php on linux. It is specifically written for openSUSE, but will work for most linux distros, and has been modified to work with client v6.x.x.x/v7.x.x.x + files.



Uploaded with ImageShack.us

**If you are running on Windows, skip the database setup and use the windows tools to setup your database and system DSN.

Along with Apache and mySQL, you need to install the following along with dependencies:

Code:
php-gd
php-mysql
unixODBC

Edit your php.ini. I have attached a working php.ini (edit with Notepad++ not regular notepad)

Code:
vi /etc/php5/apache2/php.ini

Uncomment the following and set values below (also attached is a working php.in from an openSUSE 12.1 server)

Code:
date.timezone = 'CST' ; set this to your servers timezone
memory_limit = 512M ; this gives room to open those big files
max_execution_time = 60 ; you can set this lower, but keep it high at first for testing
extension=php_gd2.dll ; make sure you install php-gd
extension=php_mysql.dll ; be sure php-mysql is installed

Create a mySQL database called MyRunUO and user myrunuo
(* if you are using mono to run your server, create this user with no password and restrict access to be only from localhost *)

Execute the sql in file: mysql-tables.sql to create tables and keys.

Now, create your system DSN. First, setup the driver
(* verify these files are on your server and use the correct path for your server, or it will not work *)

Code:
vi /etc/unixODBC/odbcinst.ini

Press "i" (without the quotes) and paste the following:

Code:
[myodbcdriver]
Description = MySQL ODBC 5.1.8 Driver DNS
Driver = /usr/lib64/libmyodbc5.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup = /usr/lib64/unixODBC/libodbcmyS.so
Setup64 = /usr/lib64/unixODBC/libodbcmyS.so

Press "Esc" , ":wq" + Enter to save

Now, add the system DSN

Code:
vi /etc/odbc.ini

Press "i" (without the quotes) and paste the following:

Code:
[myrunuo]
Description = myodbcdriver
Driver = myodbcdriver
Server = localhost
Database = MyRunUO
Port = 3306
Socket =
Option =
Stmt =

Press "Esc" , ":wq" + Enter to save


Extract the attached MyRunUO-1.2.zip to your web server
Copy the following files into the /uofiles folder
Code:
gumpart.mul
gumpidx.mul
hues.mul
tiledata.mul

set perms on your MyRunUO folder

Code:
chmod -R 755 MyRunUO/


Check to see if you can now see this without error on your browser. You should see MyRunUO, but without any character data yet. If you see this, you are ready to enable MyRunUO on your server.

Code:
vi <path_to_your_runuo_server>/Scripts/Engines/MyRunUO/Config.cs


Now enter the MyRunUO database details

Code:
// Is MyRunUO enabled?
public static bool Enabled = true;
 
// Details required for database connection string
public static string DatabaseDriver= "myodbcdriver";
public static string DatabaseServer= "localhost";
public static string DatabaseName= "MyRunUO";
public static string DatabaseUserID= "myrunuo";
public static string DatabasePassword= "";

--------------------------------------- added 2/19/2012
Extract MyRunUO.rar to your server in /runuo/Script/Engines
---------------------------------------







Restart your runuo server and check again MyRunUO on your web browser. If you set things up properly, you will see character data.

Cheers,
Ixtabay

- edit 2/17/2012: added screenshot
- eidt 2/18/2012: fixed a type in odbcinst code
 

Attachments

  • php.txt
    67.5 KB · Views: 138
  • MyRunUO.rar
    8.3 KB · Views: 148
  • MyRunUO-r1.3.zip
    534.5 KB · Views: 189

Hands Of God

Sorceror
Some info on the setup

Windows, UO 7.0.16, MySql, Apache, PHP.ini has been set to higher memory like in your post. And the muls are where they need to be. If you need any more info just ask.

I have this working i just get a small error.

Code:
MyRunUO: Exception caught in database thread
System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.
5.19]Column count doesn't match value count at row 1
  at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode r
etcode)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMet
hod)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader)
  at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
  at Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
MyRunUO: Status database updated in 0.0 seconds

And also

Code:
MyRunUO: Exception caught in database thread
System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.
5.19]Data too long for column 'guild_abbreviation' at row 1
  at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode r
etcode)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMet
hod)
  at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader)
  at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
  at Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
MyRunUO: Characeter database updated in 1.6 seconds

Which I'm guessing the second is some jack ass admin has changed there guild abbreviation length. Any ideas?

Also it would seem im missing a few gifs for skills. Mainly skill "57g.gif" looks like the files in Images stops at "54g.gif" And my ppl are still buck naked. Here is a like to the page if that helps at all.

http://reborn.kindredgp.com/myrunuo/players.php
 

Ixtabay

Sorceror
I brain farted... I forgot to attach the updated MyRunUO files for your server. They are now attached to the op. Put the files here ---> \runuo\Scripts\Engines\MyRunUO

Overwrite what you have now.

Cheers!
 

Hands Of God

Sorceror
Okay The first problem is gone but the second and third remain. Here is a PDF of the MySQL database. Can you tell me if you see a problem there. There still is the no clothes issue. Any chance you could tell me how you ran that debug for myrunuo in you other post? maybe that would give me more insight into the problem.
 

Attachments

  • myrunuo_guilds.pdf
    174.2 KB · Views: 49

Ixtabay

Sorceror
Ok, looks like you have a guild with an abbreviation somewhere > 4 characters. guild_abbreviation is varchar(4), and the default guild creation process allows only up to 4. Check to see if you have a guild with abbreviation >4.
 

Hands Of God

Sorceror
Okay The first problem is gone but the second and third remain. Here is a PDF of the MySQL database. Can you tell me if you see a problem there. There still is the no clothes issue. Any chance you could tell me how you ran that debug for myrunuo in you other post? maybe that would give me more insight into the problem.

Okay so we have found what may be the issue. A MySQL bug that doesn't like special characters. So we are weeding them out now.

Still no gear on the paper dolls though.
 

Hands Of God

Sorceror
Okay so we have found what may be the issue. A MySQL bug that doesn't like special characters. So we are weeding them out now.

Still no gear on the paper dolls though.

Woot That worked.
Code:
MyRunUO: Updating character database
MyRunUO: Database statements compiled in 0.75 seconds
MyRunUO: Characeter database updated in 1.4 seconds
MyRunUO: Updating status database
MyRunUO: Status database updated in 0.2 seconds

So no special chars in the abbreviation. Good to know.
 

Ixtabay

Sorceror
correction to myrunuo.inc.php

line 22 should be:

Code:
$skillnames = array("Alchemy","Anatomy","AnimalLore","ItemID","ArmsLore","Parry","Begging","Blacksmith","Fletching","Peacemaking","Camping","Carpentry","Cartography","Cooking","DetectHidden","Discordance","EvalInt","Healing","Fishing","Forensics","Herding","Hiding","Provocation","Inscribe","Lockpicking","Magery","MagicResist","Tactics","Snooping","Musicianship","Poisoning","Archery","SpiritSpeak","Stealing","Tailoring","AnimalTaming","TasteID","Tinkering","Tracking","Veterinary","Swords","Macing","Fencing","Wrestling","Lumberjacking","Mining","Meditation","Stealth","RemoveTrap","Necromancy","Focus","Chivalry","Bushido","Ninjitsu","Spellweaving","Mysticism","Imbuing","Throwing");

AI'm working on finding skill icons for the newer skills and will add them asap.
 

Vorspire

Knight
You could just change the varchars' length from 4 to null or 255 - to support any length guild abbreviation.
Remember to make sure the tables use the UTF-8 Charset for encoding data too, that will fix any problems with special chars.
 

Hands Of God

Sorceror
correction to myrunuo.inc.php

line 22 should be:

Code:
$skillnames = array("Alchemy","Anatomy","AnimalLore","ItemID","ArmsLore","Parry","Begging","Blacksmith","Fletching","Peacemaking","Camping","Carpentry","Cartography","Cooking","DetectHidden","Discordance","EvalInt","Healing","Fishing","Forensics","Herding","Hiding","Provocation","Inscribe","Lockpicking","Magery","MagicResist","Tactics","Snooping","Musicianship","Poisoning","Archery","SpiritSpeak","Stealing","Tailoring","AnimalTaming","TasteID","Tinkering","Tracking","Veterinary","Swords","Macing","Fencing","Wrestling","Lumberjacking","Mining","Meditation","Stealth","RemoveTrap","Necromancy","Focus","Chivalry","Bushido","Ninjitsu","Spellweaving","Mysticism","Imbuing","Throwing");

AI'm working on finding skill icons for the newer skills and will add them asap.

Awesome cleared that up. Also i installed anolder version of UO on the box and now the MUL is being pulled right and they have clothes. Im going to do some testing and find out at witch patch they start to fell at and go from there. Thanks for all the help.
 

Vorspire

Knight
Awesome cleared that up. Also i installed anolder version of UO on the box and now the MUL is being pulled right and they have clothes. Im going to do some testing and find out at witch patch they start to fell at and go from there. Thanks for all the help.

The Paperdoll was originally written for 5.x clients, supporting 5.x client tiledata flags for wearable items, whether that has changed will be the decider on whether your items show up on the paperdoll. The PHP script needs to be modified to compensate for it.
 

Ixtabay

Sorceror
The Paperdoll was originally written for 5.x clients, supporting 5.x client tiledata flags for wearable items, whether that has changed will be the decider on whether your items show up on the paperdoll. The PHP script needs to be modified to compensate for it.
Updated to r1.3 for 7.x client support
 

Ixtabay

Sorceror
Awesome cleared that up. Also i installed anolder version of UO on the box and now the MUL is being pulled right and they have clothes. Im going to do some testing and find out at witch patch they start to fell at and go from there. Thanks for all the help.

My pleasure. :) I just added r1.3 with the updates for new skills, and also create some icons for them. Anyone is welcome to make better ones. I'm no artist lol.
 

mumuboy

Sorceror
Great job! I was thinking about using IIS & PHP with MSSQL, anyone have experience with this? Good performance?
 

Vorspire

Knight
The new TileData for clients 7.0.9+ have an extra 4 bytes per entry, the TileFlags data was upgraded from a 32-bit integer to a 64-bit long and the Paperdoll PHP file has not been re-coded for this change.
Unless someone updates it for the data extension, it will never support client files for versions over 7.0.9
 

Vorspire

Knight
Good luck with that, it will take some work doing.

This is the formula you need to fix;
PHP:
512 * 836 + 1188 * $Group + 4 + $GroupIdx * 37
 
Top