|
|
المشاركات 1,940 |
+التقييم 0.95 |
تاريخ التسجيل Apr 2019 |
الاقامة https://www.facebook.com/daany |
نظام التشغيل |
رقم العضوية 1 |
Mwa8ytAlslah.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ElbooshyProject.Client;
using ElbooshyProject.Database;
namespace ElbooshyProject.Game
{
class Mwa8ytAlslah
{
public static uint SlaatAlfgrHour = 0;
public static uint SlaatAlfgrMinute = 0;
public static uint SlaatAlzhrHour = 0;
public static uint SlaatAlzhrMinute = 0;
public static uint SlaatAl3srHour = 0;
public static uint SlaatAl3srMinute = 0;
public static uint SlaatAlmghrbHour = 0;
public static uint SlaatAlmghrbMinute = 0;
public static uint SlaatAl3shaHour = 0;
public static uint SlaatAl3shaMinute = 0;
public static DateTime LastSlah;
public static uint WaitingSlah;
public static bool SlahNow = false;
public static uint TimeHour(byte Hour)
{
byte hour = 0;
if (Hour == 1) hour = 13;
else if (Hour == 2) hour = 14;
else if (Hour == 3) hour = 15;
else if (Hour == 4) hour = 16;
else if (Hour == 5) hour = 17;
else if (Hour == 6) hour = 18;
else if (Hour == 7) hour = 19;
else if (Hour == 8) hour = 20;
else if (Hour == 9) hour = 21;
else if (Hour == 10) hour = 22;
else hour = Hour;
return hour;
}
public static void LoadMwa8ytAlslah()
{
DateTime Date = DateTime.Now;
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
cmd.Select("Mwa8ytAlslah").Where("Month", Date.Month);
MySqlReader r = new MySqlReader(cmd);
while (r.Read())
{
if (r.ReadString("Day") == Date.Day.ToString())
{
#region Alfgr
{
string Alfgr = "";
Alfgr = r.ReadString("Alfgr");
string[] Alfgrs = Alfgr.Split(':');
SlaatAlfgrHour = Convert.ToByte(Alfgrs[0]);
SlaatAlfgrMinute = Convert.ToByte(Alfgrs[1]);
}
#endregion
#region Alzhr
{
string Alzhr = "";
Alzhr = r.ReadString("Alzhr");
string[] Alzhrs = Alzhr.Split(':');
SlaatAlzhrHour = TimeHour(Convert.ToByte(Alzhrs[0]));
SlaatAlzhrMinute = Convert.ToByte(Alzhrs[1]);
}
#endregion
#region Al3sr
{
string Al3sr = "";
Al3sr = r.ReadString("Al3sr");
string[] Al3srs = Al3sr.Split(':');
SlaatAl3srHour = TimeHour(Convert.ToByte(Al3srs[0]));
SlaatAl3srMinute = Convert.ToByte(Al3srs[1]);
}
#endregion
#region Almghrb
{
string Almghrb = "";
Almghrb = r.ReadString("Almghrb");
string[] Almghrbs = Almghrb.Split(':');
SlaatAlmghrbHour = TimeHour(Convert.ToByte(Almghrbs[0]));
SlaatAlmghrbMinute = Convert.ToByte(Almghrbs[1]);
}
#endregion
#region Al3sha
{
string Al3sha = "";
Al3sha = r.ReadString("Al3sha");
string[] Al3shas = Al3sha.Split(':');
SlaatAl3shaHour = TimeHour(Convert.ToByte(Al3shas[0]));
SlaatAl3shaMinute = Convert.ToByte(Al3shas[1]);
}
#endregion
}
r.Close();
r.Dispose();
}
Console.WriteLine("Mwa8ytAlslah Loaded.");
}
public static void Mwa8ytAlslahh(GameState client)
{
if (SlahNow)
{
client.Disconnect();
}
}
public static void ShutDownLSlah()
{
#region Mwa8ytAlslah
if (DateTime.Now.Hour == Mwa8ytAlslah.SlaatAlfgrHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAlfgrMinute ||
DateTime.Now.Hour == Mwa8ytAlslah.SlaatAlzhrHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAlzhrMinute ||
DateTime.Now.Hour == Mwa8ytAlslah.SlaatAl3srHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAl3srMinute ||
DateTime.Now.Hour == Mwa8ytAlslah.SlaatAlmghrbHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAlmghrbMinute ||
DateTime.Now.Hour == Mwa8ytAlslah.SlaatAl3shaHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAl3shaMinute)
{
if (!SlahNow)
{
if (DateTime.Now.DayOfWeek == DayOfWeek.Friday && DateTime.Now.Hour == Mwa8ytAlslah.SlaatAlzhrHour && DateTime.Now.Minute == Mwa8ytAlslah.SlaatAlzhrMinute)
WaitingSlah = 30;
else
WaitingSlah = 15;
LastSlah = DateTime.Now;
SlahNow = true;
}
}
if (DateTime.Now > LastSlah.AddMinutes(WaitingSlah))
{
if (SlahNow) SlahNow = false;
}
if (DateTime.Now.Hour == 01 && DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
LoadMwa8ytAlslah();
#endregion
}
}
}
Database.ArenaTable.Load();
Game.Mwa8ytAlslah.LoadMwa8ytAlslah();
DoLogin(client);
if (Game.Mwa8ytAlslah.SlahNow)//Mwa8ytAlslah
{
client.Send(new Message("all3bh m'3l8h lada2 alslah 7awol ald5wol fyw8t la78", "ALLUSERS", System.Drawing.Color.Orange, GamePackets.Message.Dialog));
return;
}
Game.Qualifier.Reset();
Game.Mwa8ytAlslah.ShutDownLSlah();
if (client.Entity.HandleTiming)
#region Mwa8ytAlslah
Game.Mwa8ytAlslah.Mwa8ytAlslahh(client);
#endregion
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
صفحة تسجيل كونكر البوشي | Tefa | صفحات التسجيل كونكر اونلاين | 112 | 2024-10-31 11:33 PM |
متجر شحن البوشي v2 | محمد ياسر | تطوير سيرفرات كونكر | 32 | 2023-07-09 03:06 PM |
متجر شحن ذي البوشي | محمد ياسر | تطوير سيرفرات كونكر | 38 | 2023-07-09 03:04 PM |
كود مواقيت الصلاة علي حسب دولتك مع خصيه الأذان صوتاً | Mawdo3jded | قسم تطوير المواقع | 2 | 2020-04-26 11:45 PM |
تكميل موضوع استاز حازم متجر شوب البوشي | MohamedModyAdel | تطوير سيرفرات كونكر | 4 | 2019-08-03 05:43 PM |