public static void Send(this ScreenFX effect, Mobile to) { if (to == null) { return; } switch (effect) { case ScreenFX.FadeOut: to.Send(VNScreenFadeOut.Instance); break; case ScreenFX.FadeIn: to.Send(VNScreenFadeIn.Instance); break; case ScreenFX.LightFlash: to.Send(VNScreenLightFlash.Instance); break; case ScreenFX.FadeInOut: to.Send(VNScreenFadeInOut.Instance); break; case ScreenFX.DarkFlash: to.Send(VNScreenDarkFlash.Instance); break; } }
public override void OnDoubleClick( Mobile from ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1008155 ); // You peer into the heavens, seeking the moons... from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Trammel, from.X, from.Y ), "", AffixType.Prepend, "Trammel : ", "" ) ); from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Felucca, from.X, from.Y ), "", AffixType.Prepend, "Felucca : ", "" ) ); }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " " + this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } } else { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " pieces of amber")); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a piece of amber")); } } }
public override void OnSingleClick(Mobile from) { if (this.ShipName != null) from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ship claim ticket from {0} for the {1}", BaseRegion.GetRuneNameFor(Region.Find(DockLocation, Map.Felucca)), this.ShipName))); else from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ship claim ticket from {0}", BaseRegion.GetRuneNameFor(Region.Find(DockLocation, Map.Felucca))))); }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " " + this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } } else { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " Incognito scrolls")); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a Incognito scroll")); } } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " " + this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } } else { if (Amount >= 2) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " axles with gears")); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "an axle with gears")); } } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a Lesser Poison potion")); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a deed to a blacksmith's shop")); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a mallet and chisel")); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "I lit the way, Origins Beta Tester")); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", (m_Owner == null ? "brain" : "brain of " + m_Owner))); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "an indecipherable map")); } }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)")); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "an armoire")); from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)")); } }
public static void SendNext( Mobile to ) { if ( to.NetState == null ) { m_Killers.Remove( to.Serial ); return; } ArrayList list = m_Killers[to.Serial] as ArrayList; if ( list == null || list.Count <= 0 ) { m_Killers.Remove( to.Serial ); if ( to is PlayerMobile && !((PlayerMobile)to).AssumePlayAsGhost ) new ResNowOption( to ).SendTo( to.NetState ); return; } Mobile killer = (Mobile)list[0]; list.RemoveAt( 0 ); if ( killer == null || killer.Deleted || !killer.Player ) { SendNext( to ); return; } Item[] gold = to.BankBox.FindItemsByType( typeof( Gold ), true ); int total = 0; for(int i=0;i<gold.Length && total < 5000;i++) total += gold[i].Amount; if ( total > 5000 ) total = 5000; to.Send( new BountyEntry( killer, total ) ); }
public void AddRune(Mobile from, RecallRune dropped) { if (Entries.Count < 16) { RecallRune rune = dropped; if (rune.Marked && rune.TargetMap != null) { Entries.Add(new RunebookEntry(rune.Target, rune.TargetMap, rune.Description, rune.House)); dropped.Delete(); from.Send(new PlaySound(0x42, GetWorldLocation())); string desc = rune.Description; if (desc == null || (desc = desc.Trim()).Length == 0) desc = "(nondescript)"; from.SendMessage(desc); } else { from.SendLocalizedMessage(502409); // This rune does not have a marked location. } } else { from.SendLocalizedMessage(502401); // This runebook is full. } }
public static void OnEffectEnd( Mobile caster, Type type ) { int spellID = SpellRegistry.GetRegistryNumber( type ); if ( spellID > 0 ) caster.Send( new ToggleSpecialAbility( spellID + 1, false ) ); }
public void Teleport(Mobile m, Point3D destLoc, Map destMap) { if (m == null || m.Deleted || destLoc == Point3D.Zero || destMap == Map.Internal) { return; } var oldLoc = m.Location; var oldMap = m.Map; var pm = m as PlayerMobile; if (pm != null && !IsOnline(pm)) { pm.LogoutLocation = destLoc; pm.LogoutMap = destMap; if (!pm.Alive && pm.Corpse != null && !pm.Corpse.Deleted) { pm.Corpse.MoveToWorld(pm.LogoutLocation, pm.LogoutMap); } OnTeleported(pm, oldLoc, oldMap); return; } if (!m.Hidden) { Effects.SendLocationParticles( EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023); } m.MoveToWorld(destLoc, destMap); m.Send(VNScreenLightFlash.Instance); SendSound(Options.Sounds.Teleport); if (!m.Hidden) { Effects.SendLocationParticles(EffectItem.Create(destLoc, destMap, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023); } if (m.Location != destLoc || m.Map != destMap) { return; } if (!m.Alive && m.Corpse != null && !m.Corpse.Deleted) { m.Corpse.MoveToWorld(m.Location, m.Map); } OnTeleported(m, oldLoc, oldMap); }
public override void OnSingleClick(Mobile from) { if (this.Name != null) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name)); } else { if (IsInIDList(from) || from.AccessLevel >= AccessLevel.GameMaster) { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a wand of ghoul's touch ({0} charges)", Charges))); } else { from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a magic wand")); } } }
public static void ClearAllMoves( Mobile m ) { foreach ( KeyValuePair<Int32, SpecialMove> kvp in SpellRegistry.SpecialMoves ) { int moveID = kvp.Key; if ( moveID != -1 ) m.Send( new ToggleSpecialAbility( moveID + 1, false ) ); } }
public override void OnStatsQuery( Mobile from ) { if ( from.Map == this.Map && Utility.InUpdateRange( this, from ) && from.CanSee( this ) ) { BaseHouse house = BaseHouse.FindHouseAt( this ); if ( house != null && house.IsCoOwner( from ) ) from.SendLocalizedMessage( 1072625 ); // As the house owner, you may rename this Parrot. from.Send( new Server.Network.MobileStatus( from, this ) ); } }
public override void BeginConfirmation( Mobile from ) { if ( ShowWarning && ( IsInTown( from.Location, from.Map ) && !IsInTown( MateGate.Location, MateGate.Map ) || ( from.Map != Map.Felucca && MateGate.Map == Map.Felucca && ShowFeluccaWarning ) ) ) { from.Send( new PlaySound( 0x20E, from.Location ) ); from.CloseGump( typeof( MoongateConfirmGump ) ); from.SendGump( new MoongateConfirmGump( from, this ) ); } else { EndConfirmation( from ); } }
public override void OnDoubleClick( Mobile from ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1008155 ); // You peer into the heavens, seeking the moons... from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Trammel, from.X, from.Y ), "", AffixType.Prepend, "Trammel : ", "" ) ); from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Felucca, from.X, from.Y ), "", AffixType.Prepend, "Felucca : ", "" ) ); /* PlayerMobile player = from as PlayerMobile; if ( player != null ) { QuestSystem qs = player.Quest; if ( qs is WitchApprenticeQuest ) { FindIngredientObjective obj = qs.FindObjective( typeof( FindIngredientObjective ) ) as FindIngredientObjective; if ( obj != null && !obj.Completed && obj.Ingredient == Ingredient.StarChart ) { int hours, minutes; Clock.GetTime( from.Map, from.X, from.Y, out hours, out minutes ); if ( hours < 5 || hours > 17 ) { player.SendLocalizedMessage( 1055040 ); // You gaze up into the glittering night sky. With great care, you compose a chart of the most prominent star patterns. obj.Complete(); } else { player.SendLocalizedMessage( 1055039 ); // You gaze up into the sky, but it is not dark enough to see any stars. } } } } */ }
public static void SlowWalk( Mobile m, int duration ) { if ( m.NetState != null ) { m.Send( SpeedControl.WalkSpeed ); new EndSlowWalkTimer( m, DateTime.Now + TimeSpan.FromSeconds( duration ) ).Start(); } else if ( m is BaseCreature ) { BaseCreature bc = (BaseCreature)m; bc.ActiveSpeed += 0.4; bc.PassiveSpeed += 0.4; new EndSlowWalkTimer( m, DateTime.Now + TimeSpan.FromSeconds( duration ) ).Start(); //m.SendMessage( m.GetType().ToString() ); } }
public SecureTrade(Mobile from, Mobile to) { this.m_Valid = true; this.m_From = new SecureTradeInfo(this, from, new SecureTradeContainer(this)); this.m_To = new SecureTradeInfo(this, to, new SecureTradeContainer(this)); bool from6017 = (from.NetState == null ? false : from.NetState.ContainerGridLines); bool to6017 = (to.NetState == null ? false : to.NetState.ContainerGridLines); from.Send(new MobileStatus(from, to)); from.Send(new UpdateSecureTrade(this.m_From.Container, false, false)); if (from6017) from.Send(new SecureTradeEquip6017(this.m_To.Container, to)); else from.Send(new SecureTradeEquip(this.m_To.Container, to)); from.Send(new UpdateSecureTrade(this.m_From.Container, false, false)); if (from6017) from.Send(new SecureTradeEquip6017(this.m_From.Container, from)); else from.Send(new SecureTradeEquip(this.m_From.Container, from)); from.Send(new DisplaySecureTrade(to, this.m_From.Container, this.m_To.Container, to.Name)); from.Send(new UpdateSecureTrade(this.m_From.Container, false, false)); to.Send(new MobileStatus(to, from)); to.Send(new UpdateSecureTrade(this.m_To.Container, false, false)); if (to6017) to.Send(new SecureTradeEquip6017(this.m_From.Container, from)); else to.Send(new SecureTradeEquip(this.m_From.Container, from)); to.Send(new UpdateSecureTrade(this.m_To.Container, false, false)); if (to6017) to.Send(new SecureTradeEquip6017(this.m_To.Container, to)); else to.Send(new SecureTradeEquip(this.m_To.Container, to)); to.Send(new DisplaySecureTrade(from, this.m_To.Container, this.m_From.Container, from.Name)); to.Send(new UpdateSecureTrade(this.m_To.Container, false, false)); }
public static void DoSleep(Mobile caster, Mobile target, TimeSpan duration) { target.Combatant = null; target.Send(SpeedControl.WalkSpeed); caster.PlaySound(0x657); target.FixedParticles(0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255); target.FixedParticles(0x376A, 1, 15, 9502, 97, 3, (EffectLayer)255); BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Sleep, 1080139)); if (m_Table.ContainsKey(target)) m_Table[target].Stop(); m_Table[target] = new SleepTimer(target, duration); target.Delta(MobileDelta.WeaponDamage); }
protected override void OnTarget( Mobile from, object target ) { if ( target is RecallRune ) { RecallRune t = ( RecallRune )target; t.Mark( from ); from.PlaySound( 0x1FA ); Effects.SendLocationEffect( from, from.Map, 14201, 16 ); } else { from.Send( new MessageLocalized( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501797, from.Name, "" ) ); // I cannot mark that object. } }
public static TimeSpan OnUse(Mobile m) { m.RevealingAction(); Timer t = m_Table[m] as Timer; if (t != null && t.Running) t.Stop(); if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (t == null) m_Table[m] = t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 10) secs = 10; t.Delay = TimeSpan.FromSeconds(secs);//15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; IPooledEnumerable eable = m.Map.GetMobilesInRange(m.Location, Core.GlobalMaxUpdateRange); // find all the dead people we can see in range and send them foreach (Mobile g in eable) { if (!g.Alive && m.CanSee(g) && Utility.InUpdateRange(m.Location, g.Location)) m.Send(new MobileIncoming(m, g)); } eable.Free(); m.PlaySound(0x24A); m.SendLocalizedMessage(502444);//You contact the neitherworld. } else { m_Table.Remove(m); m.SendLocalizedMessage(502443);//You fail to contact the neitherworld. m.CanHearGhosts = false; } return TimeSpan.FromSeconds(10.0); }
protected override void OnTarget(Mobile from, object targeted) { PlayerMobile target = targeted as PlayerMobile; if (target != null) { if (from.Equals(target)) { target.DisplayPaperdollTo(from); from.Send(new DisplayProfile(!from.ProfileLocked, from, "Description of " + from.RawName, from.Profile, "Use the space above to describe your character.")); } else { target.SendMessage("You notice that {0} is looking at you.", from.Name); target.DisplayPaperdollTo(from); from.CloseGump(typeof(LookGump)); from.SendGump(new LookGump(target)); } } else from.SendMessage("There's nothing special about it, it isn't worth looking..."); }
public SecureTrade( Mobile from, Mobile to ) { m_Valid = true; m_From = new SecureTradeInfo( this, from, new SecureTradeContainer( this ) ); m_To = new SecureTradeInfo( this, to, new SecureTradeContainer( this ) ); from.Send( new MobileStatus( from, to ) ); from.Send( new UpdateSecureTrade( m_From.Container, false, false ) ); from.Send( new SecureTradeEquip( m_To.Container, to ) ); from.Send( new UpdateSecureTrade( m_From.Container, false, false ) ); from.Send( new SecureTradeEquip( m_From.Container, from ) ); from.Send( new DisplaySecureTrade( to, m_From.Container, m_To.Container, to.Name ) ); from.Send( new UpdateSecureTrade( m_From.Container, false, false ) ); to.Send( new MobileStatus( to, from ) ); to.Send( new UpdateSecureTrade( m_To.Container, false, false ) ); to.Send( new SecureTradeEquip( m_From.Container, from ) ); to.Send( new UpdateSecureTrade( m_To.Container, false, false ) ); to.Send( new SecureTradeEquip( m_To.Container, to ) ); to.Send( new DisplaySecureTrade( from, m_To.Container, m_From.Container, from.Name ) ); to.Send( new UpdateSecureTrade( m_To.Container, false, false ) ); }
public override void OnSingleClick( Mobile from ) { List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>(); AddEquipInfoAttributes( from, attrs ); int number; if ( Name == null ) { number = LabelNumber; } else { this.LabelTo( from, Name ); number = 1041000; } if ( attrs.Count == 0 && Crafter == null && Name != null ) return; EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, attrs.ToArray() ); from.Send( new DisplayEquipmentInfo( this, eqInfo ) ); }
public void AsciiLabelTo(Mobile to, string label) { to.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x3B2, 3, "", label)); }
public void AsciiLabelTo(Mobile to, string label, params object[] args) { to.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x3B2, 3, "", String.Format(label, args))); }
public static void SendLocalizedMessageTo(Item from, Mobile to, int number, string args, int hue) { to.Send(new MessageLocalized(from.Serial, from.ItemID, MessageType.Regular, hue, 3, number, "", args)); }
public static void SendMessageTo(Item from, Mobile to, string text, int hue) { to.Send(new UnicodeMessage(from.Serial, from.ItemID, MessageType.Regular, hue, 3, "ENU", "", text)); }
public SecureTrade(Mobile from, Mobile to) { m_Valid = true; m_From = new SecureTradeInfo(this, from, new SecureTradeContainer(this)); m_To = new SecureTradeInfo(this, to, new SecureTradeContainer(this)); bool from6017 = (from.NetState == null ? false : from.NetState.IsPost6017); bool to6017 = (to.NetState == null ? false : to.NetState.IsPost6017); from.Send(new MobileStatus(from, to)); from.Send(new UpdateSecureTrade(m_From.Container, false, false)); if (from6017) { from.Send(new SecureTradeEquip6017(m_To.Container, to)); } else { from.Send(new SecureTradeEquip(m_To.Container, to)); } from.Send(new UpdateSecureTrade(m_From.Container, false, false)); if (from6017) { from.Send(new SecureTradeEquip6017(m_From.Container, from)); } else { from.Send(new SecureTradeEquip(m_From.Container, from)); } from.Send(new DisplaySecureTrade(to, m_From.Container, m_To.Container, to.Name)); from.Send(new UpdateSecureTrade(m_From.Container, false, false)); to.Send(new MobileStatus(to, from)); to.Send(new UpdateSecureTrade(m_To.Container, false, false)); if (to6017) { to.Send(new SecureTradeEquip6017(m_From.Container, from)); } else { to.Send(new SecureTradeEquip(m_From.Container, from)); } to.Send(new UpdateSecureTrade(m_To.Container, false, false)); if (to6017) { to.Send(new SecureTradeEquip6017(m_To.Container, to)); } else { to.Send(new SecureTradeEquip(m_To.Container, to)); } to.Send(new DisplaySecureTrade(from, m_To.Container, m_From.Container, from.Name)); to.Send(new UpdateSecureTrade(m_To.Container, false, false)); }
public SecureTrade(Mobile from, Mobile to) { m_Valid = true; m_From = new SecureTradeInfo(this, from, new SecureTradeContainer(this)); m_To = new SecureTradeInfo(this, to, new SecureTradeContainer(this)); var from6017 = (from.NetState != null && from.NetState.ContainerGridLines); var to6017 = (to.NetState != null && to.NetState.ContainerGridLines); var from704565 = (from.NetState != null && from.NetState.NewSecureTrading); var to704565 = (to.NetState != null && to.NetState.NewSecureTrading); from.Send(new MobileStatus(from, to)); from.Send(new UpdateSecureTrade(m_From.Container, false, false)); if (from6017) { from.Send(new SecureTradeEquip6017(m_To.Container, to)); } else { from.Send(new SecureTradeEquip(m_To.Container, to)); } from.Send(new UpdateSecureTrade(m_From.Container, false, false)); if (from6017) { from.Send(new SecureTradeEquip6017(m_From.Container, from)); } else { from.Send(new SecureTradeEquip(m_From.Container, from)); } from.Send(new DisplaySecureTrade(to, m_From.Container, m_To.Container, to.Name)); from.Send(new UpdateSecureTrade(m_From.Container, false, false)); if (from.Account != null && from704565) { from.Send( new UpdateSecureTrade(m_From.Container, TradeFlag.UpdateLedger, from.Account.TotalGold, from.Account.TotalPlat)); } to.Send(new MobileStatus(to, from)); to.Send(new UpdateSecureTrade(m_To.Container, false, false)); if (to6017) { to.Send(new SecureTradeEquip6017(m_From.Container, from)); } else { to.Send(new SecureTradeEquip(m_From.Container, from)); } to.Send(new UpdateSecureTrade(m_To.Container, false, false)); if (to6017) { to.Send(new SecureTradeEquip6017(m_To.Container, to)); } else { to.Send(new SecureTradeEquip(m_To.Container, to)); } to.Send(new DisplaySecureTrade(from, m_To.Container, m_From.Container, from.Name)); to.Send(new UpdateSecureTrade(m_To.Container, false, false)); if (to.Account != null && to704565) { to.Send(new UpdateSecureTrade(m_To.Container, TradeFlag.UpdateLedger, to.Account.TotalGold, to.Account.TotalPlat)); } }