public void InitCloseRealm() { ClosingStarted = true; foreach (var i in world.Players.Values) { SendMsg(i, "I HAVE CLOSED THIS REALM!", "#Oryx the Mad God"); SendMsg(i, "YOU WILL NOT LIVE TO SEE THE LIGHT OF DAY!", "#Oryx the Mad God"); } world.Timers.Add(new WorldTimer(20000, (ww, tt) => { CloseRealm(); })); world.Timers.Add(new WorldTimer(30000, (w, t) => { foreach (var i in RealmManager.Clients.Values) { i.SendPacket(new TextPacket { BubbleTime = 0, Stars = -1, Name = "*Error*", Text = "WARNING: Short lag, please wait!" }); } var newworld = GameWorld.AutoName(1, true); RealmManager.AddWorld(newworld); })); RealmManager.CloseWorld(world); }
public void InitCloseRealmT() { ClosingStartedT = true; foreach (var i in world.Players.Values) { SendMsg(i, "I HAVE CLOSED LOE REALM IN 1 MINUTE!", "#Oryx the Mad God"); SendMsg(i, "TIME TO FINAL BATTLE...", "#Oryx the Mad God"); } //world.Timers.Add(new WorldTimer(20000, (ww, tt) => { CloseRealm(); })); var OCastle = RealmManager.AddWorld(new OryxCastleMap()); world.Timers.Add(new WorldTimer(60000, (w, t) => { foreach (var i in world.Players.Values) { i.Client.SendPacket(new ShowEffectPacket { EffectType = EffectType.Earthquake }); SendMsg(i, "MY MINIONS HAVE FAILED ME!", "#Oryx the Mad God"); SendMsg(i, "BUT NOW YOU SHALL FEEL MY WRATH!", "#Oryx the Mad God"); SendMsg(i, "COME MEET YOUR DOOM AT THE WALLS OF MY CASTLE!", "#Oryx the Mad God"); world.Timers.Add(new WorldTimer(10000, (ww, tt) => { i.Client.SendPacket(new ReconnectPacket { Host = "", Port = 2050, GameId = OCastle.Id, Name = OCastle.Name, Key = Empty <byte> .Array, }); })); } } )); RealmManager.CloseWorld(world); RealmManager.AddWorld(world); // var WC = RealmManager.AddWorld(new WineCellarMap()); // foreach (var i in world.Players.Values) // { // i.Client.SendPacket(new ReconnectPacket // { // Host = "", // Port = 2050, // GameId = WC.Id, // Name = WC.Name, // Key = Empty<byte>.Array // }); // } }