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!

[RunUO 2.0 RC1] DEATH on player demise.

zardoz

Sorceror
DEATH on player demise.

Ok, this is a reworked and updated version of the old DEATH character that appears when a player dies. He says something slightly witty, quite often a quote from one of Terry Pratchetts books.

I wrote this for a bit of fun back in the days of pre-1.0 but with suitable changes, it's now available for 2.0.

It DOES require a small edit to Scripts\Mobiles\PlayerMobile.cs but the change is not large.

Code:
       public override void OnDeath( Container c )
       {
           base.OnDeath( c );

       //**********Added for DEATH to appear on Death

       {
           Mobile m = new VisitingDEATH();
           m.Location = c.Location;
           m.Map = c.Map;
       }

       //**********End Added for DEATH

           HueMod = -1;
           NameMod = null;
           SavagePaintExpiration = TimeSpan.Zero;

           SetHairMods( -1, -1 );
 

Attachments

  • Death_Chars.cs
    11.4 KB · Views: 405

rcw01

Wanderer
DEATH on player demise.

Great script, question, how do I make the rez gate stay longer. I comes and goes really quick.

Thanks
Gramps
 

zardoz

Sorceror
The gate is running on its own default timer.

Code:
	if (!m_Owner.Deleted)
	  {
	    Effects.SendLocationParticles (EffectItem.Create (m_Owner.Location, m_Owner.Map, EffectItem.DefaultDuration), 0x1fcb, 10, 14, 2023);
	    m_Owner.PlaySound (0x293);
	    m_Owner.Delete ();
	  }

You will need to use another method to make it remain for longer. It's ages since I wrote this code and I haven't experimented with alternatives much.

The other timers used are the obvious 5 senonds ones. You can play with these as much as you like.

Z.
 
Top