public override bool OnDragDrop(Mobile from, Item dropped) { PlayerMobile m = from as PlayerMobile; if (m != null) { if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent) { if (dropped is OrcishSchematics) { dropped.Delete(); from.AddToBackpack(new NictitatingLens()); if (!m.HasGump(typeof(JosefSkimmonsCompleteGump))) { m.SendGump(new JosefSkimmonsCompleteGump(m)); } } else { this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this. } } else { m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey... } } return(false); }
public override void OnMovement(Mobile m, Point3D oldLocation) /////To Fix///// { if (m.Alive && m is PlayerMobile) { PlayerMobile pm = (PlayerMobile)m; if (InRange(pm, 2) && !InRange(oldLocation, 2)) { WormSilk ws = pm.Backpack.FindItemByType(typeof(WormSilk)) as WormSilk; if (ws == null) { if (!pm.HasGump(typeof(RalphGump))) { pm.SendGump(new RalphGump(pm)); return; } } else if (ws != null) { Say("I see you have found some worm silk! If you have 10, may I have them please?"); return; } } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SantaClausGump))) { mobile.SendGump(new SantaClausGump(mobile)); //mobile.AddToBackpack( new SantasQuestLog() ); { SantasQuestLog sql = mobile.Backpack.FindItemByType(typeof(SantasQuestLog)) as SantasQuestLog; if (sql != null) { return; } else if (sql == null) { mobile.AddToBackpack(new SantasQuestLog()); } return; } } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(VampQuestGump11))) { Item a = m_Mobile.Backpack.FindItemByType(typeof(EverClear)); if (a != null) { a.Delete(); mobile.SendGump(new VampQuestGump11(mobile)); mobile.AddToBackpack(new TubOfButter()); } else { m_Mobile.SendMessage("Get out before you end up dead!"); } } } }
public override bool OnDragDrop(Mobile from, Item dropped) { PlayerMobile m = from as PlayerMobile; if (m != null) { if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent) { if (dropped is MercutiosCutlass) { dropped.Delete(); from.AddToBackpack(new BootsOfBallast()); if (!m.HasGump(typeof(ChampHuthwaitCompleteGump))) { m.SendGump(new ChampHuthwaitCompleteGump(m)); } } else { PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this. } } else { m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey... } } return(false); }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(VampQuestGump9))) { { Item a = m_Mobile.Backpack.FindItemByType(typeof(MedalionOfFaith)); if (a != null) { a.Delete(); mobile.SendGump(new VampQuestGump9(mobile)); mobile.AddToBackpack(new BloodVialBag()); } else { m_Mobile.SendMessage("Can't you see I'm working..."); } } } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SantaClausGump))) { mobile.SendGump(new SantaClausGump(mobile)); mobile.AddToBackpack(new SantasBook()); /*{ * SantasBook sql = mobile.Backpack.FindItemByType( typeof ( SantasBook ) ) as SantasBook; * if ( sql != null ) * { * return; * } * else if ( sql == null ) * { * mobile.AddToBackpack( new SantasBook() ); * } * return; * }*/ } } }
public static void SendGumpThreaded(PlayerMobile to) { if (to.AntiMacroGump && m_GumpDictionary.ContainsKey(to)) { AntiMacroGump oldGump = m_GumpDictionary[to]; m_GumpDictionary.Remove(to); //Close existing gump if it exists if (to.HasGump(typeof(AntiMacroGump))) to.CloseGump(typeof(AntiMacroGump)); to.SendGump(new AntiMacroGump(oldGump) ); return; } if ( !MySQLManager.SQLEnabled) { to.SendGump(new OldAntiMacroGump(to)); return; } AntiMacroGump gump = new AntiMacroGump(to); new Thread(gump.ThreadedGump).Start(); }
public override void OnClick() { if( !( m_Mobile is PlayerMobile ) )return; PlayerMobile mobile = (PlayerMobile) m_Mobile;{ if ( ! mobile.HasGump( typeof(MyraSilverdaleGump ) ) ){ mobile.SendGump( new MyraSilverdaleGump( mobile ));} } }
public override void OnMovement( Mobile m, Point3D oldLocation ) { if( m.Alive && m is PlayerMobile ) { PlayerMobile pm = (PlayerMobile)m; int range = 3; if( m.Alive && Math.Abs( Z - m.Z ) < 16 && InRange( m, range ) && !InRange( oldLocation, range ) ) { if( pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward ) { SayTo( pm, 1070980 ); // Congratulations! You have turned in enough minor treasures to earn a greater reward. pm.CloseGump( typeof( ToTTurnInGump ) ); //Sanity if( !pm.HasGump( typeof( ToTRedeemGump ) ) ) pm.SendGump( new ToTRedeemGump( this, false ) ); } else { if( pm.ToTItemsTurnedIn == 0 ) SayTo( pm, 1071013 ); // Bring me 10 of the lost treasures of Tokuno and I will reward you with a valuable item. else SayTo( pm, 1070981, String.Format( "{0}\t{1}", pm.ToTItemsTurnedIn, TreasuresOfTokuno.ItemsPerReward ) ); // You have turned in ~1_COUNT~ minor artifacts. Turn in ~2_NUM~ to receive a reward. ArrayList buttons = ToTTurnInGump.FindRedeemableItems( pm ); if( buttons.Count > 0 && !pm.HasGump( typeof( ToTTurnInGump ) ) ) pm.SendGump( new ToTTurnInGump( this, buttons ) ); } } int leaveRange = 7; if( !InRange( m, leaveRange ) && InRange( oldLocation, leaveRange ) ) { pm.CloseGump( typeof( ToTRedeemGump ) ); pm.CloseGump( typeof( ToTTurnInGump ) ); } } }
public override void OnClick() { if( !( m_Mobile is PlayerMobile ) ) return; PlayerMobile mobile = (PlayerMobile) m_Mobile; if ( ! mobile.HasGump( typeof( SpeechGump ) ) ) { mobile.SendGump(new SpeechGump( "Welcome Brave Adventurer", SpeechFunctions.SpeechText( m_Giver.Name, m_Mobile.Name, "ShardGreeter" ) )); } }
public override void OnClick() { if( !( m_Mobile is PlayerMobile ) ) return; PlayerMobile mobile = (PlayerMobile) m_Mobile; { if ( ! mobile.HasGump( typeof( SpeechGump ) ) ) { mobile.SendGump(new SpeechGump( "Thou Art Going To Get Hurt", SpeechFunctions.SpeechText( m_Giver.Name, m_Mobile.Name, "Healer" ) )); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; if (!mobile.HasGump(typeof(Gingerbreadquestgump))) { mobile.SendGump(new Gingerbreadquestgump(mobile)); } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(IchabodCraneGump))) { mobile.SendGump(new IchabodCraneGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; if (!mobile.HasGump(typeof(QuestGiver_gump))) { mobile.SendGump(new QuestGiver_gump(mobile)); } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(AgingWarriorGump))) { mobile.SendGump(new AgingWarriorGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("X Marks The Spot", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Mapmaker"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("The Song Remains The Same", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Bard"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("A Sip And A Taste", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Alchemist"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("The Legacy of Frankenstein", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Frankenstein"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("The Mystical Art Of Wizardry", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Mage"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("Seeking Higher Knowledge", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Powerscroll"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("The Black Heart", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "DeathKnight"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(ElmhavenCobblerGump))) { mobile.SendGump(new ElmhavenCobblerGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { ///////////////////////////////////////////////// gumpname if (!mobile.HasGump(typeof(BillGump))) { mobile.SendGump(new BillGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("Altering Cloaks And Robes", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Tailor"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(ExodusArchZealotGump))) { mobile.SendGump(new ExodusArchZealotGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("The Written Word", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Scribe"))); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SkaddriaCarpenterGump))) { mobile.SendGump(new SkaddriaCarpenterGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SisterOfSkillGump))) { mobile.SendGump(new SisterOfSkillGump(mobile)); } } }
public override void OnClick() { if (!(m_Mobile is PlayerMobile)) { return; } PlayerMobile mobile = (PlayerMobile)m_Mobile; { if (!mobile.HasGump(typeof(SpeechGump))) { mobile.SendGump(new SpeechGump("Knocking The Dents Out", SpeechFunctions.SpeechText(m_Giver.Name, m_Mobile.Name, "Blacksmith"))); } } }
public virtual void AttemptPurchase( PlayerMobile m, int level, bool freeRemoval ) { if( CostLevel == FeatCost.None ) m.SendMessage( "This skill cannot be directly purchased." ); if( !MeetsOurRequirements(m) ) m.SendMessage( "You do not meet the requirements for this skill." ); else if( Level >= level ) AttemptRemoval( m, level, freeRemoval ); else if( (level - Level) != 1 ) m.SendMessage( "You cannot acquire a skill level before purchasing all previous levels." ); else if( m.CP < CostToRaise ) m.SendMessage( "You do not have enough CPs to acquire this skill level." ); else if( LevelSystem.CanSpendCP(m, CostToRaise) ) { m.CP -= CostToRaise; m.CPSpent += CostToRaise; m.FeatSlots += CostToRaise; Level++; OnLevelChanged( m ); OnLevelRaised( m ); m.SendMessage( "You have purchased " + Name + " Level " + Level.ToString() + "." ); for( int i = 0; i < AssociatedFeats.Length; i++ ) m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m ); for( int i = 0; i < AssociatedSkills.Length; i++ ) m.Skills[AssociatedSkills[i]].Base = SkillLevel; if( m.HasGump( typeof(CharInfoGump) ) ) m.SendGump( new CharInfoGump(m) ); } }
public override void OnLevelChanged( PlayerMobile owner ) { base.OnLevelChanged( owner ); owner.ComputeResistances(); if( owner.HasGump( typeof( Gumps.CharInfoGump ) ) && owner.m_CharInfoTimer == null ) { owner.m_CharInfoTimer = new Gumps.CharInfoGump.CharInfoTimer( owner ); owner.m_CharInfoTimer.Start(); } }
public virtual void AttemptRemoval( PlayerMobile m, int level, bool freeRemoval ) { if( level != Level ) m.SendMessage( "Please remove the higher levels of this skill first." ); else if( CanRemoveThisFeat(m, freeRemoval) ) { m.CP += Level * BaseCost; m.CPSpent -= Level * BaseCost; m.FeatSlots -= Level * BaseCost; if( m.HasGump( typeof(CharInfoGump) ) ) m.SendGump( new CharInfoGump(m) ); Level--; OnLevelChanged( m ); OnLevelLowered( m ); for( int i = 0; i < AssociatedFeats.Length; i++ ) m.Feats.SetFeatLevel( AssociatedFeats[i], Level, m ); for( int i = 0; i < AssociatedSkills.Length; i++ ) m.Skills[AssociatedSkills[i]].Base = SkillLevel; } }