#region TeratoDragon if ((DateTime.Now.Minute == 55 && DateTime.Now.Second == 35)) { ushort x = 0, y = 0; ushort MapID = 39984; y = 93; x = 212; uint id = 4152; string name = "TeratoDragon"; ; if (Database.DMaps.LoadMap(MapID)) { if (Program.TeratoDragon) { if (Kernel.Maps.ContainsKey(MapID)) { var Map = Kernel.Maps[MapID]; if (Database.MonsterInformation.MonsterInformations.ContainsKey(id)) { Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id]; mt.BoundX = x; Program.TeratoDragon = false; mt.BoundY = y; Entity entity = new Entity(EntityFlag.Monster, false); entity.MapObjType = MapObjectType.Monster; entity.MonsterInfo = mt.Copy(); entity.MonsterInfo.Owner = entity; entity.Name = mt.Name; entity.MinAttack = mt.MinAttack; entity.MaxAttack = entity.MagicAttack = mt.MaxAttack; entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints; entity.Defence = mt.Defence; entity.Body = mt.Mesh; entity.Level = mt.Level; entity.UID = Map.EntityUIDCounter.Next; entity.MapID = MapID; entity.X = x; entity.Boss = 1; entity.Y = y; if (x == 0 || y == 0) { var cord = Map.RandomCoordinates(); entity.X = cord.Item1; entity.Y = cord.Item2; do { cord = Map.RandomCoordinates(); entity.X = cord.Item1; entity.Y = cord.Item2; } while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]); } Map.AddEntity(entity); Network.GamePackets._String stringPacket = new Network.GamePackets._String(true); stringPacket.UID = entity.UID; stringPacket.Type = Network.GamePackets._String.Effect; stringPacket.Texts.Add("MBStandard"); Data data = new Data(true); data.UID = entity.UID; data.ID = Network.GamePackets.Data.AddEntity; data.wParam1 = entity.X; data.wParam2 = entity.Y; foreach (Client.GameState clllient in Program.Values) { if (clllient.Map.ID == entity.MapID) { if (Kernel.GetDistance(clllient.Player.X, clllient.Player.Y, entity.X, entity.Y) < Constants.nScreenDistance) { entity.SendSpawn(clllient, false); clllient.Send(stringPacket); clllient.Send(data); if (entity.MaxHitpoints > 65535) { Update upd = new Update(true) { UID = entity.UID }; upd.Append(Update.MaxHitpoints, entity.MaxHitpoints); upd.Append(Update.Hitpoints, entity.Hitpoints); clllient.Send(upd); } } } } foreach (var client10 in Program.Values) { client10.Player.SendSysMessage(name + " has appeared. Hurry and go defeat the beast!"); client10.MessageBox(name + " has appeared Would you Want to Kill-Monster?", (p) => { p.Player.Teleport(MapID, x, y); }, null, 20); } } } } } } #endregion
foreach (var client10 in Program.Values) { client10.Player.SendSysMessage(name + " has appeared. Hurry and go defeat the beast!"); client10.MessageBox(name + " has appeared Would you Want to Kill-Monster?", (p) => { p.Player.Teleport(MapID, x, y); }, null, 20);