#W# Added usable ankhs to the shrines.

This commit is contained in:
WarrentyExpired 2026-07-23 20:05:46 -04:00
parent abee6aa3eb
commit c13f8d2493
3 changed files with 99 additions and 79 deletions

View file

@ -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

View file

@ -1,20 +1,26 @@
using System; using System;
using Server;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Server.Mobiles; using Server;
using Server.Items;
using Server.Regions;
using Server.Network;
using Server.Misc;
using Server.Gumps; using Server.Gumps;
using System.Globalization; using Server.Mobiles;
using Server.ContextMenus;
namespace Server.Items namespace Server.Items
{ {
public class Ankhs 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<ContextMenuEntry> 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 ) public static void Resurrect( Mobile m, Item item )
{ {
@ -31,86 +37,44 @@ namespace Server.Items
else else
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there! m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
} }
}
public class Shrine : Item private class ResurrectEntry : ContextMenuEntry
{
[Constructable]
public Shrine( ) : base( 0x1BC3 )
{ {
Movable = false; private Mobile m_Mobile;
Visible = false; private Item m_Item;
Name = "shrine";
}
public Shrine( Serial serial ) : base( serial ) public ResurrectEntry( Mobile mobile, Item item ) : base( 6195, ResurrectRange )
{
}
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 )
{ {
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"; } public override void OnClick()
else if ( m.Region.IsPartOf( "the Moon's Core" ) ){ keyword = "Ultimum Potentiae"; } {
else if ( m.Region.IsPartOf( "the Black Magic Guild" ) ){ keyword = "Kas"; } Resurrect( m_Mobile, m_Item );
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 OnDoubleClickDead( Mobile m ) private class LockKarmaEntry : ContextMenuEntry
{ {
Ankhs.Resurrect( m, this ); private PlayerMobile m_Mobile;
}
public override void Serialize( GenericWriter writer ) public LockKarmaEntry( PlayerMobile mobile ) : base( mobile.KarmaLocked ? 6197 : 6196, LockRange )
{ {
base.Serialize( writer ); m_Mobile = mobile;
writer.Write( (int) 0 ); // version }
}
public override void Deserialize( GenericReader reader ) public override void OnClick()
{ {
base.Deserialize( reader ); m_Mobile.KarmaLocked = !m_Mobile.KarmaLocked;
int version = reader.ReadInt();
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 ); Ankhs.Resurrect( m, this );
} }
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
Ankhs.GetContextMenuEntries( from, this, list );
}
[Hue, CommandProperty( AccessLevel.GameMaster )] [Hue, CommandProperty( AccessLevel.GameMaster )]
public override int Hue public override int Hue
{ {
@ -236,6 +206,12 @@ namespace Server.Items
Ankhs.Resurrect( m, this ); Ankhs.Resurrect( m, this );
} }
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
Ankhs.GetContextMenuEntries( from, this, list );
}
[Hue, CommandProperty( AccessLevel.GameMaster )] [Hue, CommandProperty( AccessLevel.GameMaster )]
public override int Hue public override int Hue
{ {
@ -299,6 +275,12 @@ namespace Server.Items
Ankhs.Resurrect( m, this ); Ankhs.Resurrect( m, this );
} }
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
Ankhs.GetContextMenuEntries( from, this, list );
}
[Hue, CommandProperty( AccessLevel.GameMaster )] [Hue, CommandProperty( AccessLevel.GameMaster )]
public override int Hue public override int Hue
{ {
@ -394,6 +376,12 @@ namespace Server.Items
Ankhs.Resurrect( m, this ); Ankhs.Resurrect( m, this );
} }
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
Ankhs.GetContextMenuEntries( from, this, list );
}
[Hue, CommandProperty( AccessLevel.GameMaster )] [Hue, CommandProperty( AccessLevel.GameMaster )]
public override int Hue public override int Hue
{ {

View file

@ -5,6 +5,8 @@ namespace Server.Items
{ {
public class BleedersBlade : Katana public class BleedersBlade : Katana
{ {
public override int UOSpeed{ get{ return 70; } }
[Constructable] [Constructable]
public BleedersBlade() public BleedersBlade()
{ {
@ -13,9 +15,8 @@ namespace Server.Items
Hue = 32; Hue = 32;
AccuracyLevel = WeaponAccuracyLevel.Supremely; AccuracyLevel = WeaponAccuracyLevel.Supremely;
DamageLevel = WeaponDamageLevel.Vanq; DamageLevel = WeaponDamageLevel.Vanq;
DurabilityLevel = WeaponDurabilityLevel.Indestructible;
DurabilityLevel = WeaponDurabilityLevel.Indestructible;
} }
public BleedersBlade( Serial serial ) : base( serial ) public BleedersBlade( Serial serial ) : base( serial )