|
|
المشاركات 1,940 |
+التقييم 0.95 |
تاريخ التسجيل Apr 2019 |
الاقامة https://www.facebook.com/daany |
نظام التشغيل |
رقم العضوية 1 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XMeGo.Network.GamePackets;
using XMeGo.Game.ConquerStructures.Society;
namespace XMeGo.Game
{
public class HellQuests
{
public static SobNpcSpawn Poles;
public static SafeDictionary<uint, Guild> Scores = new SafeDictionary<uint, Guild>(100);
public static bool IsWar = false, Flame10th = false, FirstRound = false;
public static Time32 ScoreSendStamp, LastWin;
public static Guild PoleKeeper, CurrentTopLeader;
private static bool changed = false;
private static string[] scoreMessages;
public static DateTime StartTime;
public static bool Claim
{
get { return Program.Vars["egwclaim"]; }
set { Program.Vars["egwclaim"] = value; }
}
public static uint KeeperID
{
get { return Program.Vars["egwkeeperid"]; }
set { Program.Vars["egwkeeperid"] = value; }
}
public static void HellQuestsGwint()
{
if (!Kernel.Maps.ContainsKey(2022) && !Database.DMaps.LoadMap(2022))
new Map(2022, Database.DMaps.MapPaths[2022]);
var Map = Kernel.Maps[2022];
Poles = (SobNpcSpawn)Map.Npcs[825];
}
public static void Start()
{
if (Poles == null) return;
Claim = false;
Scores = new SafeDictionary<uint, Guild>(100);
StartTime = DateTime.Now;
Kernel.SendWorldMessage(new Message("Hell Quests war has began!", System.Drawing.Color.Red, Message.Center), Program.Values);
FirstRound = true;
foreach (Guild guild in Kernel.Guilds.Values)
{
guild.EWarScore = 0;
}
IsWar = true;
}
public static void Reset()
{
Scores = new SafeDictionary<uint, Guild>(100);
Poles.Hitpoints = Poles.MaxHitpoints;
foreach (Guild guild in Kernel.Guilds.Values)
{
guild.EWarScore = 0;
}
IsWar = true;
}
public static void FinishRound()
{
if (PoleKeeper != null && !FirstRound)
{
if (PoleKeeper.Wins == 0)
PoleKeeper.Losts++;
else
PoleKeeper.Wins--;
Database.GuildTable.UpdateGuildWarStats(PoleKeeper);
}
LastWin = Time32.Now;
FirstRound = false;
SortScores(out PoleKeeper);
if (PoleKeeper != null)
{
KeeperID = PoleKeeper.ID;
Kernel.SendWorldMessage(new Message("The guild, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + " has won this guild war round!", System.Drawing.Color.Red, Message.Center), Program.Values);
//Kernel.SendWorldMessage(new Message("It is generald pardon time. You have 5 minutes to leave, run for your life!", System.Drawing.Color.White, Message.TopLeft), Program.Values, (ushort)6001);
if (PoleKeeper.Losts == 0)
PoleKeeper.Wins++;
else
PoleKeeper.Losts--;
Database.GuildTable.UpdateGuildWarStats(PoleKeeper);
Poles.Name = PoleKeeper.Name;
}
Poles.Hitpoints = Poles.MaxHitpoints;
Kernel.SendWorldMessage(Poles, Program.Values, (ushort)2022);
Reset();
}
public static void End()
{
if (PoleKeeper != null)
{
Kernel.SendWorldMessage(new Message("The Hell Quests, " + PoleKeeper.Name + ", owned by " + PoleKeeper.LeaderName + " has won this guild war!---Guild war has ended!", System.Drawing.Color.White, Message.Center), Program.Values);
//TroZenA.Database.EntityTable.Status2();
}
else
{
Kernel.SendWorldMessage(new Message("Hell Quests war has ended and there was no winner!", System.Drawing.Color.Red, Message.Center), Program.Values);
//TroZenA.Database.EntityTable.Status2();
}
IsWar = false;
Claim = true;
UpdatePole(Poles);
}
public static void AddScore(uint addScore, Guild guild)
{
if (guild != null)
{
guild.EWarScore += addScore;
changed = true;
if (!Scores.ContainsKey(guild.ID))
Scores.Add(guild.ID, guild);
if ((int)Poles.Hitpoints <= 0)
{
FinishRound();
return;
}
}
}
public static void SendScores()
{
if (scoreMessages == null)
scoreMessages = new string[0];
if (Scores.Count == 0)
return;
if (changed)
SortScores(out CurrentTopLeader);
for (int c = 0; c < scoreMessages.Length; c++)
{
Message msg = new Message(scoreMessages[c], System.Drawing.Color.Red, c == 0 ? Message.FirstRightCorner : Message.ContinueRightCorner);
Kernel.SendWorldMessage(msg, Program.Values, (ushort)2022);
Kernel.SendWorldMessage(msg, Program.Values, (ushort)6001);
}
}
private static void SortScores(out Guild winner)
{
winner = null;
List<string> ret = new List<string>();
int Place = 0;
foreach (Guild guild in Scores.Values.OrderByDescending((p) => p.EWarScore))
{
if (Place == 0)
winner = guild;
string str = "No " + (Place + 1).ToString() + ": " + guild.Name + "(" + guild.EWarScore + ")";
ret.Add(str);
Place++;
if (Place == 4)
break;
}
changed = false;
scoreMessages = ret.ToArray();
}
private static void UpdatePole(SobNpcSpawn pole)
{
new Database.MySqlCommand(XMeGo.Database.MySqlCommandType.UPDATE)
.Update("sobnpcs").Set("name", pole.Name).Set("life", Poles.Hitpoints).Where("id", pole.UID).Execute();
}
}
}
public static void EliteGwint()
public static void HellQuestsGwint()
{
Database.DMaps.LoadMap(2022);
var Map = Kernel.Maps[2022];
Poles = (SobNpcSpawn)Map.Npcs[825];
}
public bool PoleKeeper
public bool PoleKeeper3
{
get
{
return HellQuests.Poles.Name == Name;
}
}
#region Boss-Monster
case 825:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text(" Hello " + client.Entity.Name + " Do You Want Kill Dangerous Monsters ");
dialog.Option("Go Monsters ya 3asl", 4);
dialog.Option("Information In Monsters", 3);
break;
}
case 3:
{
dialog.Text("This Monster Start 32xx59 Second\n");
dialog.Text("Monster Give you Stone or Vip 7 lamodt youm w5ad");
dialog.Text("We kman ht3edr t5od meno Souls P8 we Cps 100 Mellion or 200 Mellion");
dialog.Text("We t3der tgeb Garments kman we Mounts btdek HP we ha5ht tanyh katar Go Fight Monsters");
dialog.Option("Thanks.", 255);
dialog.Send();
break;
}
case 4:
{
DateTime Now64 = DateTime.Now;
if (DateTime.Now.Minute == 32 && DateTime.Now.Second <= 59)
{
client.Entity.Teleport(8557, 94, 125);
}
else
{
dialog.Text("T3edr Tro7 le el Monster Pk War is held during 32xx59 Second in every Day");
dialog.Option("I don't care.", 255);
dialog.Send();
break;
}
break;
}
}
break;
}
#endregion
تمام كدا بعدين هنضيف تحت EliteGw
او
case 115522:
الكود دة
#region New Quests
case 115523:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join Hell Quests?.");
dialog.Text("or claim the Prize?, you can join Every day Hour At xx:19 to xx:31.");
dialog.Text("Hey there " + client.Entity.Name + " Would you like to Join Hell Quests?.");
dialog.Option("Join HellQuests!", 1);
// dialog.Option("Claim Prize.", 5);
dialog.Send();
break;
}
case 1:
{
if (HellQuests.IsWar)
{
client.Entity.Teleport(2022, 184, 192);
}
else
{
dialog.Text("The war is not held now! It will start every day at xx:19.");//mohsen elite pk
dialog.Option("okay", 255);
dialog.Send();
break;
}
break;
}
case 5:
{
if (!HellQuests.IsWar)
{
if (client.Guild != null)
{
if (HellQuests.KeeperID != 0)
{
if (HellQuests.Claim && client.AsMember.Rank == Game.Enums.GuildMemberRank.GuildLeader && client.Guild.ID == HellQuests.KeeperID)
{
HellQuests.Claim = false;
HellQuests.KeeperID = 0;
XMeGo.Kernel.SendWorldMessage(new Message(" Congratulations ! " + client.Entity.Name + " claimed the prize [" + ServerRates.EliteGuildWar + "] ConquerPoints & [" + ServerRates.BigBTops + "] CpsBound for winning the Elite GuildWar.", System.Drawing.Color.Black, Message.Center), Program.Values);
client.Entity.ConquerPoints += ServerRates.EliteGuildWar;
// client.Inventory.Add(720665, 0, 2);
client.Entity.BoundCps += ServerRates.BigBTops;
client.Entity.AddTopStatus(Update.Flags3.rygh_hglx, 3, DateTime.Now.AddHours(2));
Program.AddWarLog("EliteGuildWar", "[Prize : " + ServerRates.EliteGuildWar + "]", client.Entity.Name);
}
else
{
dialog.Text("sorry u dont have any prize to claim....");
dialog.Option("okay", 255);
dialog.Send();
break;
}
}
}
else
{
dialog.Text("sorry u dont have any prize to claim");
dialog.Option("okay", 255);
dialog.Send();
break;
}
}
else
{
dialog.Text("Hey there " + client.Entity.Name + " You can't get the prize while the war is on!");
dialog.Option("okay", 255);
dialog.Send();
break;
}
break;
}
}
break;
}
#endregion
new Game.Map(1038, Database.DMaps.MapPaths[1038]);
new Game.Map(2022, Database.DMaps.MapPaths[2022]);
Game.EliteGuildWar.EliteGwint()
Game.HellQuests.HellQuestsGwint();
public static bool CanAttack
if (attacker.MapID == 2022)
{
if (attacker.GuildID == 0 || !Game.HellQuests.IsWar)
{
if (Game.HellQuests.Poles != null && Game.HellQuests.Poles != null && Game.HellQuests.Poles != null)
if (attacked.UID == Game.HellQuests.Poles.UID || attacked.UID == Game.HellQuests.Poles.UID || attacked.UID == Game.HellQuests.Poles.UID)
return false;
}
if (Game.HellQuests.PoleKeeper != null)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
{
if (attacked.UID == 825)
{
return false;
}
}
}
if (Game.HellQuests.PoleKeeper != null)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
{
if (Game.HellQuests.Poles != null)
if (attacked.UID == Game.HellQuests.Poles.UID)
return false;
}
}
if (Game.HellQuests.PoleKeeper != null)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
{
if (Game.HellQuests.Poles != null)
if (attacked.UID == Game.HellQuests.Poles.UID)
return false;
}
}
if (attacked.UID == 516075 || attacked.UID == 516074)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
{
if (attacker.PKMode == Enums.PKMode.Team)
return false;
}
}
}
public static void ReceiveAttack
if (attacker.MapID == 2022)
{
if (attacked.UID == 825)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
return;
if (attacked.Hitpoints <= damage)
attacked.Hitpoints = 0;
Game.HellQuests.AddScore(damage, attacker.Owner.Guild);
}
if (Game.HellQuests.Poles != null && Game.HellQuests.Poles != null)
{
if (attacked.UID == Game.HellQuests.Poles.UID)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
return;
if (attacked.Hitpoints <= damage)
attacked.Hitpoints = 0;
Game.HellQuests.AddScore(damage, attacker.Owner.Guild);
}
if (attacked.UID == Game.HellQuests.Poles.UID)
{
if (Game.HellQuests.PoleKeeper == attacker.Owner.Guild)
return;
if (attacked.Hitpoints <= damage)
attacked.Hitpoints = 0;
Game.HellQuests.AddScore(damage, attacker.Owner.Guild);
}
}
}
private void WorldTournaments(int time)
DateTime Now64 = DateTime.Now;
#region Hell Quests
// if (Now64.DayOfWeek != DayOfWeek.Saturday && Now64.DayOfWeek != DayOfWeek.Sunday)
{
if (!Game.HellQuests.IsWar)
{
if (XMeGo_Times.Start.HellQuests && Now64.Minute >= 19 && Now64.Second == 59)
{
Game.HellQuests.Start();
foreach (var client in Program.Values)
// if (client.Entity.GuildID != 0)
client.MessageBox("Hell Quests Begin Want Join ?",
p => { p.Entity.Teleport(1002, 249, 241); }, null);
foreach (var client in Program.Values)
// if (client.Entity.GuildID != 0)
client.MessageBox("Hell Quests Begin Want Join",
p => { p.Entity.Teleport(1002, 249, 241); }, null, 60, Languages.Arabic);
}
}
if (Game.HellQuests.IsWar)
{
if (Time32.Now > Game.HellQuests.ScoreSendStamp.AddSeconds(3))
{
Game.HellQuests.ScoreSendStamp = Time32.Now;
Game.HellQuests.SendScores();
}
if (XMeGo_Times.Start.HellQuests && Now64.Minute == 26 && Now64.Second <= 2)
{
Kernel.SendWorldMessage(new Network.GamePackets.Message("5 Minutes left till Elite GuildWar End Hurry kick other Guild's Ass!.", System.Drawing.Color.White, Network.GamePackets.Message.Center), Program.Values);
}
}
if (Game.HellQuests.IsWar)
{
if (XMeGo_Times.End.HellQuests && Now64.Minute >= 31 && Now64.Second == 59)
Game.HellQuests.End();
}
}
#endregion
public static bool EliteGw
public static bool HellQuests
{
get
{
return /*(now.Hour == 15 || now.Hour == 19) && */now.Minute == 19;
}
}
public class End
public static bool HellQuests
{
get
{
return now.Minute == 31 && now.Second == 59;
}
}
public void Drop(Game.Entity killer)
#region Monster is hard Quests Mr.khled
if (Name == "BlackTurtle")
{
this.RespawnTime = 15 * 60;
uint Drob = 0;
int type2 = 24;
for (int i = 0; i < 60; i++)
{
type2 = (byte)Kernel.Random.Next(1, 24);
switch (type2)
{
case 1: Drob = 2152198; break;
case 2: Drob = 2152199; break;
case 3: Drob = 2152200; break;
case 4: Drob = 2152201; break;
case 5: Drob = 2152202; break;
case 6: Drob = 2152203; break;
case 7: Drob = 2152204; break;
case 8: Drob = 2152205; break;
case 9: Drob = 2152206; break;
case 10: Drob = 2152207; break;
case 11: Drob = 2152208; break;
case 12: Drob = 2152209; break;
case 13: Drob = 2152210; break;
case 14: Drob = 2152211; break;
case 15: Drob = 2152212; break;
case 16: Drob = 2152213; break;
case 17: Drob = 2152214; break;
case 18: Drob = 2152215; break;
case 19: Drob = 2152216; break;
case 20: Drob = 2152217; break;
case 21: Drob = 2152218; break;
case 22: Drob = 2152219; break;
case 23: Drob = 2152220; break;
case 24: Drob = 2152221; break;
}
//killer.Owner.Inventory.Add(710691, 0, 1);
var infos = Database.ConquerItemInformation.BaseInformations[Drob];
//killer.Owner.Entity.ConquerPoints += ServerRates.VIP4Drop / 2;
//killer.Owner.Send(new Message("If You Vip7 Get Items in Item", System.Drawing.Color.Azure, Message.TopLeft));
//if (killer.VIPLevel >= 7)
//{
// killer.Owner.Inventory.Add(Drob, 0, 1); //الايتم يجي في الشنطه
{
/////// الايتم يوقع ع الارض
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = Kernel.Maps[Owner.MapID];
if (Map.SelectCoordonates(ref X, ref Y))
{
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
floorItem.Item = new Network.GamePackets.ConquerItem(true);
floorItem.Item.Color = (XMeGo.Game.Enums.Color)Kernel.Random.Next(4, 8);
floorItem.Item.ID = Drob;
floorItem.Item.Plus = 0;
floorItem.Item.StackSize = 1;
floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535;
floorItem.Item.MobDropped = true; ////////ال بتخلي الايتم لما يتخد يتجمع علي بعضو
floorItem.Item.UID = ConquerItem.ItemUID.Next; ;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = Drob;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Type = Network.GamePackets.FloorItem.Drop;
floorItem.OnFloor = Time32.Now;
floorItem.ItemColor = floorItem.Item.Color;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
Map.AddFloorItem(floorItem);
SendScreenSpawn(floorItem);
}
}
}
return;
}
#endregion
#region Monster is hard Quests Mr.khled
if (Name == "IronTiger")
{
this.RespawnTime = 15 * 60;
uint Drob = 0;
int type2 = 18;
for (int i = 0; i < 18; i++)
{
type2 = (byte)Kernel.Random.Next(1, 18);
switch (type2)
{
case 1: Drob = 3000369; break;
case 2: Drob = 3000369; break;
case 3: Drob = 3000369; break;
case 4: Drob = 192935; break;
case 5: Drob = 192775; break;
case 6: Drob = 188755; break;
case 7: Drob = 188945; break;
case 8: Drob = 188515; break;
case 9: Drob = 192825; break;
case 10: Drob = 200220; break;
case 11: Drob = 200475; break;
case 12: Drob = 3004124; break;
case 13: Drob = 3004124; break;
case 14: Drob = 3004124; break;
case 15: Drob = 721016; break;
case 16: Drob = 721017; break;
case 17: Drob = 721017; break;
case 18: Drob = 721016; break;
}
//killer.Owner.Inventory.Add(710691, 0, 1);
var infos = Database.ConquerItemInformation.BaseInformations[Drob];
//killer.Owner.Entity.ConquerPoints += ServerRates.VIP4Drop / 2;
//killer.Owner.Send(new Message("If You Vip7 Get Items in Item", System.Drawing.Color.Azure, Message.TopLeft));
//if (killer.VIPLevel >= 7)
//{
// killer.Owner.Inventory.Add(Drob, 0, 1); //الايتم يجي في الشنطه
{
/////// الايتم يوقع ع الارض
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = Kernel.Maps[Owner.MapID];
if (Map.SelectCoordonates(ref X, ref Y))
{
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
floorItem.Item = new Network.GamePackets.ConquerItem(true);
floorItem.Item.Color = (XMeGo.Game.Enums.Color)Kernel.Random.Next(4, 8);
floorItem.Item.ID = Drob;
floorItem.Item.Plus = 0;
floorItem.Item.StackSize = 1;
floorItem.Item.MaximDurability = floorItem.Item.Durability = 65535;
floorItem.Item.MobDropped = true; ////////ال بتخلي الايتم لما يتخد يتجمع علي بعضو
floorItem.Item.UID = ConquerItem.ItemUID.Next; ;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = Drob;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Type = Network.GamePackets.FloorItem.Drop;
floorItem.OnFloor = Time32.Now;
floorItem.ItemColor = floorItem.Item.Color;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
Map.AddFloorItem(floorItem);
SendScreenSpawn(floorItem);
}
}
}
return;
}
#endregion
INSERT INTO `maps` VALUES ('2022', '2022', '8198', '0000');
INSERT INTO `maps` VALUES ('8557', '1506', '0007', '0000');
INSERT INTO `monsterinfos` VALUES ('417116', 'IronTiger', '0001', '0709', '60000000', '00', '5000', '1000', '0200', '0007', '0008', '0200', '0200', '0140', '3', '0000', '0', '0', '0', '0', '1');
INSERT INTO `monsterinfos` VALUES ('417117', 'BlackTurtle', '0001', '0712', '60000000', '00', '20000', '20000', '0100', '0001', '0008', '1000', '0500', '0140', '3', '0500', '0', '0', '0', '0', '1');
INSERT INTO `monsterspawns` VALUES ('1236600', '8557', '0108', '0120', '0001', '0001', '0001', '0001', '0001', '417116');
INSERT INTO `monsterspawns` VALUES ('1236601', '8557', '0108', '0129', '0001', '0001', '0001', '0001', '0001', '417117');
INSERT INTO `npcs` VALUES ('115523', 'Hell Quests', '0002', '0000', '1002', '0249', '0235', null, '0000', '0');
INSERT INTO `sobnpcs` VALUES ('0825', '01096023205', '10', '1137', '2022', '226', '194', '17652402', '20000000', '0000', '17', '1', '0', null);
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
صفحه Hell-conquer | محمد ياسر | صفحات التسجيل كونكر اونلاين | 113 | 2024-11-23 01:55 AM |
Daily Quests TQ100% | محمد ياسر | تطوير سيرفرات كونكر | 1 | 2024-08-06 06:46 PM |
سيستم Epic Quests Full Like TQ | khaledxodia | تطوير سيرفرات كونكر | 17 | 2024-07-03 01:32 AM |
Hell Tops ElSaher | ElSaher | تطوير سيرفرات كونكر | 5 | 2020-04-22 05:23 AM |