From c13f8d249382185cd728bc9afb1e8a41783d7973 Mon Sep 17 00:00:00 2001 From: WarrentyExpired Date: Thu, 23 Jul 2026 20:05:46 -0400 Subject: [PATCH] #W# Added usable ankhs to the shrines. --- Data/Decoration/Britannia/Ankhs.cfg | 31 ++++++ Scripts/Items/Construction/Ankhs.cs | 140 +++++++++++------------- Scripts/Quests/Rewards/BleedersBlade.cs | 7 +- 3 files changed, 99 insertions(+), 79 deletions(-) create mode 100644 Data/Decoration/Britannia/Ankhs.cfg diff --git a/Data/Decoration/Britannia/Ankhs.cfg b/Data/Decoration/Britannia/Ankhs.cfg new file mode 100644 index 0000000..8658e94 --- /dev/null +++ b/Data/Decoration/Britannia/Ankhs.cfg @@ -0,0 +1,31 @@ +# Compassion +AnkhNorth 0x4 +2487 1479 5 + +# Honesty +AnkhNorth 0x4 +4136 1091 0 + +# Honor +AnkhWest 0x3 +1872 2823 12 + +# Humility +AnkhWest 0x3 +4124 2998 5 + +# Justice +AnkhWest 0x3 +1648 546 20 + +# Sacrifice +AnkhNorth 0x4 +3742 924 2 + +# Spirituality +AnkhWest 0x3 +1000 1849 20 + +# Valor +AnkhWest 0x3 +1242 3410 3 diff --git a/Scripts/Items/Construction/Ankhs.cs b/Scripts/Items/Construction/Ankhs.cs index a4ebd3e..5b46a08 100644 --- a/Scripts/Items/Construction/Ankhs.cs +++ b/Scripts/Items/Construction/Ankhs.cs @@ -1,20 +1,26 @@ using System; -using Server; using System.Collections; using System.Collections.Generic; -using Server.Mobiles; -using Server.Items; -using Server.Regions; -using Server.Network; -using Server.Misc; +using Server; using Server.Gumps; -using System.Globalization; +using Server.Mobiles; +using Server.ContextMenus; namespace Server.Items { public class Ankhs { - public const int ResurrectRange = 8; + public const int ResurrectRange = 2; + public const int LockRange = 2; + + public static void GetContextMenuEntries( Mobile from, Item item, List list ) + { + if ( from is PlayerMobile ) + list.Add( new LockKarmaEntry( (PlayerMobile)from ) ); + + list.Add( new ResurrectEntry( from, item ) ); + + } public static void Resurrect( Mobile m, Item item ) { @@ -31,86 +37,44 @@ namespace Server.Items else m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there! } - } - public class Shrine : Item - { - [Constructable] - public Shrine( ) : base( 0x1BC3 ) + private class ResurrectEntry : ContextMenuEntry { - Movable = false; - Visible = false; - Name = "shrine"; - } + private Mobile m_Mobile; + private Item m_Item; - public Shrine( Serial serial ) : base( serial ) - { - } - - public override bool HandlesOnMovement{ get{ return true; } } // Tell the core that we implement OnMovement - - public override void OnMovement( Mobile m, Point3D oldLocation ) - { - if ( Parent == null && Utility.InRange( Location, m.Location, 1 ) && !Utility.InRange( Location, oldLocation, 1 ) ) - Ankhs.Resurrect( m, this ); - } - - -//Region reg = Region.Find( this.Location, this.Map ); -//reg.IsPartOf( "the Castle of the Black Knight" ) - - - public override bool HandlesOnSpeech{ get{ return true; } } - - public override void OnSpeech( SpeechEventArgs e ) - { - if ( !e.Handled ) + public ResurrectEntry( Mobile mobile, Item item ) : base( 6195, ResurrectRange ) { - Mobile m = e.Mobile; + m_Mobile = mobile; + m_Item = item; - string keyword = ""; + Enabled = !m_Mobile.Alive; + } - if ( m.Region.IsPartOf( "the Altar of Golden Rangers" ) || m.Region.IsPartOf( "the Ranger Outpost" ) ){ keyword = "Aurum"; } - else if ( m.Region.IsPartOf( "the Moon's Core" ) ){ keyword = "Ultimum Potentiae"; } - else if ( m.Region.IsPartOf( "the Black Magic Guild" ) ){ keyword = "Kas"; } - else if ( m.Region.IsPartOf( "the Tomb of Kas the Bloody Handed" ) ){ keyword = "Mortem Mangone"; } - else if ( m.Region.IsPartOf( "the Tomb of Malak the Syth Lord" ) ){ keyword = "Anakasu Arrii Venaal"; } - - if ( !m.Player ) - return; - - if ( !m.InRange( GetWorldLocation(), 10 ) ) - return; - - bool isMatch = false; - - if ( e.Speech.ToLower().IndexOf( keyword.ToLower() ) >= 0 ) - isMatch = true; - - if ( !isMatch ) - return; - - e.Handled = true; - - if ( this.Name == "Kargoth" && this.Name == keyword ){} + public override void OnClick() + { + Resurrect( m_Mobile, m_Item ); } } - public override void OnDoubleClickDead( Mobile m ) + private class LockKarmaEntry : ContextMenuEntry { - Ankhs.Resurrect( m, this ); - } + private PlayerMobile m_Mobile; - public override void Serialize( GenericWriter writer ) - { - base.Serialize( writer ); - writer.Write( (int) 0 ); // version - } + public LockKarmaEntry( PlayerMobile mobile ) : base( mobile.KarmaLocked ? 6197 : 6196, LockRange ) + { + m_Mobile = mobile; + } - public override void Deserialize( GenericReader reader ) - { - base.Deserialize( reader ); - int version = reader.ReadInt(); + public override void OnClick() + { + m_Mobile.KarmaLocked = !m_Mobile.KarmaLocked; + + if ( m_Mobile.KarmaLocked ) + m_Mobile.SendLocalizedMessage( 1060192 ); // Your karma has been locked. Your karma can no longer be raised. + else + m_Mobile.SendLocalizedMessage( 1060191 ); // Your karma has been unlocked. Your karma can be raised again. + } } } @@ -143,6 +107,12 @@ namespace Server.Items Ankhs.Resurrect( m, this ); } + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + Ankhs.GetContextMenuEntries( from, this, list ); + } + [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { @@ -236,6 +206,12 @@ namespace Server.Items Ankhs.Resurrect( m, this ); } + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + Ankhs.GetContextMenuEntries( from, this, list ); + } + [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { @@ -299,6 +275,12 @@ namespace Server.Items Ankhs.Resurrect( m, this ); } + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + Ankhs.GetContextMenuEntries( from, this, list ); + } + [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { @@ -394,6 +376,12 @@ namespace Server.Items Ankhs.Resurrect( m, this ); } + public override void GetContextMenuEntries( Mobile from, List list ) + { + base.GetContextMenuEntries( from, list ); + Ankhs.GetContextMenuEntries( from, this, list ); + } + [Hue, CommandProperty( AccessLevel.GameMaster )] public override int Hue { diff --git a/Scripts/Quests/Rewards/BleedersBlade.cs b/Scripts/Quests/Rewards/BleedersBlade.cs index e1c7afb..a20c01e 100644 --- a/Scripts/Quests/Rewards/BleedersBlade.cs +++ b/Scripts/Quests/Rewards/BleedersBlade.cs @@ -5,6 +5,8 @@ namespace Server.Items { public class BleedersBlade : Katana { + public override int UOSpeed{ get{ return 70; } } + [Constructable] public BleedersBlade() { @@ -13,9 +15,8 @@ namespace Server.Items Hue = 32; AccuracyLevel = WeaponAccuracyLevel.Supremely; - DamageLevel = WeaponDamageLevel.Vanq; - - DurabilityLevel = WeaponDurabilityLevel.Indestructible; + DamageLevel = WeaponDamageLevel.Vanq; + DurabilityLevel = WeaponDurabilityLevel.Indestructible; } public BleedersBlade( Serial serial ) : base( serial )