/* ClericGump.cs - Version 12.0 Last Modified On 12/16/2003 at 12:03:25 AM Script generated by Gump Creator 2.01 */ using System; using Server; using Server.Gumps; using Server.Network; using Server.Spells.Custom; using Server.Mobiles; namespace Server.Gumps { public class ClericGump : Gump { private static string[] m_Spells = new string[] { "Angelic Faith", "Banish Evil", "Dampen Spirit", "Divine Focus", "Hammer of Faith", "Purge", "Restoration", "Sacred Boon", "Sacrifice", "Smite", "Touch of Life", "Trial by Fire" }; public ClericGump(Mobile owner) : base( 50, 10 ) { int gumpX = 0; int gumpY = 0; Closable = true; Disposable = true; Dragable = true; Resizable = true; gumpX = 7; gumpY = 7; AddImageTiled( gumpX, gumpY, 341, 281, 0xA8E ); gumpX = 0; gumpY = 0; AddImage( gumpX, gumpY, 0x23F0 ); gumpX = 7; gumpY = 0; AddImageTiled( gumpX, gumpY, 341, 7, 0x23F1 ); gumpX = 0; gumpY = 7; AddImageTiled( gumpX, gumpY, 7, 281, 0x23F3 ); gumpX = 348; gumpY = 7; AddImageTiled( gumpX, gumpY, 7, 281, 0x23F5 ); gumpX = 348; gumpY = 288; AddImage( gumpX, gumpY, 0x23F8 ); gumpX = 348; gumpY = 0; AddImage( gumpX, gumpY, 0x23F2 ); gumpX = 0; gumpY = 288; AddImage( gumpX, gumpY, 0x23F6 ); gumpX = 7; gumpY = 288; AddImageTiled( gumpX, gumpY, 341, 7, 0x23F7 ); gumpX = 7; gumpY = 7; AddAlphaRegion( gumpX, gumpY, 341, 281 ); gumpX = 0; gumpY = 7; AddHtml( gumpX, gumpY, 355, 20, "
Cleric Prayers
", false, false ); int offset = 0; int id = 1; for( int i = 0; i < 12; ++i ) { gumpX = 10; gumpY = 45 + offset; AddButton( gumpX, gumpY, 0x1523, 0x1523, 12 + id, GumpButtonType.Page, id ); gumpX = 30; gumpY = 48 + offset; AddButton( gumpX, gumpY, 0x837, 0x838, id, GumpButtonType.Reply, 0 ); gumpX = 45; gumpY = 43 + offset; AddLabel( gumpX, gumpY, 1152, m_Spells[i] ); offset += 20; ++id; } gumpX = 180; gumpY = 260; AddButton( gumpX, gumpY, 0xFB1, 0xFB3, 25, GumpButtonType.Reply, 0 ); gumpX = 215; gumpY = 260; AddLabel( gumpX, gumpY, 1152, "Close this menu." ); AddSpell( 1, 100, 80.0, 0x8F7, "Angelic Faith", "The caster calls upon the divine powers of the heavens to transform himself into a holy angel. The caster gains better regeneration rates and increased stats and skills." ); AddSpell( 2, 30, 60.0, 0x5103, "Banish Evil", "The caster calls forth a divine fire to banish his undead or demonic foe from the earth." ); AddSpell( 3, 15, 30.0, 0x8DE, "Dampen Spirit", "The caster's enemy is slowly drained of his stamina, greatly hindering their ability to fight in combat or flee." ); AddSpell( 4, 15, 35.0, 0x8E4, "Divine Focus", "The caster's mind focuses on his divine faith increasing the effect of his prayers. However, the caster becomes mentally fatigued much faster." ); AddSpell( 5, 20, 40.0, 0x5105, "Hammer of Faith", "Summons forth a divine hammer of pure energy blessed with the ability to vanquish undead foes with greater efficiency." ); AddSpell( 6, 5, 10.0, 0x5108, "Purge", "The target is cured of all poisons and has all negative stat curses removed." ); AddSpell( 7, 40, 50.0, 0x8FA, "Restoration", "The caster's target is resurrected and fully healed and refreshed." ); AddSpell( 8, 15, 25.0, 0x5106, "Sacred Boon", "The caster's target is surrounded by a divine wind that heals small amounts of lost life over time." ); AddSpell( 9, 5, 5.0, 0x5107, "Sacrifice", "The caster sacrifices himself for his allies. Whenever damaged, all party members are healed a small percent of the damage dealt. The caster still takes damage." ); AddSpell( 10, 60, 80.0, 0x8DD, "Smite", "The caster calls to the heavens to send a deadly bolt of lightning to strike down his opponent." ); AddSpell( 11, 20, 30.0, 0x8C3, "Touch of Life", "The caster's target is healed by the heavens for a significant amount." ); AddSpell( 12, 25, 40.0, 0x5100, "Trial by Fire", "The caster is surrounded by a divine flame that damages the caster's enemy when hit by a weapon." ); } private void AddSpell( int page, int tithing, double skill, int icon, string name, string text ) { int gumpX, gumpY; AddPage( page ); gumpX = 165; gumpY = 45; AddImage( gumpX, gumpY, icon ); gumpX = 215; gumpY = 43; AddLabel( gumpX, gumpY, 1152, name ); gumpX = 215; gumpY = 56; AddLabel( gumpX, gumpY, 1152, String.Format( "Tithing Points: {0}", tithing ) ); gumpX = 215; gumpY = 69; AddLabel( gumpX, gumpY, 1152, String.Format( "Required Skill: {0}", skill.ToString("F1") ) ); gumpX = 165; gumpY = 95; AddHtml( gumpX, gumpY, 170, 150, String.Format( "Description - {0}", text ), false, false ); } public override void OnResponse( NetState state, RelayInfo info ) { Mobile from = state.Mobile; switch( info.ButtonID ) { case 1: new AngelicFaithSpell( from, null ).Cast(); break; case 2: new BanishEvilSpell( from, null ).Cast(); break; case 3: new DampenSpiritSpell( from, null ).Cast(); break; case 4: new DivineFocusSpell( from, null ).Cast(); break; case 5: new HammerOfFaithSpell( from, null ).Cast(); break; case 6: new PurgeSpell( from, null ).Cast(); break; case 7: new RestorationSpell( from, null ).Cast(); break; case 8: new SacredBoonSpell( from, null ).Cast(); break; case 9: new SacrificeSpell( from, null ).Cast(); break; case 10: new SmiteSpell( from, null ).Cast(); break; case 11: new TouchOfLifeSpell( from, null ).Cast(); break; case 12: new TrialByFireSpell( from, null ).Cast(); break; case 25: return; } if ( info.ButtonID >= 1 && info.ButtonID <= 12 ) from.SendGump( new ClericGump( from ) ); } } }