Initializing Database...
Done!
Initializing Character...
Query Database: SELECT * FROM myrunuo_characters WHERE char_id='208392'
Done!
Initializing Mul files...
Done!
Removing Guild Strings...
Done!
Setting Body Index...
Index: 12 * Female: 0
Done!
Setting BodyHue...
BodyHue: * Gump: 1
Done!
Set Dimesions: W:266 H:285
Initializing Items...
Query Database: SELECT * FROM myrunuo_characters_layers WHERE char_id='208392' ORDER BY layer_id
Found Item - Parsing...
Item ID: 5399 * Layer: 0 * Hue: 857
Found Item - Parsing...
Item ID: 5905 * Layer: 1 * Hue: 0
Found Item - Parsing...
Item ID: 5431 * Layer: 2 * Hue: 263
Found Item - Parsing...
Item ID: 5435 * Layer: 3 * Hue: 1726
Found Item - Parsing...
Item ID: 7939 * Layer: 4 * Hue: 1254
Found Item - Parsing...
Item ID: 5907 * Layer: 5 * Hue: 1714
Insert Items into Variables...
Index-> 12,5399,5905,5431,5435,7939,5907
Female-> 0,0,0,0,0,0,0
Gump-> 1,0,0,0,0,0,0
Hue-> ,857,0,263,1726,1254,1714
Done!
Building The Gump...
Verifying Mul Files:
TileData: Resource id #4
Hues: Resource id #3
Gump: Resource id #5
Gump Index: Resource id #6
Done!
Parsing Values...
Done!
Parsing Each Item...
Index: 12 * Female: 0 * Hue: 0 * Gump: 1
Load The Raw Gump...
Get Value From GumpIndex: returned ...
Get Value From GumpIndex: returned ...
Get Value From GumpIndex: returned ...
Index: 5399 * Female: 0 * Hue: 857 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Index: 5905 * Female: 0 * Hue: 0 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Index: 5431 * Female: 0 * Hue: 263 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Index: 5435 * Female: 0 * Hue: 1726 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Index: 7939 * Female: 0 * Hue: 1254 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Index: 5907 * Female: 0 * Hue: 1714 * Gump: 0
Get Value From TileData: returned ...
Flags Say NOT WEARABLE, move to next Item...
Yes, all the MUL filesTiledata.cs. Is it set write?
How to fix MyRunUO Paperdoll.php
1. Rewrite font paths in every file using it (make_logo.php, razor_setup.php and paperdoll.php) :
$font_path = 'fonts/Calibri.ttf';
to
$font_path = dirname(__FILE__) . "/fonts/Calibri.ttf";
2. On Windows Servers, PHP enabled through IIS, using PHP8
in php.ini, changed
extension=php_gd2.dll
to
extension=php_gd.dll
3. Using PHP versions 7.4 and above, change this in config.php
Find fuction "check_get" and remove reference to magic_quotes_gpc. It has been deprecated from PHP 7.4.
Change $magic = get_magic_quotes_gpc();
to
$magic = 0;
function add_gump($read, &$img)
{
if (strpos($read, "ERROR"))
return;
$data = explode("DATASTART:\n", $read);
$data = $data[1];
$newdata = explode("***", $data);
foreach($newdata as $key => $val) {
if ($val == "DATAEND!")
break;
$val = explode(":", $val);
$x = intval($val[0]) + 65;
$y = intval($val[1]) + 65;
$r = intval($val[2]);
$g = intval($val[3]);
$b = intval($val[4]);
$length = intval($val[5]); // pixel color repeat length
//fix for an error where red component was out of range
if($r > 255) { $r = 255; }
if($g > 255) { $g = 255; }
if($b > 255) { $b = 255; }
if($r < 0) { $r = 0; }
if($g < 0) { $g = 0; }
if($b < 0) { $b = 0; }
if ($r || $g || $b) {
$col = imagecolorallocate($img, $r, $g, $b);
for ($i = 0; $i < $length; $i++)
imagesetpixel($img, $x+$i, $y, $col);
}
}
}
while (list($key, $val) = @each($newdata)) {
if ($val == "DATAEND!")
break;
$val = explode(":", $val);
foreach($newdata as $key => $val) {
if ($val == "DATAEND!")
break;
$val = explode(":", $val);
// Check if we're applying a special hue (skin hues), if so, apply only to grays
if (($orighue > 0x8000) && ($r == $g && $r == $b)) {
$newr = (($color32[$r] >> 10))*8;
$newg = (($color32[$r] >> 5) & 0x1F)*8;
$newb = ($color32[$r] & 0x1F)*8;
}
else if ($orighue > 0x8000) {
$newr = $r * 8;
$newg = $g * 8;
$newb = $b * 8;
}
else {
$newr = (($color32[$r] >> 10))*8;
$newg = (($color32[$r] >> 5) & 0x1F)*8;
$newb = ($color32[$r] & 0x1F)*8;
}
// Check if we're applying a special hue (skin hues), if so, apply only to grays
if (($orighue > 0x8000) && ($r == $g && $r == $b)) {
$newr = $r * 8;
$newg = $g * 8;
$newb = $b * 8;
}
else if ($orighue > 0x8000) {
$newr = $r * 8;
$newg = $g * 8;
$newb = $b * 8;
}
else {
$newr = $r * 8;
$newg = $g * 8;
$newb = $b * 8;
}
Thank you so much,now trying to install this system!!!up (for those who didn't read my edits and who would want to give it a shot. good luck )
C:\LegacyMULConverter>LegacyMULCL-N.exe
LegacyMULConverter version N-2.2.
Syntax:
-x <path> Extracts known UOP files in <path> into MUL format.
<path> Packs known MUL files in <path> into UOP format.
C:\LegacyMULConverter>LegacyMULCL-N.exe -x .
LegacyMULConverter version N-2.2.
Mode: Extract from UOP.
Extracting '.\artLegacyMUL.uop'... done.
All actions completed successfully.
System.Data.Odbc.OdbcException (0x80131937): ERROR [42000] [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.28]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.2022)' at line 1
? System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
? System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
? System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
? System.Data.Odbc.OdbcCommand.ExecuteNonQuery()
? Server.Engines.MyRunUO.DatabaseCommandQueue.Thread_Start()
Now that the old version is working again, I want to focus on a new version that will read the new files. Since I have no idea how to read the UOP file directly from PHP, I guess the best place to start is my converting the UOP file.
This is the latest conversion I found:
Releases · cbnolok/LegacyMULConverter-N
Can anyone confirm that this this tool works properly?
Looks pretty straight forward...
Code:C:\LegacyMULConverter>LegacyMULCL-N.exe LegacyMULConverter version N-2.2. Syntax: -x <path> Extracts known UOP files in <path> into MUL format. <path> Packs known MUL files in <path> into UOP format.
I copied artLegacyMUL.uop from an updated EA Ultima Online client to a directory containing conversion tool and converted artLegacyMUL.uop into two files:
Code:C:\LegacyMULConverter>LegacyMULCL-N.exe -x . LegacyMULConverter version N-2.2. Mode: Extract from UOP. Extracting '.\artLegacyMUL.uop'... done. All actions completed successfully.
The output was two files: art.mul and artidx.mul
The names of these two files differ slightly from the old versions: gumpart.mul and gumpidx.mul, but seem to be the right files
Along with these two converted files, I copied also from the recently patched EA Ultima Online directory: hues.mul and tiledata.mul
I've searched all over the web for clues on how to read these new files. This is what I've found:
The new UOP file format
MyRunUO ... displaying Paperdolls correctly
Updated paperdoll.php
GitHub - Vita-Nex/UOPaperdoll: Web-based generation of the in-game Paperdoll in Ultima Online.
GitHub - ppardalj/ultima-paperdoll-drawer-php: Library to generate paperdoll images for Ultima Online characters
Getting the paperdoll.php working with the new files (converted or native uop) is key to making a great new MyRunUO.
If you have the skill to fix paperdoll.php so that it will read the new files, I would love you hear from you! Otherwise, I would like to hear about anyone else experiences with recent artLegacyMUL.uop, hues.mul, and tiledata.mul.
Thanks!
I've sent you a PM with one of my old projects that should be enough for you to understand how to read art.mul and artidx.mul. It is how I generated in-game images on-the-fly on a website by item ID and hue.
I'd love to see this too! Can you post it here or send me a copy?
Thanks,
HR
Thanks so much! I'm always interested in source code to learn from!
HR
Please do not use the code as-is for any public site. It almost certainly lacks input sanitation which could lead to your whole server getting hacked. This is also the reason I do not want it public for long but I will leave it up a bit longer for any other interested parties.
Thanks for sharing !
A few years ago, there were some many cool websites that could show gear and items a player was carrying in game, a bit like you can see on LOTRO official realms/websites.
But indeed, the original version from Ixtabay works like a charm now. Thanks for fixing this. I can't wait to hear more about future web projects
// Path
$base_ref="185.70.111.99"; // This is the root URL where your MyRunUO resides, minus the http://
// Shard Info - This will appear on your logo and also in the Razor setup image.
$shard_name="Asgard World";
$shard_addr="82.144.223.15"; // Your server name (ie. servuo.myhost.com)
$shard_port="2593"; // your server port
// Edit your database settings:
$SQLhost = "185.70.111.99";
$SQLport = "3306";
$SQLuser = "user";
$SQLpass = "password";
$SQLdb = "database";
$mulpath = "MUL_FILES/"; // Edit path of .mul files: gumpart.mul gumpidx.mul hues.mul tiledata.mul
$validhosts = ""; // Leave blank to allow any host to use your paperdoll generator.
using System;
using System.Text;
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 8.0 Unicode Driver}";
public static string DatabaseServer = "185.70.111.99";
public static string DatabaseName = "database";
public static string DatabaseUserID = "user";
public static string DatabasePassword = "password";
// Should the database use transactions? This is recommended
public static bool UseTransactions = true;
// Use optimized table loading techniques? (LOAD DATA INFILE)
public static bool LoadDataInFile = true;
// This must be enabled if the database server is on a remote machine.
public static bool DatabaseNonLocal = ( DatabaseServer != "localhost" );
// Text encoding used
public static Encoding EncodingIO = Encoding.ASCII;
// 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( 1.0 );
// Export online list database every 5 minutes
public static TimeSpan StatusUpdateInterval = TimeSpan.FromMinutes( 1.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;
}
}
}
RunUO - [www.runuo.com] Version 2.0, Build 2710.12842
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (3420 items, 643 mobiles)
Regions: Loading...done
World: Loading...Warning: Duplicate region name 'Jail' for map 'Felucca'
done (529153 items, 41137 mobiles) (13.36 seconds)
Time System: Calculated managed lights list and found 1063 lights.
Time System: Loading complete.
Time System: The time is 10.51AM on Offle 8th in the year 101. The moon is waning two thirds.
Onsite: Loading Points [ ]100%
Onsite: Load Complete.
Xanthos.Utilities.ConfigParser attempting to load Data/ShrinkConfig.xml...
Xanthos.Utilities.ConfigParser failed.
Semolo Fully Automated Tournament System...Initialized
Address: 127.0.0.1:2593
Address: fe80::88e8:aac8:d324:a0e0%4:2593
Address: fe80::10ce:e8d:ad6f:20f0%5:2593
Address: 82.144.223.15:2593
Address: 2001:0:2851:782c:10ce:e8d:ad6f:20f0:2593
Jail System: Starting
Jail System: 0 jailed players loaded.
Client: 188.130.177.172: Connected. [1 Online]
Login: 188.130.177.172: Invalid password for 'Chill'
Client: 188.130.177.172: Disconnected. [0 Online]
Client: 188.130.177.172: Connected. [1 Online]
Warning: 25 bad spawns detected, logged: 'badspawn.log'
Client: 188.130.177.172: Connected. [2 Online]
Login: 188.130.177.172: Invalid password for 'Just'
Client: 188.130.177.172: Disconnected. [1 Online]
Cleanup: Detected 895 inaccessible items, including 3 bank boxes, removing..
Login: 188.130.177.172: Invalid password for 'Kill'
Client: 188.130.177.172: Disconnected. [0 Online]
MyRunUO: Updating character database
MyRunUO: Database statements compiled in 0.55 seconds
MyRunUO: Exception caught in database thread
System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.33-0ubuntu0.16.04.1]The used command is not allowed with this MySQL version
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
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
21:37:43 MyRunUO: Exception caught in database thread
21:37:43 System.Data.Odbc.OdbcException (0x80131937): ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-8.0.34]The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
We use essential cookies to make this site work, and optional cookies to enhance your experience.