diff --git a/Scripts/Items/VirtueTome.cs b/Scripts/Items/VirtueTome.cs new file mode 100644 index 0000000..9cc64e2 --- /dev/null +++ b/Scripts/Items/VirtueTome.cs @@ -0,0 +1,122 @@ +using System; +using Server; +using Server.Gumps; +using Server.Network; +using Server.Mobiles; + +namespace Server.Items +{ + public class VirtueTome : Item + { + [Constructable] + public VirtueTome() : base( 0x2259 ) // Standard spellbook graphic + { + Name = "A Tome of Virtues"; + Hue = 1174; // A nice bright gold/yellow hue + Weight = 1.0; + LootType = LootType.Blessed; // So they don't lose their travel hub on death + } + + public VirtueTome( Serial serial ) : base( serial ) + { + } + + public override void OnDoubleClick( Mobile from ) + { + if ( !IsChildOf( from.Backpack ) ) + { + from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. + return; + } + + if ( from is PlayerMobile ) + { + from.CloseGump( typeof( VirtueTomeGump ) ); + from.SendGump( new VirtueTomeGump( (PlayerMobile)from, this ) ); + } + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + writer.Write( (int) 0 ); // version + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + int version = reader.ReadInt(); + } + } + + public class VirtueTomeGump : Gump + { + private PlayerMobile m_From; + private VirtueTome m_Tome; + private int m_TravelCost = 15; // <--- SET YOUR VIRTUE POINT COST HERE + + // Standard Britannia Shrine Locations + private Point3D[] m_Shrines = new Point3D[] + { + new Point3D( 2487, 1485, 0 ), // Compassion + new Point3D( 4137, 1092, 0 ), // Honesty + new Point3D( 1879, 2823, 1 ), // Honor + new Point3D( 4130, 2999, 0 ), // Humility + new Point3D( 1658, 547, 0 ), // Justice + new Point3D( 3743, 931, 2 ), // Sacrifice + new Point3D( 1010, 1849, 5 ), // Spirituality + new Point3D( 1250, 3410, 1 ) // Valor + }; + + public VirtueTomeGump( PlayerMobile from, VirtueTome tome ) : base( 50, 50 ) + { + m_From = from; + m_Tome = tome; + + AddPage( 0 ); + AddBackground( 0, 0, 300, 380, 5054 ); + AddHtml( 10, 10, 280, 20, "