|
المشاركات 483 |
+التقييم 0.24 |
تاريخ التسجيل May 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 145 |
أفضل جواب - كتبه Tefa |
case 1002: تحت كود:
ضيف كود:
|
public void DropRandomStuff(Entity KillerName)
{
//demha||rider
if (KillerName == null)
return;
if (PKPoints >= 30 && Killer != null && Killer.Owner != null && MapID != 1038)
{
for (int i = 0; i < 9; i++)
{
var rnd = Kernel.Random.Next(19);
if (Owner.AlternateEquipment)
rnd = Kernel.Random.Next(10, 29);
var item = Owner.Equipment.TryGetItem((byte)rnd);
var Item = item; if (Item != null)
{
byte dwp = 20;
if (!Owner.AlternateEquipment)
{
dwp = 0;
if (Item.Position >= 20)
continue;
}
if (Item.Position == 4 + dwp)
{
if (!Owner.Equipment.Free((byte)(5 + dwp)))
{
Item = Owner.Equipment.TryGetItem((byte)(5 + dwp));
}
}
if (Item.Position == 9 + dwp || Item.Position == 12)
continue;
if (Item.Position == 5 + dwp)
if (Item.ID.ToString().StartsWith("105"))
continue;
if (Kernel.Rate(25 + (int)(PKPoints > 30 ? 75 : 0)))
{
ushort x = X, y = Y; Game.Map Map = Kernel.Maps[MapID];
if (Map.SelectCoordonates(ref x, ref y))
{
Owner.Equipment.RemoveToGround(Item.Position);
var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID];
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
floorItem.Item = Item;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = (uint)Item.ID;
floorItem.MapID = MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = x;
floorItem.Y = y;
floorItem.Type = Network.GamePackets.FloorItem.DropDetain;
floorItem.OnFloor = Time32.Now;
floorItem.ItemColor = floorItem.Item.Color;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
Owner.SendScreenSpawn(floorItem, true);
Database.DetainedItemTable.DetainItem(Item, Owner, Killer.Owner);
Owner.Equipment.UpdateEntityPacket();
ClientEquip eq = new ClientEquip(Owner);
eq.DoEquips(Owner);
Owner.Send(eq);
Owner.LoadItemStats();
break;
}
}
}
}
}
if (PKPoints > 99)
{
if (KillerName.EntityFlag == EntityFlag.Entity)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured by " + KillerName.Name + " and sent in jail! The world is now safer!", System.Drawing.Color.Red, Message.Talk), Program.Values);
Teleport(6000, 50, 50);
}
else
{
Kernel.SendWorldMessage(new Network.GamePackets.Message(Name + " has been captured and sent in jail! The world is now safer!", System.Drawing.Color.Red, Message.Talk), Program.Values);
Teleport(6000, 50, 50);
}
}
}
public void Die(Entity killer)
Network.PacketHandler.AddEnemy(this.Owner, killer.Owner);
if (killer.PKMode != BlackBlock.Game.Enums.PKMode.Jiang)
{
if (killer.EntityFlag == BlackBlock.Game.EntityFlag.Entity)
{
if (Kernel.Rate(50))
{
DropRandomStuff(Killer);
}
}
}
Over:
public static bool CanAttack(Game.Entity attacker, Game.Entity attacked, Database.SpellInformation spell, bool melee)
if (attacker.PKMode == BlackBlock.Game.Enums.PKMode.Jiang && attacked.MapID != 1036)
{
if (attacked.ContainsFlag(Update.Flags.FlashingName) || attacked.PKPoints > 99)
{
return true;
}
}
public void droprandomstuff(entity killername)
{
//demha||rider
if (killername == null)
return;
if (pkpoints >= 30 && killer != null && killer.owner != null && mapid != 1038)
{
for (int i = 0; i < 9; i++)
{
var rnd = kernel.random.next(19);
if (owner.alternateequipment)
rnd = kernel.random.next(10, 29);
var item = owner.equipment.trygetitem((byte)rnd);
var item = item; if (item != null)
{
byte dwp = 20;
if (!owner.alternateequipment)
{
dwp = 0;
if (item.position >= 20)
continue;
}
if (item.position == 4 + dwp)
{
if (!owner.equipment.free((byte)(5 + dwp)))
{
item = owner.equipment.trygetitem((byte)(5 + dwp));
}
}
if (item.position == 9 + dwp || item.position == 12)
continue;
if (item.position == 5 + dwp)
if (item.id.tostring().startswith("105"))
continue;
if (kernel.rate(25 + (int)(pkpoints > 30 ? 75 : 0)))
{
ushort x = x, y = y; game.map map = kernel.maps[mapid];
if (map.selectcoordonates(ref x, ref y))
{
owner.equipment.removetoground(item.position);
var infos = database.conqueriteminformation.baseinformations[(uint)item.id];
network.gamepackets.flooritem flooritem = new network.gamepackets.flooritem(true);
flooritem.item = item;
flooritem.valuetype = network.gamepackets.flooritem.floorvaluetype.item;
flooritem.itemid = (uint)item.id;
flooritem.mapid = mapid;
flooritem.mapobjtype = game.mapobjecttype.item;
flooritem.x = x;
flooritem.y = y;
flooritem.type = network.gamepackets.flooritem.dropdetain;
flooritem.onfloor = time32.now;
flooritem.itemcolor = flooritem.item.color;
flooritem.uid = network.gamepackets.flooritem.flooruid.next;
while (map.npcs.containskey(flooritem.uid))
flooritem.uid = network.gamepackets.flooritem.flooruid.next;
owner.sendscreenspawn(flooritem, true);
database.detaineditemtable.detainitem(item, owner, killer.owner);
owner.equipment.updateentitypacket();
clientequip eq = new clientequip(owner);
eq.doequips(owner);
owner.send(eq);
owner.loaditemstats();
break;
}
}
}
}
}
if (pkpoints > 99)
{
if (killername.entityflag == entityflag.entity)
{
kernel.sendworldmessage(new network.gamepackets.message(name + " has been captured by " + killername.name + " and sent in jail! The world is now safer!", system.drawing.color.red, message.talk), program.values);
teleport(6000, 50, 50);
}
else
{
kernel.sendworldmessage(new network.gamepackets.message(name + " has been captured and sent in jail! The world is now safer!", system.drawing.color.red, message.talk), program.values);
teleport(6000, 50, 50);
}
}
}
public void die(entity killer)
network.packethandler.addenemy(this.owner, killer.owner);
if (killer.pkmode != blackblock.game.enums.pkmode.jiang)
{
if (killer.entityflag == blackblock.game.entityflag.entity)
{
if (kernel.rate(50))
{
droprandomstuff(killer);
}
}
}
over:
public static bool canattack(game.entity attacker, game.entity attacked, database.spellinformation spell, bool melee)
if (attacker.pkmode == blackblock.game.enums.pkmode.jiang && attacked.mapid != 1036)
{
if (attacked.containsflag(update.flags.flashingname) || attacked.pkpoints > 99)
{
return true;
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حد يعرف حل المشكلة دى | memoelgaraihy | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2021-12-09 07:45 PM |
حد يعرف حل المشكلة دى | memoelgaraihy | سورسات كونكر | 0 | 2021-09-07 01:00 AM |
ممكن حل المشكلة دى فى الـ vps | Mohammed Hossam | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-05-04 05:41 PM |
جل المشكلة دي | Tarek Roshdi | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-03-27 10:49 PM |
ارجو حل المشكلة دى | osama | مشكلات السيرفيرات كونكر الشخصيه | 7 | 2019-06-14 09:27 AM |