ServUO Version
Publish Unknown
Ultima Expansion
Renaissance
What code would i have to add where in order for any blue npc killed to give the player a long term murder charge?
running runuo fyi
 
I am also using RunUO. I added the following code (by byron) to the OnBeforeDeath method in BaseVendor, and to each blue mob or mob type:

Code:
public override bool OnBeforeDeath () // byron 11/18/04
        {    

            Mobile killer = this.LastKiller;
           PlayerMobile pm = killer as PlayerMobile;

            if ( this.LastKiller is PlayerMobile && !this.AlwaysMurderer && killer !=null && !killer.Deleted )
            {
               killer.Kills ++;
                killer.ShortTermMurders++;
                killer.SendLocalizedMessage (1049067); // You have been reported for murder!
                if (killer.Kills == 5)
                    killer.SendLocalizedMessage (502134); // You are now known as a murderer!
            }
            return base.OnBeforeDeath ();
}
 
Refactored Version!:
        public override bool OnBeforeDeath () // Wilson 05/29/24
        {  
            if (!AlwaysMurderer && LastKiller != null && LastKiller is PlayerMobile)
            {
                PlayerMobile pm = LastKiller as PlayerMobile;
               
                pm.Kills ++;
                   
                pm.ShortTermMurders++;
                   
                pm.SendLocalizedMessage (1049067); // You have been reported for murder!
                   
                if (pm.Kills > 4)
                {
                    pm.SendLocalizedMessage (502134); // You are now known as a murderer!
                }
            }

            return base.OnBeforeDeath ();
        }
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back