Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Subsystems

Subsystems This forum is for modifications to the various subystem code of RunUO

Reply
 
Thread Tools Display Modes
Old 01-30-2005, 05:59 PM   #1 (permalink)
P3'c Orion Aviator
 
Join Date: Sep 2004
Age: 30
Posts: 1,272
Default DeathShrouds, DeadPeople, and the Runuo-Core

Some Customizing Info About DeathShrouds, DeadPeople and the RunUO Core....

Here is how to change the type of item dead people wear...

Inside Mobile.cs find this code (on line 3627)

Code:
Item deathShroud = new Item( 0x204E );

deathShroud.Movable = false;
deathShroud.Layer = Layer.OuterTorso;

AddItem( deathShroud );
Change it to this code...
Code:
Item deadwear = new Item( XXXX );
deadwear.Movable = false;
deadwear.Layer = Layer.OuterTorso;
//Insert any other characteristics here
AddItem( deadwear );
XXXX is where the Itemid of the desired clothing should be placed.
There is a //comment where you can add any other properties to the Item
such as name and Hue like so....
Code:
deadwear.Name = "Some Name Here";
deadwear.Hue = "Some Hue Here";
be sure to put your desired Hue/Name where specified.

Importantly also change this code..
Code:
m_Items.Remove(deathShroud);
m_Items.Insert(0,deathShroud);
to this
Code:
m_Items.Remove(deadwear);
m_Items.Insert(0,deadwear);
so when it loops through the m_Items array later it will find and
remove the proper item on resurection.


Now very importantly, find this code in Mobile.cs
Code:
if ( item.ItemID == 0x204E )
	item.Delete();
Change the "0x204E" to the ItemID of the item above (the XXXX).

Save Mobile.cs and compile it and all dead players
will be wearing this new item while dead
rather than the old "deathshroud".

The main purpose behind this is I wanted deathshrouds
in random hues and other properties.
Just to give ghosts a little color :"P.

So in the "//Insert any other characteristics here" of the item I have..(for example)
Code:
deadwear.Hue = Utility.RandomMinMax( 1, 500 );
deadwear.Name  = ("a robe, crafted by " + NameList.RandomName( "female" );
The result is all dead people have a randomly hued shroud from hues 1 to 500
And named a robe crafted by (a random female name).

Now this is not exactly what I did, as I have it Display the name of the mobiles killer,
but most any code could easily be implimented into this.
You may even call a method that is written outside of the core, for ease of editing later.

----------------------------------------------------------------------------------------------------
If you dont know what a method is, how to compile the core,
figure that out before reading ahead....
----------------------------------------------------------------------------------------------------

Heres How to use a Method Instead of declaring the item inside the core
Change This...
Code:
if ( item.ItemID == 0x204E )
	item.Delete();
to this,

Code:
if ( item.Layer == Layer.OuterTorso )
	item.Delete();
Now Find this code..
Code:
Item deathShroud = new Item( 0x204E );

deathShroud.Movable = false;
deathShroud.Layer = Layer.OuterTorso;

AddItem( deathShroud );
and replace it with this (for example)
Code:
DressDeadPeople();
Now in a script outside the Core you can declare the
DressDeadPeople() method like
Code:
public void DressDeadPeople()
{
Item deadwear = new Item( XXXX );
deadwear.Movable = false;
deadwear.Layer = Layer.OuterTorso;
//Insert any other characteristics here
AddItem( deadwear );
m_Items.Remove(deadwear);
m_Items.Insert(0,deadwear);
}
be sure to pass any arguments you need, and include the proper "Using"
in the Mobile.cs header to the script knows where to find your method.


Just thought this may be helpfull for someone out there so I wrote
down examples as I went along. Gives the shard a nice personal touch.

-Jamie Nguyen


please dont pm/email about compiling the core.
I will simply ignore your message
sirens song is offline   Reply With Quote
Old 02-01-2005, 07:48 AM   #2 (permalink)
Forum Novice
 
Join Date: Sep 2002
Posts: 106
Default

deadwear.Name = ("a robe, crafted by " + NameList.RandomName( "female" );

Isn't that a syntax error?
The bracket before the first quote?
darkstorm is offline   Reply With Quote
Old 02-01-2005, 10:24 AM   #3 (permalink)
P3'c Orion Aviator
 
Join Date: Sep 2004
Age: 30
Posts: 1,272
Default

It wouldnt matter.
sirens song is offline   Reply With Quote
Old 09-26-2005, 07:34 PM   #4 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Houston, TX
Age: 20
Posts: 313
Send a message via ICQ to autumntwilight Send a message via AIM to autumntwilight Send a message via MSN to autumntwilight Send a message via Yahoo to autumntwilight
Default

Quote:
Originally Posted by darkstorm
deadwear.Name = ("a robe, crafted by " + NameList.RandomName( "female" ));

Isn't that a syntax error?
The bracket before the first quote?
It is I think.... There should be another "(" where i made it blue.
autumntwilight is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5