|
||
|
|||||||
| Subsystems This forum is for modifications to the various subystem code of RunUO |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
P3'c Orion Aviator
Join Date: Sep 2004
Age: 30
Posts: 1,272
|
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 ); 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" );
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(); Code:
if ( item.Layer == Layer.OuterTorso ) item.Delete(); Code:
Item deathShroud = new Item( 0x204E ); deathShroud.Movable = false; deathShroud.Layer = Layer.OuterTorso; AddItem( deathShroud ); Code:
DressDeadPeople(); 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);
}
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|