ElSaher
2020-02-19, 10:11 AM
عايز اخلي الاليت كل يوم الساعه 7
#region ElitePK Tournament
if (Now64.Hour == ElitePK.EventTime && Now64.Minute >= 55 && !ElitePKTournament.TimersRegistered)
{
ElitePKTournament.RegisterTimers();
MsgPKEliteMatchInfo brackets = new MsgPKEliteMatchInfo(true, 0);
brackets.Type = MsgPKEliteMatchInfo.EPK_State;
brackets.OnGoing = true;
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedElitePk = false;
}
Player.name = new object[] { "ElitePK Tournament Has Start To SignUp Go To ElitePKEnvoy in TwinCity!?" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[ElitePK Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10533,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10533;
client.Send(alert.ToArray());
}
#region RemoveTopElite
var EliteChampion = MsgTitle.Titles.ElitePKChamption_High;
var EliteSecond = MsgTitle.Titles.ElitePK2ndPlace_High;
var EliteThird = MsgTitle.Titles.ElitePK3ndPlace_High;
var EliteEightChampion = MsgTitle.Titles.ElitePKChamption_Low;
var EliteEightSecond = MsgTitle.Titles.ElitePK2ndPlace_Low;
var EliteEightThird = MsgTitle.Titles.ElitePK3ndPlace_Low;
var EliteEight = MsgTitle.Titles.ElitePKTopEight_Low;
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKChamption_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKChamption_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK2ndPlace_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK2ndPlace_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK3ndPlace_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK3ndPlace_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKTopEight_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKTopEight_Low);
if (client.Player.Titles.ContainsKey(EliteChampion))
client.Player.RemoveTopStatus((ulong)EliteChampion );
if (client.Player.Titles.ContainsKey(EliteSecond))
client.Player.RemoveTopStatus((ulong)EliteSecond);
if (client.Player.Titles.ContainsKey(EliteThird))
client.Player.RemoveTopStatus((ulong)EliteThird);
if (client.Player.Titles.ContainsKey(EliteEightChampi on))
client.Player.RemoveTopStatus((ulong)EliteEightCha mpion);
if (client.Player.Titles.ContainsKey(EliteEightSecond ))
client.Player.RemoveTopStatus((ulong)EliteEightSec ond);
if (client.Player.Titles.ContainsKey(EliteEightThird) )
client.Player.RemoveTopStatus((ulong)EliteEightThi rd);
if (client.Player.Titles.ContainsKey(EliteEight))
client.Player.RemoveTopStatus((ulong)EliteEight);
#endregion
}
}
if (Now64.Hour >= ElitePK.EventTime + 1 && ElitePKTournament.TimersRegistered)
{
bool done = true;
foreach (var epk in ElitePKTournament.Tournaments)
if (epk.Players.Count != 0)
done = false;
if (done)
{
ElitePKTournament.TimersRegistered = false;
MsgPKEliteMatchInfo brackets = new MsgPKEliteMatchInfo(true, 0);
brackets.Type = MsgPKEliteMatchInfo.EPK_State;
brackets.OnGoing = false;
foreach (var client in Server.GamePool)
client.Send(brackets);
}
}
#endregion
وا التيم بكيه الساعه 5
#region TeamPk Tournament
if (Now64.DayOfWeek == DayOfWeek.Saturday && Now64.Hour == 18 && Now64.Minute == 55 && Now64.Second <= 0)
{
TeamElitePk.TeamTournament.Open();
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedTeamPK = false;
}
Player.name = new object[] { "TeamPk Tournament has started to signup go to TC TeamPkManager in TwinCity!" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[TeamPk Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10543,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10543;
client.Send(alert.ToArray());
}
}
}
#endregion
وا الاسكل الساعه 9
#region SkillTeamPk Tournament
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 19 && Now64.Minute == 45 && Now64.Second <= 0)
{
TeamElitePk.SkillTeamTournament.Open();
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedSTeamPK = false;
}
Player.name = new object[] { "SkillTeamPk Tournament has started to signup go to TC SkillTeamPkManager in TwinCity!" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[SkillTeamPk Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10541,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10541;
client.Send(alert.ToArray());
}
}
}
#endregion
#region ElitePK Tournament
if (Now64.Hour == ElitePK.EventTime && Now64.Minute >= 55 && !ElitePKTournament.TimersRegistered)
{
ElitePKTournament.RegisterTimers();
MsgPKEliteMatchInfo brackets = new MsgPKEliteMatchInfo(true, 0);
brackets.Type = MsgPKEliteMatchInfo.EPK_State;
brackets.OnGoing = true;
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedElitePk = false;
}
Player.name = new object[] { "ElitePK Tournament Has Start To SignUp Go To ElitePKEnvoy in TwinCity!?" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[ElitePK Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10533,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10533;
client.Send(alert.ToArray());
}
#region RemoveTopElite
var EliteChampion = MsgTitle.Titles.ElitePKChamption_High;
var EliteSecond = MsgTitle.Titles.ElitePK2ndPlace_High;
var EliteThird = MsgTitle.Titles.ElitePK3ndPlace_High;
var EliteEightChampion = MsgTitle.Titles.ElitePKChamption_Low;
var EliteEightSecond = MsgTitle.Titles.ElitePK2ndPlace_Low;
var EliteEightThird = MsgTitle.Titles.ElitePK3ndPlace_Low;
var EliteEight = MsgTitle.Titles.ElitePKTopEight_Low;
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKChamption_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKChamption_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK2ndPlace_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK2ndPlace_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK3ndPlace_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePK3ndPlace_Low);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKTopEight_High);
client.Player.RemoveTopStatus((ulong)Network.GameP ackets.MsgTitle.Titles.ElitePKTopEight_Low);
if (client.Player.Titles.ContainsKey(EliteChampion))
client.Player.RemoveTopStatus((ulong)EliteChampion );
if (client.Player.Titles.ContainsKey(EliteSecond))
client.Player.RemoveTopStatus((ulong)EliteSecond);
if (client.Player.Titles.ContainsKey(EliteThird))
client.Player.RemoveTopStatus((ulong)EliteThird);
if (client.Player.Titles.ContainsKey(EliteEightChampi on))
client.Player.RemoveTopStatus((ulong)EliteEightCha mpion);
if (client.Player.Titles.ContainsKey(EliteEightSecond ))
client.Player.RemoveTopStatus((ulong)EliteEightSec ond);
if (client.Player.Titles.ContainsKey(EliteEightThird) )
client.Player.RemoveTopStatus((ulong)EliteEightThi rd);
if (client.Player.Titles.ContainsKey(EliteEight))
client.Player.RemoveTopStatus((ulong)EliteEight);
#endregion
}
}
if (Now64.Hour >= ElitePK.EventTime + 1 && ElitePKTournament.TimersRegistered)
{
bool done = true;
foreach (var epk in ElitePKTournament.Tournaments)
if (epk.Players.Count != 0)
done = false;
if (done)
{
ElitePKTournament.TimersRegistered = false;
MsgPKEliteMatchInfo brackets = new MsgPKEliteMatchInfo(true, 0);
brackets.Type = MsgPKEliteMatchInfo.EPK_State;
brackets.OnGoing = false;
foreach (var client in Server.GamePool)
client.Send(brackets);
}
}
#endregion
وا التيم بكيه الساعه 5
#region TeamPk Tournament
if (Now64.DayOfWeek == DayOfWeek.Saturday && Now64.Hour == 18 && Now64.Minute == 55 && Now64.Second <= 0)
{
TeamElitePk.TeamTournament.Open();
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedTeamPK = false;
}
Player.name = new object[] { "TeamPk Tournament has started to signup go to TC TeamPkManager in TwinCity!" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[TeamPk Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10543,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10543;
client.Send(alert.ToArray());
}
}
}
#endregion
وا الاسكل الساعه 9
#region SkillTeamPk Tournament
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 19 && Now64.Minute == 45 && Now64.Second <= 0)
{
TeamElitePk.SkillTeamTournament.Open();
foreach (Client.GameState clients in Kernel.GamePool.Values)
{
clients.Player.ClaimedSTeamPK = false;
}
Player.name = new object[] { "SkillTeamPk Tournament has started to signup go to TC SkillTeamPkManager in TwinCity!" };
Kernel.SendWorldMessage(new MsgTalk(string.Concat(Player.name), "ALLUSERS", "[SkillTeamPk Tournament]", Color.Red, 2500), Server.GamePool);
foreach (var client in Server.GamePool)
{
if (!client.InQualifier() && client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Player.Dead)
{
MsgInviteTrans alert = new MsgInviteTrans
{
InviteID = 10541,
Countdown = 60,
Action = 1
};
client.Player.InviteID = 10541;
client.Send(alert.ToArray());
}
}
}
#endregion