public static void Initialize() { if (!Settings.Enabled) { return; } EventSink.Login += e => { Mobile m = e.Mobile; if (m == null || m.NetState == null || !m.NetState.Running) { return; } m.Send(new BeginHandshake()); if (_Dictionary.ContainsKey(m)) { Timer t = _Dictionary[m]; if (t != null && t.Running) { t.Stop(); } } _Dictionary[m] = Timer.DelayCall(Settings.HandshakeTimeout, OnHandshakeTimeout, m); }; ProtocolExtensions.Register( 0xFF, true, (state, pvSrc) => { pvSrc.Trace(state); if (state == null || state.Mobile == null || !state.Running) { return; } Mobile m = state.Mobile; if (!_Dictionary.ContainsKey(m)) { return; } Timer t = _Dictionary[m]; if (t != null) { t.Stop(); } _Dictionary.Remove(m); }); }
public static void Initialize() { if (Settings.Enabled) { EventSink.Login += new LoginEventHandler(EventSink_Login); ProtocolExtensions.Register(0xFF, true, new OnPacketReceive(OnHandshakeResponse)); } }
public static void Initialize() { if (Settings.Enabled) { EventSink.Login += new LoginEventHandler(EventSink_Login); ProtocolExtensions.Register(0xFF, true, new OnPacketReceive(OnHandshakeResponse)); } CommandSystem.Register("RazorCheck", AccessLevel.GameMaster, new CommandEventHandler(RazorCheck_Command)); }
public static void Initialize() { if (!Settings.Enabled) { return; } EventSink.Login += OnLogin; ProtocolExtensions.Register(0xFF, true, OnResponse); }
public static void Initialize() { if (Settings.PartyTrack) { ProtocolExtensions.Register(0x00, true, new OnPacketReceive(OnPartyTrack)); } if (Settings.GuildTrack) { ProtocolExtensions.Register(0x01, true, new OnPacketReceive(OnGuildTrack)); } }
public static void Initialize() { Console.Write("Scripts: Razor feature negotiations..."); if (RazorFeatureControl.Enabled) { EventSink.Login += new LoginEventHandler(EventSink_Login); ProtocolExtensions.Register(0xFF, true, new OnPacketReceive(OnHandshakeResponse)); Console.WriteLine("enabled."); } else { Console.WriteLine("disabled."); } }
public static void Initialize() { if (Settings.PartyTrack) { ProtocolExtensions.Register(0x00, true, new OnPacketReceive(OnPartyTrack)); } if (Settings.GuildTrack) { ProtocolExtensions.Register(0x01, true, new OnPacketReceive(OnGuildTrack)); } ProtocolExtensions.Register(0x06, true, new OnPacketReceive(SPartyTrack)); ProtocolExtensions.Register(0x02, true, new OnPacketReceive(CustomRunebook)); ProtocolExtensions.Register(0x03, true, new OnPacketReceive(CustomRunebookTravel)); }
public static void Initialize() { Server.EventSink.Login += new LoginEventHandler(EventSink_Login); Server.EventSink.Logout += new LogoutEventHandler(EventSink_Logout); Server.Network.PacketHandlers.Register(0x03, 0, true, new OnPacketReceive(OnAsciiPacket)); Server.Network.PacketHandlers.Register6017(0x03, 0, true, new OnPacketReceive(OnAsciiPacket)); ProtocolExtensions.Register(0xFF, true, new OnPacketReceive(OnHandshakeResponse)); Server.Network.PacketHandlers.ThirdPartyAuthCallback = new Server.Network.PacketHandlers.PlayCharCallback(OnThirdPartyAuth); Server.Network.PacketHandlers.ThirdPartyHackedCallback = new Server.Network.PacketHandlers.PlayCharCallback(OnThirdPartyHacked); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.FilterWeather); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.FilterLight); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.ProtectHeals); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.OverheadHealth); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.ClosestTargets); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.AutoOpenDoors); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.AutoPotionEquip); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.SmartTarget); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.RangedTarget); Server.Network.FeatureProtection.Disable(Server.Network.ThirdPartyFeature.ProtectHeals); //Server.Network.FeatureProtection.Disable( Server.Network.ThirdPartyFeature.DequipOnCast ); try { using (StreamReader sr = new StreamReader("ExeNames.log")) { string line; while ((line = sr.ReadLine()) != null) { m_Exes.Add(line); } } } catch { } }