public static void BondInfo_OnTarget(Mobile from, object targeted) { var baseCreature = targeted as BaseCreature; if (baseCreature != null) { if (baseCreature.ControlMaster == from) { if (baseCreature.BondingBegin == DateTime.MinValue) { from.SendMessage("Your pet hasn't started to bond yet, please feed it and try again."); } else { DateTime today = DateTime.UtcNow; DateTime willbebonded = baseCreature.BondingBegin.AddDays(7); TimeSpan daystobond = willbebonded - today; string BondInfo = string.Format("The pet started bonding with you at {0}. Its {1} days, {2} hours and {3} minutes until it bonds.", baseCreature.BondingBegin, daystobond.Days, daystobond.Hours, daystobond.Minutes); from.SendMessage(BondInfo); } } else { from.BeginTarget(-1, false, TargetFlags.None, new TargetCallback(BondInfo_OnTarget)); from.SendMessage("That is not your pet!"); } } else { from.BeginTarget(-1, false, TargetFlags.None, new TargetCallback(BondInfo_OnTarget)); from.SendMessage("That is not a pet!"); } }
public void OnTarget( Mobile from, object targeted, object state ) { object[] states = (object[])state; BaseCommand command = (BaseCommand)states[0]; string[] args = (string[])states[1]; if ( !BaseCommand.IsAccessible( from, targeted ) ) { from.SendMessage( "That is not accessible." ); from.BeginTarget( -1, command.ObjectTypes == ObjectTypes.All, TargetFlags.None, new TargetStateCallback( OnTarget ), new object[]{ command, args } ); return; } switch ( command.ObjectTypes ) { case ObjectTypes.Both: { if ( !(targeted is Item) && !(targeted is Mobile) ) { from.SendMessage( "This command does not work on that." ); return; } break; } case ObjectTypes.Items: { if ( !(targeted is Item) ) { from.SendMessage( "This command only works on items." ); return; } break; } case ObjectTypes.Mobiles: { if ( !(targeted is Mobile) ) { from.SendMessage( "This command only works on mobiles." ); return; } break; } } RunCommand( from, targeted, command, args ); from.BeginTarget( -1, command.ObjectTypes == ObjectTypes.All, TargetFlags.None, new TargetStateCallback( OnTarget ), new object[]{ command, args } ); }
private static void AllNames_OnTarget(Mobile from, object obj) { if (obj is AddressBook) { int count = 0; AddressBook book = (AddressBook)obj; if (book.Entries != null) book.Entries.Clear(); else book.Entries = new ArrayList(); foreach (Mobile m in World.Mobiles.Values) { PlayerMobile mp = m as PlayerMobile; if (mp != null) { count += 1; book.AddEntry(mp); } } from.SendMessage("The Address Book has been filled with " + count + " entries"); CommandLogging.WriteLine(from, "{0} {1} filling Address Book {2}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(book)); } else { from.BeginTarget(-1, false, TargetFlags.None, new TargetCallback(AllNames_OnTarget)); from.SendMessage("That is not a Address Book. Try again."); } }
public void OnSelectBuilding(Mobile from, object target, object state) { BattleBuilding bb = target as BattleBuilding; ArrayList list = state as ArrayList; if (bb == null) { from.SendAsciiMessage(0x25, "Select the building to add the items to!"); from.BeginTarget(18, false, TargetFlags.None, new TargetStateCallback(OnSelectBuilding), state); return; } int count = 0; foreach (Item i in list) { if (i != bb && !bb.Decorations.Contains(i)) { bb.Decorations.Add(i); count++; } } from.SendAsciiMessage(count.ToString() + " items added to building."); }
public override void Process( Mobile from, BaseCommand command, string[] args ) { if ( command.ValidateArgs( this, new CommandEventArgs( from, command.Commands[0], GenerateArgString( args ), args ) ) ) { from.BeginTarget( -1, command.ObjectTypes == ObjectTypes.All, TargetFlags.None, new TargetStateCallback( OnTarget ), new object[] { command, args } ); } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from ) ) return; if ( m_UsesRemaining < 1 ) { // You have no fukiya darts! from.SendLocalizedMessage( 1063325 ); } else if ( m_Using ) { // You are already using that fukiya. from.SendLocalizedMessage( 1063326 ); } else if ( !BasePotion.HasFreeHand( from ) ) { // You must have a free hand to use a fukiya. from.SendLocalizedMessage( 1063327 ); } else { from.BeginTarget( 5, false, TargetFlags.Harmful, new TargetCallback( OnTarget ) ); } }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { from.BeginTarget(-1, false, TargetFlags.None, (m, targeted) => { if (!IsChildOf(m.Backpack)) m.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. else if (targeted is BaseWeapon) { BaseWeapon wep = targeted as BaseWeapon; if(!wep.IsChildOf(m.Backpack)) m.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. else if (wep.TimesImbued > 0) m.SendLocalizedMessage(1046439); // Invalid target. else if (wep.Attributes.WeaponDamage > 0) { wep.Attributes.WeaponDamage = 0; m.SendLocalizedMessage(1151814); // You have removed the damage increase from this weapon. this.Consume(); } else m.SendLocalizedMessage(1046439); // Invalid target. } else m.SendLocalizedMessage(1046439); // Invalid target. }); } else from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. }
public static void AddNewOrder( Mobile seller, MarketEntry entry ) { seller.SendMessage("Select the object for this order."); seller.BeginTarget(12, false, Server.Targeting.TargetFlags.None, new TargetCallback( delegate( Mobile from, object targeted ) { if( targeted is IEntity ) { if( targeted is Mobile ) { Mobile mob = (Mobile)targeted; if( mob is BaseCreature && ((BaseCreature)mob).ControlMaster == from ) FinalizeNewOrder(seller, entry, mob); else from.SendMessage("You do not have the right to sell that."); } else if( targeted is Item ) { Item item = (Item)targeted; if( item.IsChildOf(from.Backpack) || item.RootParent == from ) FinalizeNewOrder(seller, entry, item); else from.SendMessage("You do not have the right to sell that."); } } else { from.SendMessage("That is not a valid market entity."); } })); }
public override void OnDoubleClick( Mobile from ) { if( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); //That must be in your pack to use it. } else { if( from.Skills.Magery.Base < 85 ) { from.SendMessage( "The scroll bursts into flame in your hands!" ); from.FixedParticles( 0x36BD, 20, 10, 5044, EffectLayer.Waist ); from.Damage( Utility.RandomMinMax( 40, 55 ) ); this.Delete(); } else { from.Frozen = true; from.PublicOverheadMessage( MessageType.Spell, from.SpeechHue, true, "In Kal Quas", false ); if( !from.Mounted && from.Body.IsHuman ) from.Animate( 206, 7, 1, true, false, 0 ); from.BeginTarget( 10, false, TargetFlags.None, new TargetCallback( BlessingOfKhopesh_OnTarget ) ); } } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it. else from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( BurnWeb_Callback ) ); }
public override void OnDoubleClick( Mobile from ) { if( _owner == null ) _owner = from; from.BeginTarget(1, false, TargetFlags.None, new TargetStateCallback(this_doorSelected), this); from.SendMessage("Select the door to install this trap onto."); }
public override void OnDoubleClick(Mobile from) { if (from == null) return; from.RevealingAction(); from.BeginTarget(1, false, TargetFlags.None, new TargetCallback(ItemClaimer_OnTarget)); }
public override void OnDoubleClick(Mobile from) { if (IsChildOf(from.Backpack)) { from.SendMessage("Target a corpse you'd like to net."); from.BeginTarget(10, false, TargetFlags.None, new TargetCallback(Net_OnTarget)); } }
public override void OnDoubleClick(Mobile from) { if(ItemID == UnlitItemID) { from.SendMessage("Que voulez vous chauffer?"); from.BeginTarget(2, false, TargetFlags.None, new TargetCallback(OnTarget)); } base.OnDoubleClick(from); }
public override void OnDoubleClick(Mobile from) { if (from == null || from.Backpack == null) return; if (!IsChildOf(from.Backpack)) from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. else from.BeginTarget(1, false, TargetFlags.None, new TargetCallback(UseKey_OnTarget)); }
public override void OnDoubleClick( Mobile from ) { if( IsAccessibleTo( from ) && from.InRange( GetWorldLocation(), 3 ) ) { from.SendLocalizedMessage( 1070929 ); // Select the artifact or enhanced magic item to dye. from.BeginTarget( 3, false, Server.Targeting.TargetFlags.None, new TargetStateCallback( InternalCallback ), this ); } else from.SendLocalizedMessage( 502436 ); // That is not accessible. }
public override void OnDoubleClick(Mobile from) { if (this.RootParent != from) { from.SendMessage("This must be in your pack to use it."); } from.SendMessage("Select an item to repair."); from.BeginTarget(3, false, TargetFlags.None, new TargetCallback(OnTarget)); }
public override void OnDoubleClick( Mobile from ) { if ( from.Backpack == null || !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it. return; } from.SendLocalizedMessage( 1111656 ); // What do you wish to use the acid on? from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( OnTarget ) ); }
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; } from.SendLocalizedMessage( 1010484 ); // Where do you wish to use the net? from.BeginTarget( -1, true, TargetFlags.None, new TargetCallback( OnTarget ) ); }
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; } from.SendMessage("Who would you like to resurrect?"); from.BeginTarget(2, false, TargetFlags.Beneficial, OnTarget); }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { from.BeginTarget( 6, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendLocalizedMessage( 1053024 ); // Select the swamp dragon you wish to place the barding on. } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } else { from.BeginTarget( 2, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendMessage( "What do you wish to use the gem on?" ); } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. else { from.SendMessage( "Select a pair of Monk Fists you own." ); from.BeginTarget( 1, false, TargetFlags.None, new TargetCallback( OnTarget ) ); } return; }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendAsciiMessage( "Select the weapon or armor you wish to use the cloth on." ); } else { from.SendAsciiMessage( "That must be in your pack for you to use it." ); } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { from.BeginTarget( 2, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendMessage( "Select the Ancient Forge you wish to dip the weapon in." ); } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
public static void ChooseItem_OnTarget(Mobile from, object targeted) { Item it = targeted as Item; if (it == null || !it.Movable || !(it.Parent is Container) || !(((Container)it.Parent).CheckItemUse(from, it))) from.SendMessage("Impossible de déplacer ceci!"); else { from.SendMessage("Dans quel contenant voulez vous déposer le tout ?"); from.BeginTarget(-1, true, TargetFlags.None, new TargetStateCallback(ChooseBag_OnTarget), it); } }
public override void OnDoubleClick( Mobile from ) { if ( IsChildOf( from.Backpack ) ) { from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendLocalizedMessage( 1005424 ); // Select the weapon or armor you wish to use the cloth on. } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } }
public override void OnDoubleClick( Mobile from ) { if ( from != Parent ) from.SendLocalizedMessage( 1112886 ); // You must be wearing this item in order to use it. else if ( m_Ammo < 1 ) from.SendMessage( "You do not have any knives ready for use." ); else if ( ThrowDelay > DateTime.Now ) from.SendLocalizedMessage( 501789 ); // You must wait before trying again. else { from.BeginTarget( 10, false, TargetFlags.Harmful, new TargetStateCallback<ACreedJinBori>( Target ), this ); } }
private static void EndGame_Target( Mobile from, object o ) { if ( o is CTFGame ) { CTFGame game = (CTFGame)o; game.EndGame(); from.SendMessage( "The game has been ended." ); } else { from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( EndGame_Target ) ); from.SendMessage( "Target the game stone." ); } }
public override void OnDoubleClick( Mobile from ) { if ( IsSigned || !CheckSeason( from ) ) return; if ( !IsChildOf( from.Backpack ) ) { from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it. return; } from.BeginTarget( 10, false, TargetFlags.None, new TargetCallback( OnTarget ) ); from.SendMessage( "Who do you wish to use this on?" ); }
private static void Quests_OnCommand(CommandEventArgs e) { Mobile m = e.Mobile; m.SendMessage("Target a player to view their quests."); m.BeginTarget(-1, false, Server.Targeting.TargetFlags.None, delegate(Mobile from, object targeted) { if (targeted is PlayerMobile) { m.SendGump(new MondainQuestGump((PlayerMobile)targeted)); } else { m.SendMessage("That is not a player!"); } }); }
public static void HWInfo_OnTarget(Mobile from, object obj) { if (obj is Mobile && ((Mobile)obj).Player) { var m = (Mobile)obj; var acct = m.Account as Account; if (acct != null) { var hwInfo = acct.HardwareInfo; if (hwInfo != null) { CommandLogging.WriteLine( from, "{0} {1} viewing hardware info of {2}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(m)); } if (hwInfo != null) { from.SendGump(new PropertiesGump(from, hwInfo)); } else { from.SendMessage("No hardware information for that account was found."); } } else { from.SendMessage("No account has been attached to that player."); } } else { from.BeginTarget(-1, false, TargetFlags.None, HWInfo_OnTarget); from.SendMessage("That is not a player. Try again."); } }
public override bool Use(Mobile user) { if (this.Movable) { user.BeginTarget(12, true, Server.Targeting.TargetFlags.None, delegate(Mobile from, object obj) { if (this.Movable && !this.Deleted) { IPoint3D pt = obj as IPoint3D; if (pt != null) { SpellHelper.GetSurfaceTop(ref pt); Point3D origin = new Point3D(pt); Map facet = from.Map; if (facet != null && facet.CanFit(pt.X, pt.Y, pt.Z, 16, false, false, true)) { this.Movable = false; Effects.SendMovingEffect( from, new Entity(Serial.Zero, origin, facet), this.ItemID & 0x3FFF, 7, 0, false, false, this.Hue - 1, 0 ); Timer.DelayCall(TimeSpan.FromSeconds(0.5), delegate() { this.Delete(); Effects.PlaySound(origin, facet, 530); Effects.PlaySound(origin, facet, 263); Effects.SendLocationEffect( origin, facet, 14284, 96, 1, 0, 2 ); Timer.DelayCall(TimeSpan.FromSeconds(1.0), delegate() { List <Mobile> targets = new List <Mobile>(); foreach (Mobile mob in facet.GetMobilesInRange(origin, 12)) { if (from.CanBeHarmful(mob, false) && mob.InLOS(new Point3D(origin, origin.Z + 1))) { if (Faction.Find(mob) != null) { targets.Add(mob); } } } foreach (Mobile mob in targets) { int damage = (mob.Hits * 6) / 10; if (!mob.Player && damage < 10) { damage = 10; } else if (damage > 75) { damage = 75; } Effects.SendMovingEffect( new Entity(Serial.Zero, new Point3D(origin, origin.Z + 4), facet), mob, 14068, 1, 32, false, false, 1111, 2 ); from.DoHarmful(mob); SpellHelper.Damage(TimeSpan.FromSeconds(0.50), mob, from, damage / 3, 0, 0, 0, 0, 100); SpellHelper.Damage(TimeSpan.FromSeconds(0.70), mob, from, damage / 3, 0, 0, 0, 0, 100); SpellHelper.Damage(TimeSpan.FromSeconds(1.00), mob, from, damage / 3, 0, 0, 0, 0, 100); Timer.DelayCall(TimeSpan.FromSeconds(0.50), delegate() { mob.PlaySound(0x1FB); }); } }); }); } } } }); } return(false); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; Account acct = (Account)from.Account; ArrayList ip_List = new ArrayList(acct.LoginIPs); int id = info.ButtonID; Account tafacc = null; ArrayList tafip_List = new ArrayList(); if (id == 1) { string input = info.GetTextEntry(2).Text; try { tafacc = Accounts.GetAccount(input) as Account; tafip_List = new ArrayList(tafacc.LoginIPs); } catch (Exception e) { } string initialText = ""; if (tafacc == null) { initialText = String.Format("Account: '{0}' NOT found", input); } else if (input == "") { initialText = "Please enter a valid Account name."; } else if (input.ToLower() == acct.ToString().ToLower()) { initialText = "You can't enter you own Account name!"; } else { bool uniqueIP = true; if (checkIP) { for (int i = 0; i < ip_List.Count; ++i) { if (tafip_List.Contains(ip_List[i])) { uniqueIP = false; } } if (uniqueIP) { initialText = String.Format("{0} Marked as Referrer", tafacc); acct.SetTag("ToldAFriend", "true"); acct.SetTag("Referrer", tafacc.ToString()); } else { initialText = "You can't refer another account you own"; } } else { initialText = String.Format("{0} Marked as Referrer", tafacc); acct.SetTag("ToldAFriend", "true"); acct.SetTag("Referrer", tafacc.ToString()); } } from.SendGump(new TAFGump(from, initialText)); } if (id == 2) { from.BeginTarget(10, false, TargetFlags.None, new TargetCallback(TAFTarget)); from.SendMessage(String.Format("Please target the character of the person who referred you to {0}", TAFShardName)); } }
public static void HWInfo_OnTarget(Mobile from, object obj) { if (obj is Mobile && ((Mobile)obj).Player) { Mobile m = (Mobile)obj; Account acct = m.Account as Account; string hwInfoTag = acct.GetTag(HardwareInfo.AccountTagName); if (hwInfoTag != null) { // check it against all other accounts: string[] hwInfoTags = hwInfoTag.Split('|'); foreach (string tag in hwInfoTags) { int tagNumber = -1; if (tag == String.Empty) { continue; } try { tagNumber = int.Parse(tag); } catch (Exception e) { Console.WriteLine("HWInfo error with tag " + tag + ": " + e.Message); Console.WriteLine(e.StackTrace); continue; } foreach (Account account in Accounts.GetAccounts()) { if (HasHWInfoInstance(account, tagNumber)) { from.SendMessage(account.Username + " " + tagNumber); } } } } if (acct != null) { HardwareInfo hwInfo = acct.HardwareInfo; if (hwInfo != null) { CommandLogging.WriteLine(from, "{0} {1} viewing hardware info of {2}", from.AccessLevel, CommandLogging.Format(from), CommandLogging.Format(m)); } if (hwInfo != null) { from.SendGump(new Gumps.PropertiesGump(from, hwInfo)); } else { from.SendMessage("No hardware information for that account was found."); } } else { from.SendMessage("No account has been attached to that player."); } } else { from.BeginTarget(-1, false, TargetFlags.None, new TargetCallback(HWInfo_OnTarget)); from.SendMessage("That is not a player. Try again."); } }
public static void OnVirtueUsed(Mobile from) { if (!from.Alive) { return; } if (VirtueHelper.GetLevel(from, VirtueName.Spirituality) < VirtueLevel.Seeker) { from.SendLocalizedMessage(1155829); // You must be a Seeker of Spirituality to invoke this Virtue. } else { from.SendLocalizedMessage(1155827); // Target whom you wish to embrace with your Spirituality from.BeginTarget(10, false, TargetFlags.None, (mobile, targeted) => { if (targeted is Mobile) { Mobile m = targeted as Mobile; if (VirtueHelper.GetLevel(from, VirtueName.Spirituality) < VirtueLevel.Seeker) { from.SendLocalizedMessage(1155812); // You must be at least a Seeker of Humility to Invoke this ability. } else if (!m.Alive) { from.SendLocalizedMessage(1155828); // Thy target must be among the living. } else if (m is BaseCreature && !((BaseCreature)m).Controlled && !((BaseCreature)m).Summoned) { from.SendLocalizedMessage(1155837); // You can only embrace players and pets with Spirituality. } else if (IsEmbracee(m)) { from.SendLocalizedMessage(1155836); // They are already embraced by Spirituality. } else if (m.MeleeDamageAbsorb > 0) { from.SendLocalizedMessage(1156039); // You may not use the Spirituality Virtue while the Attunement spell is active. } else if (m is BaseCreature || m is PlayerMobile) { SpiritualityContext context = new SpiritualityContext(from, m); ActiveTable[from] = context; m.SendLocalizedMessage(1155839); // Your spirit has been embraced! You feel more powerful! from.SendLocalizedMessage(1155835); // You have lost some Spirituality. BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Spirituality, 1155824, 1155825, String.Format("{0}\t{1}", context.Reduction.ToString(), context.Pool.ToString()))); // ~1_VAL~% Reduction to Incoming Damage<br>~2_VAL~ Shield HP Remaining VirtueHelper.Atrophy(from, VirtueName.Spirituality, 3200); Timer.DelayCall(TimeSpan.FromMinutes(20), () => { if (ActiveTable != null && ActiveTable.ContainsKey(from)) { ActiveTable.Remove(from); m.SendLocalizedMessage(1155840); // Your spirit is no longer embraced. You feel less powerful. BuffInfo.RemoveBuff(m, BuffIcon.Spirituality); } }); } } else { from.SendLocalizedMessage(1155837); // You can only embrace players and pets with Spirituality. } }); } }
public static void OnVirtueUsed(Mobile from) { if (VirtueHelper.GetLevel(from, VirtueName.Humility) < VirtueLevel.Seeker) { from.SendLocalizedMessage(1155812); // You must be at least a Seeker of Humility to Invoke this ability. } else if (from.Alive) { from.SendLocalizedMessage(1155817); // Target the pet you wish to embrace with your Humility. from.BeginTarget(10, false, Server.Targeting.TargetFlags.None, (m, targeted) => { if (targeted is BaseCreature) { BaseCreature bc = targeted as BaseCreature; if (!bc.Alive) { from.SendLocalizedMessage(1155815); // You cannot embrace Humility on the dead! } else if (VirtueHelper.GetLevel(m, VirtueName.Humility) < VirtueLevel.Seeker) { from.SendLocalizedMessage(1155812); // You must be at least a Seeker of Humility to Invoke this ability. } else if (!bc.Controlled && !bc.Summoned) { from.SendLocalizedMessage(1155813); // You can only embrace your Humility on a pet. } else if (ActiveTable.ContainsKey(bc)) { from.SendLocalizedMessage(1156047); // That pet has already embraced Humility. } else { VirtueHelper.Atrophy(from, VirtueName.Humility, 3200); from.SendLocalizedMessage(1155818); // You have lost some Humility. ActiveTable[bc] = from; m.PrivateOverheadMessage(Server.Network.MessageType.Regular, 1150, 1155819, from.NetState); // *Your pet surges with the power of your Humility!* bc.FixedEffect(0x373A, 10, 16); BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.Humility, 1156049, 1156050, TimeSpan.FromMinutes(20), from, String.Format("{0}\t{1}", bc.Name, GetRegenBonus(bc)))); // Pet: ~1_NAME~<br>+~2_VAL~ HPR<br> CheckTimer(); bc.ResetStatTimers(); Timer.DelayCall(TimeSpan.FromMinutes(20), (o) => { Mobile mob = o as Mobile; if (mob != null && ActiveTable.ContainsKey(mob)) { Mobile user = ActiveTable[mob]; ActiveTable.Remove(mob); BuffInfo.RemoveBuff(user, BuffIcon.Humility); user.PrivateOverheadMessage(Server.Network.MessageType.Regular, 1150, 1155823, from.NetState); // *Your pet's power returns to normal* CheckTimer(); } }, bc); } } else { from.SendLocalizedMessage(1155813); // You can only embrace your Humility on a pet. } }); } }