Ejemplo n.º 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                IPoint3D p = targeted as IPoint3D;

                if (p == null)
                {
                    return;
                }

                Spells.SpellHelper.GetSurfaceTop(ref p);

                m_Destination = new Point3D(p);
                m_Facet       = from.Map;

                // Place New Gates

                // Unguarded
                //PlaceEventGate(2714, 2173, 0);  // Buccaneer's Den
                //PlaceEventGate(1377, 1504, 10);  // Britain Graveyard
                //PlaceEventGate(1827, 2770, 0);  // Trinsic Entrance
                //PlaceEventGate(2001, 2933, 0);  // Trinsic South Gate
                //PlaceEventGate(2901, 605, 0);   // North of Vesper Bank
                //PlaceEventGate(1367, 888, 0);   // Wind Entrance
                PlaceEventGate(1458, 844, 5);   // Chaos Shrine
                PlaceEventGate(1858, 875, -1);  // Compassion
                PlaceEventGate(4211, 564, 42);  // Honesty
                PlaceEventGate(1727, 3528, 3);  // Honor
                PlaceEventGate(4274, 3697, 0);  // Humility
                PlaceEventGate(1301, 634, 16);  // Justice
                PlaceEventGate(3355, 290, 4);   // Sacrifice
                PlaceEventGate(1600, 2489, 12); // Spirituality
                PlaceEventGate(2492, 3931, 5);  // Valor

                //PlaceEventGate(5349, 3957, 2);  // Delucia Pond

                PlaceEventGate(5274, 1162, 0); // Jail Cell 1

                // Guarded
                PlaceEventGate(1421, 1698, 0);  // Britain Bank
                PlaceEventGate(2286, 1200, 0);  // Cove
                PlaceEventGate(3731, 2169, 20); // Magincia
                PlaceEventGate(2522, 558, 0);   // Minoc
                PlaceEventGate(4462, 1176, 0);  // Moonglow Bank
                PlaceEventGate(4479, 1124, 0);  // Moonglow Counselor's Guild
                PlaceEventGate(3676, 2508, 0);  // Ocllo
                PlaceEventGate(2880, 3465, 15); // Serps
                PlaceEventGate(2900, 692, 0);   // Vesper Bank
                PlaceEventGate(5354, 90, 15);   // Wind Bank
                PlaceEventGate(535, 992, 0);    // Center of Yew
                PlaceEventGate(5273, 3994, 37); // Delucia Bank

                // Notify Clients That Gates Are Open
                foreach (NetState state in NetState.Instances)
                {
                    Mobile m = state.Mobile;

                    //if ( m is PlayerMobile && (m as PlayerMobile).EventBanned )
                    //continue;

                    if (m != null)
                    {
                        m.SendGump(new EventNoticeGump());
                    }
                }

                // Notify IRC Users
                IRCBot.SendMessage(IRCBot.Channel, String.Format("[EVENT] An event has been opened by {0}. Check the nearest bank, town center, or shrine for a gate.", from.Name));
            }
Ejemplo n.º 2
0
        private static void LogSync(TargetInfo sync)
        {
            EquipInfo eq = null;

            for (int e = 0; e < m_Equips.Count; e++)
            {
                if (m_Equips[e].Time > sync.Time)
                {
                    break;
                }

                if (m_Equips[e].From == sync.From)
                {
                    eq = m_Equips[e];
                    m_Equips.RemoveAt(e);
                    break;
                }

                for (int i = 0; i < sync.Matches.Count; i++)
                {
                    if (sync.Matches[i].From == m_Equips[e].From)
                    {
                        eq = m_Equips[e];
                        m_Equips.RemoveAt(e);
                        break;
                    }
                }

                if (eq != null)
                {
                    break;
                }
            }

            try
            {
                StringBuilder msg = new StringBuilder("Sync Notice ");

                msg.AppendFormat("(on '{0}'): ", sync.Target.Name);

                using (System.IO.StreamWriter w = new System.IO.StreamWriter("Syncers.log", true, System.Text.Encoding.ASCII))
                {
                    w.WriteLine("Sync on '{0}' ({1}):", sync.Target.Name, sync.Target.Account == null ? "<npc>" : sync.Target.Account.Username);

                    if (eq != null)
                    {
                        msg.AppendFormat("!'{0}' equipped {1} @ {2}! ", eq.From, eq.Item.GetType(), (eq.Time - sync.Time).TotalSeconds);
                        w.WriteLine("\t!!'{0}' equipped {1} @ {2}", eq.From, eq.Item.GetType(), (eq.Time - sync.Time).TotalSeconds);
                    }

                    w.WriteLine("\t'{0}'/'{1}' ({2}) @ {3}",
                                sync.From.Name,
                                sync.From.Account == null ? "<null>" : sync.From.Account.Username,
                                sync.Type.FullName,
                                sync.Time);

                    msg.AppendFormat("'{0}' ", sync.From.Name);

                    foreach (TargetInfo info in sync.Matches)
                    {
                        w.WriteLine("\t'{0}'/'{1}' ({2}) @+{3}",
                                    info.From.Name,
                                    info.From.Account == null ? "<null>" : info.From.Account.Username,
                                    info.Type.FullName,
                                    (info.Time - sync.Time).TotalSeconds);

                        msg.AppendFormat("'{0}'+{1} ", info.From.Name, (info.Time - sync.Time).TotalSeconds);
                    }

                    w.Flush();
                }

                foreach (NetState ns in NetState.Instances)
                {
                    if (ns.Mobile != null && ns.Mobile.AccessLevel > AccessLevel.Counselor)
                    {
                        ns.Mobile.SendMessage(msg.ToString());
                    }
                }

                IRCBot.StaffNotice(msg.ToString());
            }
            catch
            {
            }
        }