AMREL3FREIT
2019-07-10, 07:26 PM
اسلام عليكم ورحمه الله وبركاته
الموضوع باين م عنوانه وكمان لو معاك لودر حمايه
فيه برامج بتنزل يوم عن يوم ف هتواجه الثغره دي
نخش ف المهم علطول .. :)
اول شئ نخش على كلاس
GameClient او GameState على حسب سورسك
نبحث عن void LoadItemStats
نضيف
#region Check By DofaEid
#region RidingCrop
ConquerItem David11 = new ConquerItem(true);
David11 = Equipment.TryGetItem(ConquerItem.Fan);
if ((David11 != null && David11.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Fan));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RidingCrop
ConquerItem David10 = new ConquerItem(true);
David10 = Equipment.TryGetItem(ConquerItem.Tower);
if ((David10 != null && David10.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Tower));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RidingCrop
ConquerItem David = new ConquerItem(true);
David = Equipment.TryGetItem(ConquerItem.SteedCrop);
if ((David != null && David.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.SteedCrop));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region SteedWing
ConquerItem David1 = new ConquerItem(true);
David1 = Equipment.TryGetItem(ConquerItem.Wing);
if ((David1 != null && David1.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Wing));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Ring
ConquerItem David2 = new ConquerItem(true);
David2 = Equipment.TryGetItem(ConquerItem.Ring);
if ((David2 != null && David2.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Ring));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Necklace
ConquerItem David3 = new ConquerItem(true);
David3 = Equipment.TryGetItem(ConquerItem.Necklace);
if ((David3 != null && David3.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Necklace));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RightWeapon
ConquerItem David4 = new ConquerItem(true);
David4 = Equipment.TryGetItem(ConquerItem.RightWeapon);
if ((David4 != null && David4.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.RightWeapon));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Boots
ConquerItem David5 = new ConquerItem(true);
David5 = Equipment.TryGetItem(ConquerItem.Boots);
if ((David5 != null && David5.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Boots));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Head
ConquerItem David6 = new ConquerItem(true);
David6 = Equipment.TryGetItem(ConquerItem.Head);
if ((David6 != null && David6.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Head));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Armor
ConquerItem David7 = new ConquerItem(true);
David7 = Equipment.TryGetItem(ConquerItem.Armor);
if ((David7 != null && David7.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Armor));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region LeftWeapon
ConquerItem David8 = new ConquerItem(true);
David8 = Equipment.TryGetItem(ConquerItem.LeftWeapon);
if ((David8 != null && David8.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.LeftWeapon));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Anti AccessoryS Hack [ Socket - Perfection ]
#region hack LeftWeaponAccessory -PerfectionLevel
ConquerItem Ahmed = new ConquerItem(true);
Ahmed = Equipment.TryGetItem(ConquerItem.LeftWeaponAccesso ry);
if ((Ahmed != null && Ahmed.PerfectionLevel >= 1))
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack LeftWeaponAccessory!");
Disconnect();
}
#endregion
#region hack LeftWeaponAccessory Ban by DesCo - Socket
ConquerItem Desco0 = new ConquerItem(true);
Desco0 = Equipment.TryGetItem(ConquerItem.LeftWeaponAccesso ry);
if (Desco0 != null && Desco0.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack LeftWeaponAccessory! Socket");
Disconnect();
}
#endregion
#region hack RightWeaponAccessory -PerfectionLevel
ConquerItem AhmedDesCo = new ConquerItem(true);
AhmedDesCo = Equipment.TryGetItem(ConquerItem.RightWeaponAccess ory);
if ((AhmedDesCo != null && AhmedDesCo.PerfectionLevel >= 1))
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack RightWeaponAccessory!");
Disconnect();
}
#endregion
#region hack RightWeaponAccessory Ban by DesCo - Socket
ConquerItem Desco0s = new ConquerItem(true);
Desco0s = Equipment.TryGetItem(ConquerItem.RightWeaponAccess ory);
if (Desco0s != null && Desco0s.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack RightWeaponAccessory! Socket");
Disconnect();
}
#endregion
#region hack SteedArmor Ban by DesCo - Socket
ConquerItem Desco0a = new ConquerItem(true);
Desco0a = Equipment.TryGetItem(ConquerItem.SteedArmor);
if (Desco0a != null && Desco0a.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack SteedArmor! Socket");
Disconnect();
}
#endregion
#endregion
#endregion
فى نفس الكلاس نبحث عن foreach (ConquerItem i in Equipment.Objects)
نضيف تحت
if (!AreStatsLoadable(i)) continue;
#region AntiHackEquipment
#region AntiDamage & Enchant
if (Equipments.Contains(i.Position))
{
if (i.Bless > 7)
{
i.Bless = 7;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
}
if (Steed.Contains(i.Position))
{
if (i.Bless > 0)
{
i.Bless = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
if (i.SocketOne != Enums.Gem.NoSocket && i.SocketTwo != Enums.Gem.NoSocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
}
if (Talisman.Contains(i.Position))
{
if (i.Bless > 1)
{
i.Bless = 1;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
}
#endregion
#region Talisman
#region RidingCrop
if (i.Position == 18) // RidingCrop
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.NoSocket && i.SocketTwo != Enums.Gem.NoSocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region Wing
if (i.Position == 19)// Wing
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalThunderGem &&
i.SocketOne != Enums.Gem.RefinedThunderGem &&
i.SocketOne != Enums.Gem.SuperThunderGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalGloryGem &&
i.SocketTwo != Enums.Gem.RefinedGloryGem &&
i.SocketTwo != Enums.Gem.SuperGloryGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region Tower
if (i.Position == 11)// Tower
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalGloryGem &&
i.SocketOne != Enums.Gem.RefinedGloryGem &&
i.SocketOne != Enums.Gem.SuperGloryGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalGloryGem &&
i.SocketTwo != Enums.Gem.RefinedGloryGem &&
i.SocketTwo != Enums.Gem.SuperGloryGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region HeavenFan
if (i.Position == 12)// HeavenFan
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalThunderGem &&
i.SocketOne != Enums.Gem.RefinedThunderGem &&
i.SocketOne != Enums.Gem.SuperThunderGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalThunderGem &&
i.SocketTwo != Enums.Gem.RefinedThunderGem &&
i.SocketTwo != Enums.Gem.SuperThunderGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#endregion
#region Accessory
if (Accessory.Contains(i.Position))
{
#region AntiPerfection
if (i.PerfectionLevel > 0)
{
i.PerfectionLevel = 0;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdatePerfection(i);
}
#endregion
#region AntiPlus
if (i.Plus > 0)
{
i.Plus = 0;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdatePlus(i);
}
#endregion
#region AntiBless
if (i.Bless > 1)
{
i.Bless = 1;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
#endregion
#region AntiEnchant
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
#endregion
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket && i.SocketTwo != Enums.Gem.EmptySocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateStack(i);
}
#endregion
}
#endregion
#endregion
ثاني حاجه نخش على Program
ونبحث عن
public static void AddDropLog(String Name, ConquerItem Item)
public static void CheckDamgae(String Name, ConquerItem Item)
{
String folderN = DateTime.Now.Year + "-" + DateTime.Now.Month,
Path = "database\\gmlogs\\DofaEid\\",
NewPath = System.IO.Path.Combine(Path, folderN);
if (!File.Exists(NewPath + folderN))
{
System.IO.Directory.CreateDirectory(System.IO.Path .Combine(Path, folderN));
}
string path = NewPath + "\\" + DateTime.Now.Day + ".txt";
if (!File.Exists(path)) File.AppendAllText(path, "");
string text = "------------------------------------------------------------------------------------"
+ Environment.NewLine + string.Format("(" + DateTime.Now + " ) \r\n Player {0} HAS Bannd For Hack by DofaEid AN ITEM : {1} -", Name, Item.ToLogDofa())
+ Environment.NewLine + "------------------------------------------------------------------------------------";
File.AppendAllText(path, text);
}
تمام وبعدين هنروح على كلاس ConquerItem.cs
نبحث عن
public override string ToString()
نضيف فوقيها
public string ToLogDofa()
{
return "UID: " + UID.ToString() + " | "
+ "ID: " + ID.ToString() + " | "
+ "Bless: " + Bless.ToString()
;
}
شايفين كلمه scripthazem
هنغيرها بـ اسم البورجكتـ بتاعكـ
هشوف وشكم بخير . :emoji9:
الموضوع باين م عنوانه وكمان لو معاك لودر حمايه
فيه برامج بتنزل يوم عن يوم ف هتواجه الثغره دي
نخش ف المهم علطول .. :)
اول شئ نخش على كلاس
GameClient او GameState على حسب سورسك
نبحث عن void LoadItemStats
نضيف
#region Check By DofaEid
#region RidingCrop
ConquerItem David11 = new ConquerItem(true);
David11 = Equipment.TryGetItem(ConquerItem.Fan);
if ((David11 != null && David11.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Fan));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RidingCrop
ConquerItem David10 = new ConquerItem(true);
David10 = Equipment.TryGetItem(ConquerItem.Tower);
if ((David10 != null && David10.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Tower));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RidingCrop
ConquerItem David = new ConquerItem(true);
David = Equipment.TryGetItem(ConquerItem.SteedCrop);
if ((David != null && David.Bless >= 2))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.SteedCrop));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region SteedWing
ConquerItem David1 = new ConquerItem(true);
David1 = Equipment.TryGetItem(ConquerItem.Wing);
if ((David1 != null && David1.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Wing));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Ring
ConquerItem David2 = new ConquerItem(true);
David2 = Equipment.TryGetItem(ConquerItem.Ring);
if ((David2 != null && David2.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Ring));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Necklace
ConquerItem David3 = new ConquerItem(true);
David3 = Equipment.TryGetItem(ConquerItem.Necklace);
if ((David3 != null && David3.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Necklace));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region RightWeapon
ConquerItem David4 = new ConquerItem(true);
David4 = Equipment.TryGetItem(ConquerItem.RightWeapon);
if ((David4 != null && David4.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.RightWeapon));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Boots
ConquerItem David5 = new ConquerItem(true);
David5 = Equipment.TryGetItem(ConquerItem.Boots);
if ((David5 != null && David5.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Boots));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Head
ConquerItem David6 = new ConquerItem(true);
David6 = Equipment.TryGetItem(ConquerItem.Head);
if ((David6 != null && David6.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Head));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Armor
ConquerItem David7 = new ConquerItem(true);
David7 = Equipment.TryGetItem(ConquerItem.Armor);
if ((David7 != null && David7.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.Armor));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region LeftWeapon
ConquerItem David8 = new ConquerItem(true);
David8 = Equipment.TryGetItem(ConquerItem.LeftWeapon);
if ((David8 != null && David8.Bless >= 8))
{
Program.CheckDamgae(Entity.Name, Equipment.TryGetItem(ConquerItem.LeftWeapon));
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
scripthazem.Database.EntityTable.SaveEntity(this);
Disconnect();
}
#endregion
#region Anti AccessoryS Hack [ Socket - Perfection ]
#region hack LeftWeaponAccessory -PerfectionLevel
ConquerItem Ahmed = new ConquerItem(true);
Ahmed = Equipment.TryGetItem(ConquerItem.LeftWeaponAccesso ry);
if ((Ahmed != null && Ahmed.PerfectionLevel >= 1))
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack LeftWeaponAccessory!");
Disconnect();
}
#endregion
#region hack LeftWeaponAccessory Ban by DesCo - Socket
ConquerItem Desco0 = new ConquerItem(true);
Desco0 = Equipment.TryGetItem(ConquerItem.LeftWeaponAccesso ry);
if (Desco0 != null && Desco0.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack LeftWeaponAccessory! Socket");
Disconnect();
}
#endregion
#region hack RightWeaponAccessory -PerfectionLevel
ConquerItem AhmedDesCo = new ConquerItem(true);
AhmedDesCo = Equipment.TryGetItem(ConquerItem.RightWeaponAccess ory);
if ((AhmedDesCo != null && AhmedDesCo.PerfectionLevel >= 1))
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack RightWeaponAccessory!");
Disconnect();
}
#endregion
#region hack RightWeaponAccessory Ban by DesCo - Socket
ConquerItem Desco0s = new ConquerItem(true);
Desco0s = Equipment.TryGetItem(ConquerItem.RightWeaponAccess ory);
if (Desco0s != null && Desco0s.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack RightWeaponAccessory! Socket");
Disconnect();
}
#endregion
#region hack SteedArmor Ban by DesCo - Socket
ConquerItem Desco0a = new ConquerItem(true);
Desco0a = Equipment.TryGetItem(ConquerItem.SteedArmor);
if (Desco0a != null && Desco0a.SocketOne != Game.Enums.Gem.NoSocket)
{
Account.State = Database.AccountTable.AccountState.Banned;
Account.SaveState();
Send(new Message("" + Entity.Name + " Is Use Hack To Make Damage And HP ThAN Normal Damage And Get Banned !! Don't Use Hack Like Them !! .", Color.Red, Message.System));
scripthazem.Database.EntityTable.SaveEntity(this);
Console.WriteLine("" + Entity.Name + " Hack SteedArmor! Socket");
Disconnect();
}
#endregion
#endregion
#endregion
فى نفس الكلاس نبحث عن foreach (ConquerItem i in Equipment.Objects)
نضيف تحت
if (!AreStatsLoadable(i)) continue;
#region AntiHackEquipment
#region AntiDamage & Enchant
if (Equipments.Contains(i.Position))
{
if (i.Bless > 7)
{
i.Bless = 7;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
}
if (Steed.Contains(i.Position))
{
if (i.Bless > 0)
{
i.Bless = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
if (i.SocketOne != Enums.Gem.NoSocket && i.SocketTwo != Enums.Gem.NoSocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
}
if (Talisman.Contains(i.Position))
{
if (i.Bless > 1)
{
i.Bless = 1;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
}
#endregion
#region Talisman
#region RidingCrop
if (i.Position == 18) // RidingCrop
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.NoSocket && i.SocketTwo != Enums.Gem.NoSocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region Wing
if (i.Position == 19)// Wing
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalThunderGem &&
i.SocketOne != Enums.Gem.RefinedThunderGem &&
i.SocketOne != Enums.Gem.SuperThunderGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalGloryGem &&
i.SocketTwo != Enums.Gem.RefinedGloryGem &&
i.SocketTwo != Enums.Gem.SuperGloryGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region Tower
if (i.Position == 11)// Tower
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalGloryGem &&
i.SocketOne != Enums.Gem.RefinedGloryGem &&
i.SocketOne != Enums.Gem.SuperGloryGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalGloryGem &&
i.SocketTwo != Enums.Gem.RefinedGloryGem &&
i.SocketTwo != Enums.Gem.SuperGloryGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#region HeavenFan
if (i.Position == 12)// HeavenFan
{
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket &&
i.SocketOne != Enums.Gem.NormalThunderGem &&
i.SocketOne != Enums.Gem.RefinedThunderGem &&
i.SocketOne != Enums.Gem.SuperThunderGem &&
i.SocketTwo != Enums.Gem.EmptySocket &&
i.SocketTwo != Enums.Gem.NormalThunderGem &&
i.SocketTwo != Enums.Gem.RefinedThunderGem &&
i.SocketTwo != Enums.Gem.SuperThunderGem)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateSockets(i);
}
#endregion
}
#endregion
#endregion
#region Accessory
if (Accessory.Contains(i.Position))
{
#region AntiPerfection
if (i.PerfectionLevel > 0)
{
i.PerfectionLevel = 0;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdatePerfection(i);
}
#endregion
#region AntiPlus
if (i.Plus > 0)
{
i.Plus = 0;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdatePlus(i);
}
#endregion
#region AntiBless
if (i.Bless > 1)
{
i.Bless = 1;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateBless(i);
}
#endregion
#region AntiEnchant
if (i.Enchant > 0)
{
i.Enchant = 0;
i.Mode = Game.Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateEnchant(i);
}
#endregion
#region AntiSocket
if (i.SocketOne != Enums.Gem.EmptySocket && i.SocketTwo != Enums.Gem.EmptySocket)
{
i.SocketOne = Enums.Gem.NoSocket;
i.SocketTwo = Enums.Gem.NoSocket;
i.Mode = Enums.ItemMode.Update;
i.Send(this);
ConquerItemTable.UpdateStack(i);
}
#endregion
}
#endregion
#endregion
ثاني حاجه نخش على Program
ونبحث عن
public static void AddDropLog(String Name, ConquerItem Item)
public static void CheckDamgae(String Name, ConquerItem Item)
{
String folderN = DateTime.Now.Year + "-" + DateTime.Now.Month,
Path = "database\\gmlogs\\DofaEid\\",
NewPath = System.IO.Path.Combine(Path, folderN);
if (!File.Exists(NewPath + folderN))
{
System.IO.Directory.CreateDirectory(System.IO.Path .Combine(Path, folderN));
}
string path = NewPath + "\\" + DateTime.Now.Day + ".txt";
if (!File.Exists(path)) File.AppendAllText(path, "");
string text = "------------------------------------------------------------------------------------"
+ Environment.NewLine + string.Format("(" + DateTime.Now + " ) \r\n Player {0} HAS Bannd For Hack by DofaEid AN ITEM : {1} -", Name, Item.ToLogDofa())
+ Environment.NewLine + "------------------------------------------------------------------------------------";
File.AppendAllText(path, text);
}
تمام وبعدين هنروح على كلاس ConquerItem.cs
نبحث عن
public override string ToString()
نضيف فوقيها
public string ToLogDofa()
{
return "UID: " + UID.ToString() + " | "
+ "ID: " + ID.ToString() + " | "
+ "Bless: " + Bless.ToString()
;
}
شايفين كلمه scripthazem
هنغيرها بـ اسم البورجكتـ بتاعكـ
هشوف وشكم بخير . :emoji9: