|
case "bantime":
{
foreach (var Client in Program.Values)
{
if (Client.Account.State >= client.Account.State)
continue;
if (Client.Player.LoweredName.Contains(Data[1]))
{
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Client.Account.CopraState(Database.AccountTable.AccountState.Banned);
Client["banhours"] = Data[2].Cast<int>();
Client["banreason"] = message_.Substring(Data[0].Length + 1 + Data[1].Length + 1 + Data[2].Length + 1);
Client["banstamp"] = DateTime.Now;
Client.Disconnect();break;
}
}
break;
}
client.Variables = variables;
if (client["banhours"] == 0)
{
client["banhours"] = -1;
client["banreason"] = "Infinite time.";
client["banstamp"] = DateTime.Now.AddYears(100);
}
if (Account.State == Database.AccountTable.AccountState.Banned)
{
if (client["banhours"] != -1)
{
DateTime banStamp = client["banstamp"];
if (DateTime.Now > banStamp.AddDays(((int)client["banhours"]) / 24).AddHours(((int)client["banhours"]) % 24))
Account.State = Database.AccountTable.AccountState.Entity;
}
}
string Message = "";
if (Protection.SystemBannedAccount.IsBanned(client.Account.EntityID, out Message))
{
}
else if (Account.State == Database.AccountTable.AccountState.Banned)
{
DateTime banStamp = client["banstamp"];
banStamp = banStamp.AddHours(client["banhours"]);
Message = "You are banned for " + client["banhours"] + " hours [until " + banStamp.ToString("HH:mm MM/dd/yyyy") + "]. Reason: " + client["banreason"];
}
private void AutoAttackCallback(GameState client, int time)
}
private void AutoAttackCallback(GameState client, int time)
{
if (!Valid(client)) return;
Time32 Now = new Time32(time);
if (client.Entity.AttackPacket != null || client.Entity.VortexAttackStamp != null)
{
try
{
if (client.Entity.ContainsFlag((ulong)Update.Flags.ShurikenVortex))
{
if (client.Entity.VortexPacket != null && client.Entity.VortexPacket.ToArray() != null)
{
if (Now > client.Entity.VortexAttackStamp.AddMilliseconds(1400))
{
client.Entity.VortexAttackStamp = Now;
new Game.Attacking.Handle(client.Entity.VortexPacket, client.Entity, null);
}
}
}
else
{
client.Entity.VortexPacket = null;
var AttackPacket = client.Entity.AttackPacket;
if (AttackPacket != null && AttackPacket.ToArray() != null)
{
uint AttackType = AttackPacket.AttackType;
if (AttackType == Attack.Magic || AttackType == Attack.Melee || AttackType == Attack.Ranged)
{
if (AttackType == Attack.Magic)
{
if (Now > client.Entity.AttackStamp.AddSeconds(1))
{
if (AttackPacket.Damage != 12160 &&
AttackPacket.Damage != 12170 &&
AttackPacket.Damage != 12120 &&
AttackPacket.Damage != 12130 &&
AttackPacket.Damage != 12140 &&
AttackPacket.Damage != 12320 &&
AttackPacket.Damage != 12330 &&
AttackPacket.Damage != 12340 &&
AttackPacket.Damage != 12210)
new Game.Attacking.Handle(AttackPacket, client.Entity, null);
}
}
else
{
int decrease = -300;
if (client.Entity.OnCyclone())
decrease = 700;
if (client.Entity.OnSuperman())
decrease = 200;
if (Now > client.Entity.AttackStamp.AddMilliseconds((300 - client.Entity.Agility - decrease) * (int)(AttackType == Attack.Ranged ? 1 : 1)))
{
new Game.Attacking.Handle(AttackPacket, client.Entity, null);
}
}
}
}
}
}
catch (Exception e)
{
Program.SaveException(e);
client.Entity.AttackPacket = null;
client.Entity.VortexPacket = null;
}
}
}
private void AutoAttackCallback(GameState client, int time)
}
private void AutoAttackCallback(GameState client, int time)
{
if (!Valid(client)) return;
Time32 Now = new Time32(time);
if (client.Entity.AttackPacket != null || client.Entity.VortexAttackStamp != null)
{
try
{
if (client.Entity.ContainsFlag((ulong)Update.Flags.ShurikenVortex))
{
if (client.Entity.VortexPacket != null && client.Entity.VortexPacket.ToArray() != null)
{
if (Now > client.Entity.VortexAttackStamp.AddMilliseconds(1400))
{
client.Entity.VortexAttackStamp = Now;
new Game.Attacking.Handle(client.Entity.VortexPacket, client.Entity, null);
}
}
}
else
{
client.Entity.VortexPacket = null;
var AttackPacket = client.Entity.AttackPacket;
if (AttackPacket != null && AttackPacket.ToArray() != null)
{
uint AttackType = AttackPacket.AttackType;
if (AttackType == Attack.Magic || AttackType == Attack.Melee || AttackType == Attack.Ranged)
{
if (AttackType == Attack.Magic)
{
if (Now > client.Entity.AttackStamp.AddSeconds(1))
{
if (AttackPacket.Damage != 12160 &&
AttackPacket.Damage != 12170 &&
AttackPacket.Damage != 12120 &&
AttackPacket.Damage != 12130 &&
AttackPacket.Damage != 12140 &&
AttackPacket.Damage != 12320 &&
AttackPacket.Damage != 12330 &&
AttackPacket.Damage != 12340 &&
AttackPacket.Damage != 12210)
new Game.Attacking.Handle(AttackPacket, client.Entity, null);
}
}
else
{
int decrease = -300;
if (client.Entity.OnCyclone())
decrease = 700;
if (client.Entity.OnSuperman())
decrease = 200;
if (Now > client.Entity.AttackStamp.AddMilliseconds((300 - client.Entity.Agility - decrease) * (int)(AttackType == Attack.Ranged ? 1 : 1)))
{
new Game.Attacking.Handle(AttackPacket, client.Entity, null);
}
}
}
}
}
}
catch (Exception e)
{
Program.SaveException(e);
client.Entity.AttackPacket = null;
client.Entity.VortexPacket = null;
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
حل مشكله الضرب فى العموايد فى سورسي | SourceDanger | تطوير سيرفرات كونكر | 39 | 2024-09-02 09:55 PM |
حل مشكله اخلي الضرب متخلصش يجماعه | سمير | تطوير سيرفرات كونكر | 12 | 2024-08-13 01:26 PM |
حل مشكله الضرب التلقائى فى العمود | Users | تطوير سيرفرات كونكر | 5 | 2023-07-18 08:39 PM |
حاجه بخصوص الضرب التلقائي | محمد ياسر | تطوير سيرفرات كونكر | 9 | 2019-06-25 12:46 AM |
حل مشكله الضرب في بوابة الجيلد بارقام صغيره | محمد ياسر | تطوير سيرفرات كونكر | 2 | 2019-06-13 12:28 PM |