المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : الي عايز يعمل الوار كل يوم


ElSaher
2019-09-22, 12:13 PM
بسم الله و الصلاة و السلام علي رسول الله



يوم الجمعه


#region GuildWar Friday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Friday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Friday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Friday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion


يوم السبت


#region GuildWar Saturday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Saturday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Saturday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Saturday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion



يوم الحد



#region GuildWar Sunday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Sunday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9.00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Sunday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Sunday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion



يوم الاثنين


#region GuildWar Monday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Monday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Monday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Monday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion



الثلاثاء



#region GuildWar Tuesday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Tuesday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Tuesday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Tuesday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion




الاربع


#region GuildWar Wednesday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Friday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion



الخميس


#region GuildWar Thursday
if (!Game.GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Thursday && Now64.Hour == 19 && Now64.Minute >= 00)
{
Game.GuildWar.Start();
foreach (var client in Program.GamePool)
if (client.Player.GuildID != 0)
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
p => { p.Player.Teleport(1002, 224, 237); }, null, 20);
}
}
if (Game.GuildWar.IsWar)
{
if (Time32.Now > Game.GuildWar.ScoreSendStamp.AddSeconds(3))
{
Game.GuildWar.ScoreSendStamp = Time32.Now;
Game.GuildWar.SendScores();
}
if (Now64.DayOfWeek == DayOfWeek.Thursday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("GuildWar Has will closed 10 Minutes go all Pola and ready to finish",
System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.GamePool);
}
else if (GuildWar.IsWar)
{
if (Now64.DayOfWeek == DayOfWeek.Thursday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)
{
GuildWar.End();
}
}
}
#endregion



دا معمول كل يوم من 7ال9

طيب افرد انتا عايز تخليها اي وقت تاني اقولك ازاي يا صحبي



هتاقي الكود دا
if (Now64.DayOfWeek == DayOfWeek.Friday && Now64.Hour == 19 && Now64.Minute >= 00)
رقم 19
دا الوقت الي بيبدا فيه
الكود دا
client.MessageBox("GuildWar Has Started Now Will Finish 9:00 PM",
لو انات هتغير الوقت الي بيخلص فيه لازم تعدل علي رقم 9 دا

طيب اعدل علي الوقت الي بيخلص فيه ازاي
كود
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 21 && Now64.Minute == 50 && Now64.Second <= 2)
وا كود
if (Now64.DayOfWeek == DayOfWeek.Wednesday && Now64.Hour == 21 && Now64.Minute == 00 && Now64.Second == 00)

رقم 21دا الي بيخلص فيه


ياريت دعوه حلوه من القلب

Users
2019-09-22, 01:45 PM
هو مكرر بس عاااش استمر

ElSaher
2019-09-22, 01:51 PM
هو مكرر بس عاااش استمر

حبيبي

القديم مش بيقولك تكتب اي

Hassan Emprator
2019-09-22, 02:54 PM
عاش
بس انت ذكي اوي كنت تقدر تعدل في الكود بدل ما يسحب من الرمات بتاعت
الجهاز كل شويه بسرعه كدا
لا بدل العك دا
نضيف كدا

#region GuildWar
if (GuildWar.IsWar)
{
if (Time32.Now > GuildWar.ScoreSendStamp.AddSeconds(3))
{
GuildWar.ScoreSendStamp = Time32.Now;
GuildWar.SendScores();
}

}
if ((Now64.Hour >= 00 && Now64.Hour <= 21) && Now64.DayOfWeek == DayOfWeek.Sunday && Now64.DayOfWeek == DayOfWeek.Monday)
{
if (!GuildWar.IsWar)
{
GuildWar.Start();
foreach (Client.GameState client in Kernel.GamePool.Values)
{
if (client.Map.BaseID != 6001 && client.Map.BaseID != 6000 && !client.Entity.Dead)
{
EventAlert alert = new EventAlert
{
StrResID = 10515,
Countdown = 60,
UK12 = 1
};
client.Entity.StrResID = 10515;
client.Send(alert);
}
}
}
}
if (GuildWar.IsWar)
{
if (Now64.Hour == 22 && Now64.Second <= 00)
{
GuildWar.Flame10th = false;
GuildWar.End();
}
}
#endregion

الحكايه كلها انك بنضيف الكود دا كل وتكتب اليوم الجديد
&& Now64.DayOfWeek == DayOfWeek.Monday
بس

ElSaher
2019-09-22, 03:21 PM
عاش
بس انت ذكي اوي كنت تقدر تعدل في الكود بدل ما يسحب من الرمات بتاعت
الجهاز كل شويه بسرعه كدا
لا بدل العك دا
نضيف كدا

#region guildwar
if (guildwar.iswar)
{
if (time32.now > guildwar.scoresendstamp.addseconds(3))
{
guildwar.scoresendstamp = time32.now;
guildwar.sendscores();
}

}
if ((now64.hour >= 00 && now64.hour <= 21) && now64.dayofweek == dayofweek.sunday && now64.dayofweek == dayofweek.monday)
{
if (!guildwar.iswar)
{
guildwar.start();
foreach (client.gamestate client in kernel.gamepool.values)
{
if (client.map.baseid != 6001 && client.map.baseid != 6000 && !client.entity.dead)
{
eventalert alert = new eventalert
{
strresid = 10515,
countdown = 60,
uk12 = 1
};
client.entity.strresid = 10515;
client.send(alert);
}
}
}
}
if (guildwar.iswar)
{
if (now64.hour == 22 && now64.second <= 00)
{
guildwar.flame10th = false;
guildwar.end();
}
}
#endregion

الحكايه كلها انك بنضيف الكود دا كل وتكتب اليوم الجديد
&& now64.dayofweek == dayofweek.monday
بس

ملكشي دعوه احا مش صحاب دلوقتي

ahmedfathy
2019-09-23, 05:00 PM
وربنا هموت من الضحك يا رجاله عيب عليكم وربنا هتشيل الايام اصلآ هيشتغل تلقائي كل يوم عيب عليكم

هو انتم لسه بتتعلمه كونكر ولا هو شغل كوبي بست

ElSaher
2019-09-23, 05:09 PM
وربنا هموت من الضحك يا رجاله عيب عليكم وربنا هتشيل الايام اصلآ هيشتغل تلقائي كل يوم عيب عليكم

هو انتم لسه بتتعلمه كونكر ولا هو شغل كوبي بست

انتا يلا يا بارد انتا مالك انتا لزعلك :1eye::1eye::1eye::1eye:

بتحشر نفسك لي انا عملها كدا علشان الي مش يعرفها

mohamedomar
2020-02-04, 05:33 PM
طيب لو عاوز اخليها كل يوم☺

TarekMando
2020-02-04, 07:20 PM
وربنا هموت من الضحك يا رجاله عيب عليكم وربنا هتشيل الايام اصلآ هيشتغل تلقائي كل يوم عيب عليكم

هو انتم لسه بتتعلمه كونكر ولا هو شغل كوبي بست

عاش شوفت كومنت لي واحد بيفهم اهو

TarekMando
2020-02-04, 07:23 PM
الله ينور عليك بس معلش انا اسف انت كانت ممكن تلخص الكود ده بي وقت وي خلاص اصل السورسات الي الناس شغالين بيها مش نقصه السحب يزيد اكتر اكيد انت فاهم قصدي ع العموم بالتوفيق