المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : خلي الدروب شنط


محمد ياسر
2019-04-23, 02:44 PM
بسم الله الرحمن الرحيم ,

موضوع انهردا بيتكلم عن دروب فى سيرفرك ,

الدروب عباره عن شنط سبئس ,

وكمان هتخلى فى ميزه للفى اى بى ,

المهم الفكره هى ان الشنطه ممكن تعملها لسيرفر سهل او صعب ,

حسب ما تيجى فى فكرتك ,

تانى حاجه لما يكون فى اى بى مش هيستنى انو يلم الشنط ,

لانو هيرحلو السبئس فى الايتم ,

هى الفكره حلوه بس للناس الى عيزها بس ,

اول حاجه هنروح على MonsterTable.cs ,

وهنعمل سيرش على الكود دا ,
if (Kernel.Rate(Constants.ConquerPointsDropRate - lessrate))


هتلاقيه فى سيرفرك حسب ما تحب المهم هنبدل الكود بتاع الدروب كلو بالكود دا ,

if (Kernel.Rate(Constants.ConquerPointsDropRate - lessrate))
{
if (killer.EntityFlag == Game.EntityFlag.Player)
{
if (killer.Owner.Entity.VIPLevel == 0)
{
uint amount = (uint)Level / 1;
if (amount < 50)
amount = 50;
if (amount > 170)
amount = 170;
if (killer != null && killer.Owner != null)
{
uint ItemID = 729911;
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = Kernel.Maps[Owner.MapID];
if (Map.SelectCoordonates(ref X, ref Y))
{
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Conqu erPoints;
floorItem.Value = amount;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Type = Network.GamePackets.FloorItem.Drop;
floorItem.OnFloor = Time32.Now;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
Map.AddFloorItem(floorItem);
SendScreenSpawn(floorItem);
}
}
}
else
{
#region VIP Area
byte VIP = killer.Owner.Entity.VIPLevel;
switch (VIP)
{
case 1:
{
uint amount = (uint)Level / 7;
if (amount < 10)
amount = 10;
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
case 2:
{
uint amount = (uint)Level / 6;
if (amount < 10)
amount = 10;
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
case 3:
{
uint amount = (uint)Level / 5;
if (amount < 10)
amount = 10;
if (amount > 100)
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
case 4:
{
uint amount = (uint)Level / 4;
if (amount < 10)
amount = 10;
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
case 5:
{
uint amount = (uint)Level / 3;
if (amount < 15)
amount = 15;
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
case 6:
{
uint amount = (uint)Level / 2;
if (amount < 20)
amount = 20;
if (killer != null && killer.Owner != null)
{
killer.Owner.Send(Constants.PickupConquerPoints(am ount));
killer.ConquerPoints += (uint)amount;
return;
}
break;
}
}
#endregion
}
}
}

MohamedModyAdel
2019-06-25, 10:50 PM
جميل