|
المشاركات 1,372 |
+التقييم 0.68 |
تاريخ التسجيل Apr 2019 |
الاقامة شرقيه/زقازيق |
نظام التشغيل |
رقم العضوية 30 |
public void Die(Entity killer)
public void Die(Entity killer)
{
{
#region Ninja Vs Skull
if (this.MapID == 6413 && killer.MapID == 6413)
{
if (World.SkullVsNinja == true)
{
if (killer.ContainsFlag3(Network.GamePackets.Update.Flags3.ninja) && this.ContainsFlag3(Network.GamePackets.Update.Flags3.skull))
{
killer.Owner.Send(new Message("Grtz You Got " + 2000 + " cps From kill skull Team member ", System.Drawing.Color.Red, Message.Talk));
killer.ConquerPoints += (uint)2000;
}
else if (killer.ContainsFlag3(Network.GamePackets.Update.Flags3.skull) && this.ContainsFlag3(Network.GamePackets.Update.Flags3.ninja))
{
killer.Owner.Send(new Message("Grtz You Got " + 2000 + " cps From kill skull Team member ", System.Drawing.Color.Red, Message.Talk));
killer.ConquerPoints += (uint)2000;
}
else if (killer.ContainsFlag3(Network.GamePackets.Update.Flags3.skull) && this.ContainsFlag3(Network.GamePackets.Update.Flags3.skull))
{
if (killer.ConquerPoints >= 2000)
{
killer.Owner.Send(new Message("You Lose 50 cps Cuz You KIll Team Member ", System.Drawing.Color.Red, Message.Talk));
killer.ConquerPoints -= (uint)2000;
}
else
{
Owner.Send(new Message("You out cuz u kill Team member and not hvae cps", System.Drawing.Color.Red, Message.Talk));
killer.Teleport(1002, 301, 281);
killer.ConquerPoints -= killer.ConquerPoints;
}
}
else if (killer.ContainsFlag3(Network.GamePackets.Update.Flags3.ninja) && this.ContainsFlag3(Network.GamePackets.Update.Flags3.ninja))
{
if (killer.ConquerPoints >= 2000)
{
killer.Owner.Send(new Message("You Lose 50 cps Cuz You KIll Team Member ", System.Drawing.Color.Red, Message.Talk));
killer.ConquerPoints -= (uint)2000;
}
else
{
killer.Owner.Send(new Message("You out cuz u kill Team member and not hvae cps", System.Drawing.Color.Red, Message.Talk));
killer.Teleport(1002, 301, 281);
killer.ConquerPoints = 0;
}
}
foreach (GameState client in Kernel.GamePool.Values)
{
if (client.Entity.MapID == 6413)
{
SendScoreVs(client);
}
}
}
}
#endregion
#region rkbox
if (killer.MapID == 1002)
{
DateTime Now64 = DateTime.Now;
uint rkbox = (uint)Kernel.Random.Next(1, 5);
if ((Now64.Hour == 6) && (Now64.Minute == 15) && (Now64.Second == 01))
{
killer.rkbox += rkbox;
if (this.rkbox >= rkbox)
this.rkbox -= rkbox;
}
}
#endregion
killer.CountKilling++;
if (killer.CountKilling >= 20)
{
killer.CountKilling = 0;
killer.HuntingExp += 2;
}
#region LastTeam
if (killer.MapID == 16414)
{
foreach (GameState clients in Kernel.GamePool.Values)
{
if (clients.Entity.MapID == 16414)
{
clients.Entity.SendScoreLAstTeam(clients);
}
}
}
#endregion
#region Killer Points
if (EntityFlag == EntityFlag.Entity)
{
if (killer.EntityFlag == EntityFlag.Entity)
{
if (killer.MapID == 5451)
{
killer.ConquerPoints += 3000;
NpcReply reply;
reply = new NpcReply(6, string.Concat(new object[] { "You Have Killed ", Owner.Entity.Name, " and get from him 3000 CPs" }))
{
OptionID = 0xff
};
killer.Owner.Send(reply.ToArray());
}
if (Owner.Entity.MapID == 5451)
{
//Owner.Entity.ConquerPoints -= 300;
Owner.Entity.Teleport(1002, 438, 382);
}
}
}
#endregion
#region Die Guild System
if (killer.EntityFlag == EntityFlag.Entity && EntityFlag == EntityFlag.Entity)
{
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1015)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at BirdIsland!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1020)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at ApeCity!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1011)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at PhoenixCastle!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1000)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at DesertCity!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1001)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at MysticCastle!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1762)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at FrozenGrotto 2!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 2056)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
killer.Money += 20;
Kernel.SendWorldMessage(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at FrozenGrotto 6!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild), Program.Values);
}
}
#endregion
#region CaptureTheFlag
if (killer.GuildID != 0 && killer.MapID == CaptureTheFlag.MapID && CaptureTheFlag.IsWar)
{
if (GuildID != 0)
{
if (killer.Owner.Guild.Enemy.ContainsKey(GuildID))
killer.Owner.Guild.CTFPoints += 1;
else if (killer.Owner.Guild.Ally.ContainsKey(GuildID))
killer.Owner.Guild.CTFPoints += 1;
}
if (ContainsFlag2(Network.GamePackets.Update.Flags2.CarryingFlag))
{
StaticEntity entity = new StaticEntity((uint)(X * 1000 + Y), X, Y, MapID);
entity.DoFlag();
Owner.Map.AddStaticEntity(entity);
RemoveFlag2(Network.GamePackets.Update.Flags2.CarryingFlag);
Owner.Send(Program.World.CTF.generateTimer(0));
Owner.Send(Program.World.CTF.generateEffect(Owner));
RemoveFlag2(Network.GamePackets.Update.Flags2.CarryingFlag);
nRemoveFlag(118);
nRemoveFlag(91);
if (killer.GuildID != GuildID)
{
Killer.AddFlag2(Network.GamePackets.Update.Flags2.CarryingFlag);
Time32 end = FlagStamp.AddSeconds(60) - Time32.Now;
killer.FlagStamp = end;
killer.Owner.Send(Program.World.CTF.generateTimer((uint)end.Value));
killer.Owner.Send(Program.World.CTF.generateEffect(killer.Owner));
killer.Owner.Guild.CTFPoints += 3;
}
}
}
#endregion
if (EntityFlag == EntityFlag.Entity)
{
if (killer.EntityFlag == EntityFlag.Entity)
{
#region Cheack Pk Map
if (Owner.Entity.MapID == 2555 || Owner.Entity.MapID == 5530 || Owner.Entity.MapID == 5531 || Owner.Entity.MapID == 5532 || Owner.Entity.MapID == 1452 || Owner.Entity.MapID == 5560 || Owner.Entity.MapID == 5570 || Owner.Entity.MapID == 5580 || Owner.Entity.MapID == 1707 || Owner.Entity.MapID == 3070 || Owner.Entity.MapID == 3071)
{
Owner.Entity.Teleport(1002, 438, 382);
// MrHassan.Console.WriteLine("Done");
}
#endregion Cheack Pk Map
if (Constants.PKFreeMaps.Contains(killer.MapID))
goto Over;
if (killer.Owner.Map.BaseID == 700)
goto Over;
if (((killer.PKMode != MrHassan.Game.Enums.PKMode.Jiang) && (killer.PKMode != MrHassan.Game.Enums.PKMode.Guild) && (killer.PKMode != MrHassan.Game.Enums.PKMode.Revenge) && (!ContainsFlag(Network.GamePackets.Update.Flags.FlashingName) && !ContainsFlag(Network.GamePackets.Update.Flags.BlackName)) && !this.ContainsFlag(1L)) && !this.ContainsFlag(0x8000L))
{
killer.AddFlag(Network.GamePackets.Update.Flags.FlashingName);
killer.FlashingNameStamp = Time32.Now;
killer.FlashingNameTime = 60;
if (killer.GuildID != 0)
{
if (killer.Owner.Guild.Enemy.ContainsKey(GuildID))
{
killer.PKPoints += 3;
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
else
{
if (!killer.Owner.Enemy.ContainsKey(UID))
killer.PKPoints += 10;
else
killer.PKPoints += 5;
killer.PKPoints += 3;
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
}
else
{
if (!killer.Owner.Enemy.ContainsKey(UID))
{
killer.PKPoints += 10;
}
else
{
killer.PKPoints += 5;
}
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
if (killer.EntityFlag == Game.EntityFlag.Entity)
{
if (EntityFlag == Game.EntityFlag.Entity)
{
Game.PkExpeliate pk = new Game.PkExpeliate();
if (!killer.PkExplorerValues.ContainsKey(UID))
{
pk.UID = killer.UID;
pk.killedUID = UID;
pk.Name = Name;
pk.KilledAt = GetMapName(MapID);
pk.LostExp = 0;
pk.Times = 1;
pk.Potency = (uint)BattlePower;
pk.Level = Level;
PkExpelTable.PkExploitAdd(killer.Owner, pk);
}
else
{
pk.UID = killer.UID;
pk.killedUID = UID;
pk.Name = Name;
pk.KilledAt = GetMapName(MapID);
pk.LostExp = 0;
killer.PkExplorerValues[UID].Times += 1;
pk.Times = killer.PkExplorerValues[UID].Times;
pk.Potency = (uint)BattlePower;
pk.Level = Level;
PkExpelTable.Update(killer.Owner, pk);
}
}
}
Network.PacketHandler.AddEnemy(this.Owner, killer.Owner);
}
if (killer.PKMode != MrHassan.Game.Enums.PKMode.Jiang)
{
if (killer.EntityFlag == MrHassan.Game.EntityFlag.Entity)
{
if (Kernel.Rate(50))
{
DropRandomStuff(Killer);
}
}
}
}
}
Over:
Network.GamePackets.Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
if (EntityFlag == EntityFlag.Entity)
{
AddFlag(Network.GamePackets.Update.Flags.Ghost);
AddFlag(Network.GamePackets.Update.Flags.Dead);
RemoveFlags();
SpiritFocus = false;
#region Aura
if (Aura_isActive)
{
RemoveFlag2(Aura_actType);
Owner.removeAuraBonuses(Aura_actType, Aura_actPower, 1);
Aura_isActive = false;
AuraTime = 0;
Aura_actType = 0;
Aura_actPower = 0;
}
#endregion
if (Body % 10 < 3)
TransformationID = 99;
else
TransformationID = 98;
Owner.SendScreen(attack, true);
Owner.Send(new MapStatus() { BaseID = Owner.Map.BaseID, ID = Owner.Map.ID, Status = Database.MapsTable.MapInformations[Owner.Map.ID].Status, Weather = Database.MapsTable.MapInformations[Owner.Map.ID].Weather });
Owner.EndQualifier();
}
else
{
if (!Companion && !IsDropped)
MonsterInfo.Drop(killer);
Kernel.Maps[MapID].Floor[X, Y, MapObjType, this] = true;
if (killer.EntityFlag == EntityFlag.Entity)
{
if (killer.OnKOSpell())
killer.KOSpellTime++;
else killer.Owner.XPCount++;
}
}
if (EntityFlag == EntityFlag.Entity)
{
if (OnDeath != null) OnDeath(this);
}
}
}
public bool GmHide;
public bool cantdie = false;
public void RemoveMagicDefender()
{
if (MagicDefenderOwner && HasMagicDefender)
{
if (Owner.Team != null && HasMagicDefender && MagicDefenderOwner)
{
foreach (var mate in Owner.Team.Teammates)
{
mate.Entity.HasMagicDefender = false;
mate.Entity.MagicDefenderSecs = 0;
mate.Entity.RemoveFlag3(MrHassan.Network.GamePackets.Update.Flags3.MagicDefender);
mate.Entity.Update(mate.Entity.StatusFlag, mate.Entity.StatusFlag2, mate.Entity.StatusFlag3, MrHassan.Network.GamePackets.Update.MagicDefenderIcone, 0x80, 0, 0, false);
}
}
MagicDefenderOwner = false;
}
RemoveFlag3(MrHassan.Network.GamePackets.Update.Flags3.MagicDefender);
Update(StatusFlag, StatusFlag2, StatusFlag3, MrHassan.Network.GamePackets.Update.MagicDefenderIcone, 0x80, 0, 0, false);
HasMagicDefender = false;
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اسكلة النينجا الى بتطلع من الارض عالية اوي فى الضرب | lofyCo | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-03-25 02:17 PM |
اسكلة النينجا اديك فى الارض تفحر عاوز اشوفلها حل | MRonlineGvrix | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-02-05 05:55 PM |
ازاي اخلي انبي الجيانغ يتحول من سوبر الي الي ابك في الجيانغ وا العكس | Hassan Emprator | تطوير سيرفرات كونكر | 2 | 2019-11-30 04:17 PM |
الاكونت بيموت الشادو كلون بتاعه | Tefa | تطوير سيرفرات كونكر | 2 | 2019-11-22 02:58 PM |
ThunderCould بتفضل ظاهره ع الارض مش بتختفي | uncelsam | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-10-30 01:16 AM |