sirens song
Wanderer
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)
Change it to this code...
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....
be sure to put your desired Hue/Name where specified.
Importantly also change this code..
to this
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
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)
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...
to this,
Now Find this code..
and replace it with this (for example)
Now in a script outside the Core you can declare the
DressDeadPeople() method like
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
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 );
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";
Importantly also change this code..
Code:
m_Items.Remove(deathShroud);
m_Items.Insert(0,deathShroud);
Code:
m_Items.Remove(deadwear);
m_Items.Insert(0,deadwear);
remove the proper item on resurection.
Now very importantly, find this code in Mobile.cs
Code:
if ( item.ItemID == 0x204E )
item.Delete();
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