محمد ياسر
2019-06-21, 10:42 AM
السلام عليكم ورحمة الله وبركاته
خلى الوحوش تنط زى الشخصيات ههههههههه
ياعني متخلين الوحوش تنظ ذي الشخصيات ازاي بس في ناس بتحب تلعب روبوت فاحنا جبنالك وحوش
بس الفكره هنا مش اتمشي علي كل الوحش انت بس الي اتحدد اني وحش
ياعني باختصار شديد لو في كوسته وعايز وحشه ينط يبا انت في الموضوع الصح
هنخش على
Screen.cs
وبعدين نبحث عن
#region Companions
واقفلها بالسالب
وضيف تحته ده
#region Monster :D
// ushort xx = (ushort)Kernel.Random.Next(monster.MonsterInfo.Bou ndX - 5, monster.MonsterInfo.BoundX + 5);
// ushort yy = (ushort)Kernel.Random.Next(monster.MonsterInfo.Bou ndY - 5, monster.MonsterInfo.BoundY + 5);
ushort xx = (ushort)Kernel.Random.Next(monster.X - 10, monster.X + 10);
ushort yy = (ushort)Kernel.Random.Next(monster.Y - 10, monster.Y + 10);
if (monster.Name.Contains("Pheasant"))
{
if (monster.MonsterInfo.Type != 1)
{
if (monster.MonsterInfo.InSight == 0)
{
if (monster.X != xx || monster.Y != yy)
{
monster.X = xx;
monster.Y = yy;
TwoMovements jump = new TwoMovements();
jump.X = xx;
jump.Y = yy;
jump.EntityCount = 1;
jump.FirstEntity = monster.UID;
jump.MovementType = TwoMovements.Jump;
client.SendScreen(jump, true);
}
if (client.Entity.ContainsFlag(Network.GamePackets.Up date.Flags.FlashingName))
monster.MonsterInfo.InSight = client.Entity.UID;
}
else
{
if (monster.MonsterInfo.InSight == client.Entity.UID)
{
if (!client.Entity.Dead)
{
if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monst er.MonsterInfo.AttackSpeed))
{
short dist = Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y);
if (distance <= monster.MonsterInfo.AttackRange)
{
monster.MonsterInfo.LastMove = Time32.Now;
new Game.Attacking.Handle(null, monster, client.Entity);
if (monster.MonsterInfo.Type != 2)
client.Send(new Network.GamePackets.Message("Welcome In Our Game #13 .", client.Entity.Name, monster.MonsterInfo.Name, System.Drawing.Color.White, Message.Talk));
client.Send(new Network.GamePackets.Message("Welcome In Our Game #13 .", client.Entity.Name, monster.Name, System.Drawing.Color.White, Message.Talk));
}
else
{
if (distance <= monster.MonsterInfo.ViewRange)
{
TwoMovements jump = new TwoMovements();
jump.X = client.Entity.X;
jump.Y = client.Entity.Y;
monster.X = client.Entity.X;
monster.Y = client.Entity.Y;
jump.EntityCount = 1;
jump.FirstEntity = monster.UID;
jump.MovementType = Network.GamePackets.TwoMovements.Jump;
client.SendScreen(jump, true);
}
}
}
}
else
{
}
}
else
{
if (monster.MonsterInfo.InSight == client.Entity.UID)
{
monster.MonsterInfo.InSight = 0;
}
}
}
foreach (IMapObject obj2 in client.Screen.Objects)
{
if (obj2 == null)
continue;
if (obj2.MapObjType == MapObjectType.Monster)
{
Entity monster2 = client.Map.Entities[obj2.UID];
if (monster2 == null)
continue;
if (monster2.Dead)
continue;
if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monst er.MonsterInfo.AttackSpeed))
{
if (monster2.MonsterInfo.Type == 1 && !monster2.Companion)
{
short dist = Kernel.GetDistance(monster.X, monster.Y, monster2.X, monster2.Y);
if (distance <= monster.MonsterInfo.AttackRange)
{
monster.MonsterInfo.LastMove = Time32.Now;
new Game.Attacking.Handle(null, monster, monster2);
}
}
}
}
}
}
}
#endregion
شايفين السطر ده
if (monster.Name.Contains("Pheasant"))
Pheasant ده اسم الوحش الي هو وحش الفراخ الي في التون
لو عايزه يكون وحش معين اتغير الاسم بس
خلى الوحوش تنط زى الشخصيات ههههههههه
ياعني متخلين الوحوش تنظ ذي الشخصيات ازاي بس في ناس بتحب تلعب روبوت فاحنا جبنالك وحوش
بس الفكره هنا مش اتمشي علي كل الوحش انت بس الي اتحدد اني وحش
ياعني باختصار شديد لو في كوسته وعايز وحشه ينط يبا انت في الموضوع الصح
هنخش على
Screen.cs
وبعدين نبحث عن
#region Companions
واقفلها بالسالب
وضيف تحته ده
#region Monster :D
// ushort xx = (ushort)Kernel.Random.Next(monster.MonsterInfo.Bou ndX - 5, monster.MonsterInfo.BoundX + 5);
// ushort yy = (ushort)Kernel.Random.Next(monster.MonsterInfo.Bou ndY - 5, monster.MonsterInfo.BoundY + 5);
ushort xx = (ushort)Kernel.Random.Next(monster.X - 10, monster.X + 10);
ushort yy = (ushort)Kernel.Random.Next(monster.Y - 10, monster.Y + 10);
if (monster.Name.Contains("Pheasant"))
{
if (monster.MonsterInfo.Type != 1)
{
if (monster.MonsterInfo.InSight == 0)
{
if (monster.X != xx || monster.Y != yy)
{
monster.X = xx;
monster.Y = yy;
TwoMovements jump = new TwoMovements();
jump.X = xx;
jump.Y = yy;
jump.EntityCount = 1;
jump.FirstEntity = monster.UID;
jump.MovementType = TwoMovements.Jump;
client.SendScreen(jump, true);
}
if (client.Entity.ContainsFlag(Network.GamePackets.Up date.Flags.FlashingName))
monster.MonsterInfo.InSight = client.Entity.UID;
}
else
{
if (monster.MonsterInfo.InSight == client.Entity.UID)
{
if (!client.Entity.Dead)
{
if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monst er.MonsterInfo.AttackSpeed))
{
short dist = Kernel.GetDistance(monster.X, monster.Y, client.Entity.X, client.Entity.Y);
if (distance <= monster.MonsterInfo.AttackRange)
{
monster.MonsterInfo.LastMove = Time32.Now;
new Game.Attacking.Handle(null, monster, client.Entity);
if (monster.MonsterInfo.Type != 2)
client.Send(new Network.GamePackets.Message("Welcome In Our Game #13 .", client.Entity.Name, monster.MonsterInfo.Name, System.Drawing.Color.White, Message.Talk));
client.Send(new Network.GamePackets.Message("Welcome In Our Game #13 .", client.Entity.Name, monster.Name, System.Drawing.Color.White, Message.Talk));
}
else
{
if (distance <= monster.MonsterInfo.ViewRange)
{
TwoMovements jump = new TwoMovements();
jump.X = client.Entity.X;
jump.Y = client.Entity.Y;
monster.X = client.Entity.X;
monster.Y = client.Entity.Y;
jump.EntityCount = 1;
jump.FirstEntity = monster.UID;
jump.MovementType = Network.GamePackets.TwoMovements.Jump;
client.SendScreen(jump, true);
}
}
}
}
else
{
}
}
else
{
if (monster.MonsterInfo.InSight == client.Entity.UID)
{
monster.MonsterInfo.InSight = 0;
}
}
}
foreach (IMapObject obj2 in client.Screen.Objects)
{
if (obj2 == null)
continue;
if (obj2.MapObjType == MapObjectType.Monster)
{
Entity monster2 = client.Map.Entities[obj2.UID];
if (monster2 == null)
continue;
if (monster2.Dead)
continue;
if (Time32.Now >= monster.MonsterInfo.LastMove.AddMilliseconds(monst er.MonsterInfo.AttackSpeed))
{
if (monster2.MonsterInfo.Type == 1 && !monster2.Companion)
{
short dist = Kernel.GetDistance(monster.X, monster.Y, monster2.X, monster2.Y);
if (distance <= monster.MonsterInfo.AttackRange)
{
monster.MonsterInfo.LastMove = Time32.Now;
new Game.Attacking.Handle(null, monster, monster2);
}
}
}
}
}
}
}
#endregion
شايفين السطر ده
if (monster.Name.Contains("Pheasant"))
Pheasant ده اسم الوحش الي هو وحش الفراخ الي في التون
لو عايزه يكون وحش معين اتغير الاسم بس