|
ushort rider;
rider = (ushort)(client.Player.UID - 1000000);
new Game.Map(rider, Database.DMaps.MapPaths[rider]);
if (DMaps.LoadMap(rider))
{
#region NemesisTyrant
if ((DateTime.Now.Minute == 28 && DateTime.Now.Second == 05))
{
ushort x = 0, y = 0;
ushort MapID = rider;
y = 293;
x = 281;
uint id = 4220;
string name = "NemesisTyrant";
if (Database.DMaps.LoadMap(MapID))
{
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.ContainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
Program.Nemesis = false;
mt.BoundY = y;
mt.RespawnTime = 36000;
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);
}
}
}
}
}
}
}
#endregion
client.Player.Teleport(rider, 50, 50);
}
public static Int32 GetDamageEntity2Entity(Entity Attacker, Entity Target,
double torist = (double)(Target.Gems[GemTypes.Tortoise] / 100d);
torist = Math.Max(torist, 0.5);
public static Int32 GetDamageEntity2Entity(Entity Attacker, Entity Target, ushort MagicType,
double torist = (double)(Target.Gems[GemTypes.Tortoise] / 100d);