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

مشاهدة النسخة كاملة : كويست الكنج دوم كاملة بدون اي مشاكل


Mero
2019-04-19, 12:15 AM
عفواً لايمكن عرض الروابط في الإرشيف

إعمل كلاس جديد إسمه

KingdomMissionTable.cs

ضيف فيه دول

using System;
using xEmper.Network.GamePackets;

namespace xEmper.Database
{
public class KingdomMissionTable
{
public static void Load(Client.GameState client)
{
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("KingdomMission").Where("UID", client.Entity.UID))
using (var reader = new MySqlReader(cmd))
{
while (reader.Read())
{
client.Entity.KingdomDeed = reader.ReadUInt32("KingdomDeeds");
client.Entity.StrikePoints = reader.ReadUInt32("StrikePoints");
return;
}
Insert(client);
}
}
public static void Insert(Client.GameState client)
{
using (var cmd = new MySqlCommand(MySqlCommandType.INSERT).Insert("KingdomMission")
.Insert("UID", client.Entity.UID))
cmd.Execute();
}
public static void Save(Client.GameState client, MySql.Data.MySqlClient.MySqlConnection conn)
{
using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE).Update("KingdomMission"))
cmd.Set("KingdomDeeds", client.Entity.KingdomDeed)
.Set("StrikePoints", client.Entity.StrikePoints)
.Where("UID", client.Entity.UID)
.Execute(conn);
}

}
}

-إفتح ملف == MonestorTable.cs وضيف الوحوش دى عندك تحت أى وحش ..



#region ThunderStrike
if (killer.MapID == 3935)
{
if (killer.Owner.Quests.GetQuest(QuestID.ThunderStrik e) == null || killer.Owner.Quests.CheckQuest(QuestID.ThunderStri ke) == QuestPacket.QuestData.QuestStatus.Available)
killer.Owner.Quests.Accept(QuestID.ThunderStrike);
if (killer.StrikePoints != 500)
{
if (killer.StrikePoints < 300)
{
int R = 5;
if (Name == "RealmSolider")
{
R = Kernel.Random.Next(1, 5);
}
if (Name.Contains("MilitaryOfficer"))
{
killer.Owner.Send(new Message("A flood of enemy soldiers emerged from the haze when their leader was killed. Go and clear them!", System.Drawing.Color.Red, 2005));
R = Kernel.Random.Next(20, 20);
}
if (Name == "KylinChariot")
{
R = Kernel.Random.Next(50, 50);
}
killer.StrikePoints += (uint)R;
killer.StrikePoints += (uint)R;
killer.Owner.Quests.ThunderStrike(QuestID.ThunderS trike, (uint)R);
if (killer.StrikePoints >= 300)
{
killer.StrikePoints = 300;
killer.StrikePoints = 300;
}
killer.Owner.Send(new Message("You've received " + killer.StrikePoints + " Strike Points by killing enemies firecrely. When you earn 300 Strike Points , you can claim a reward from the Kingdom Mission Envoy.", System.Drawing.Color.Red, Message.System));
}
else
{
killer.Owner.MessageBox("You`ve completed the [Thunder Strike] mission in the realm. Report back to the Kingdom Mission Envoy to claim your reward.");
killer.Owner.Send(new Message("You've earend 300 Strike Points by killing enemies firercely. Go claim your reward from the Kingdom Mission Envoy.", System.Drawing.Color.Red, Message.System));
}
}
}
#endregion
#region BrightFortune
#region AngerRat
if (Name == "AngerRat")
{
#region AngerRat
if (killer.Owner.Quests.GetQuest(QuestID.BloodVengean ce) != null && killer.Owner.Quests.GetQuest(QuestID.BloodVengeanc e).Kills < 10)
{
killer.Owner.Quests.IncreaseQuestKills(QuestID.Blo odVengeance, 1);
}
else if (killer.Owner.Quests.GetQuest(QuestID.BloodVengean ce) != null && killer.Owner.Quests.GetQuest(QuestID.BloodVengeanc e).Kills >= 10)
{
killer.Owner.MessageBox("You`ve eliminated enough number of Anger Rats. Hurry and report back to Chong Yan Elder!",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19162;
data.ID = 162;
data.wParam1 = 142;
data.wParam2 = 320;
p.Send(data);
}, null);
}
#endregion
}
#endregion
#region FlameRockMonste
if (Name.Contains("FlameRockMonste"))
{
#region FlameRockMonste
if (killer.Owner.Inventory.Contains(3008752, 8))
{

killer.Owner.MessageBox("You`ve collected enough number of Rune Fragments. Go and try to complete the runes on the Forge Furnace.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19163;
data.ID = 162;
data.wParam1 = 311;
data.wParam2 = 449;
p.Send(data);
}, null);
}
else
{
if (Kernel.Rate(20))
{

killer.Owner.Inventory.Add(3008752, 0, 1);
_String str = new _String(true);
str.UID = killer.Owner.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("zf2-e123");
killer.Owner.SendScreen(str, true);

}

}
#endregion
}
#endregion
#region VioletBatKing
if (Name == "VioletBatKing")
{
#region VioletBatKing
if (!killer.Owner.Inventory.Contains(3008750, 1) && killer.Owner.Quests.GetQuest(QuestID.SecretOfBrigh t) != null)
{
killer.Owner.Inventory.Add(3008750, 0, 1);
killer.Owner.MessageBox("The Violet Bat King fell down and dropped an ancient-style hammer. Hurry and take this hammer to the Forge Furnace.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19163;
data.ID = 162;
data.wParam1 = 311;
data.wParam2 = 449;
p.Send(data);
}, null);
killer.Owner.Quests.IncreaseQuestKills(QuestID.Sec retOfBright, 1);
}
#endregion
}
#endregion
#region LavaScorpion
if (Name == "LavaScorpion")
{
#region LavaScorpion
if (killer.Owner.Quests.GetQuest(QuestID.Sacrificetot heDead) != null && killer.Owner.Quests.GetQuest(QuestID.Sacrificetoth eDead).Kills >= 15)
{
killer.Owner.MessageBox("You`ve defeated enough number of Lava Scorpions. Now, you can appease the sacrificed Bright people.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19164;
data.ID = 162;
data.wParam1 = 251;
data.wParam2 = 277;
p.Send(data);
}, null);
}
else if (killer.Owner.Quests.GetQuest(QuestID.Sacrificetot heDead) != null && killer.Owner.Quests.GetQuest(QuestID.Sacrificetoth eDead).Kills1 < 15)
{
killer.Owner.Quests.IncreaseQuestKills5(QuestID.Sa crificetotheDead, 1);

}
#endregion
}
#endregion
#region RoaringSnake
if (Name == "RoaringSnake")
{
#region RoaringSnake
if (killer.Owner.Inventory.Contains(3008742, 50) && killer.Owner.Quests.GetQuest(QuestID.SorrowofDesol ation) != null)
{
killer.Owner.MessageBox("You`ve collect enough number of Building Stones. Go and try to restore the ruined altar.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.ID = 162;
data.wParam1 = 578;
data.wParam2 = 419;
p.Send(data);
}, null);
}
else
{
killer.Owner.Inventory.Add(3008742, 0, 1);
}
#endregion
}
#endregion
#region ClawedRockDevil
if (Name == "ClawedRockDevil")
{
#region ClawedRockDevil
if (killer.Owner.Inventory.Contains(3008743, 1))
{
}
else
{

if (Kernel.Rate(40))
{
killer.Owner.Inventory.Add(3008743, 0, 1);
killer.Owner.MessageBox("You`ve retrieved the Wheel of Nature from the Clawed Rock Devil. Hurry and take the next action at the altar.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19165;
data.ID = 162;
data.wParam1 = 573;
data.wParam2 = 423;
p.Send(data);
}, null);

}
}
#endregion
}
#endregion
#region HornedRockBeast
if (Name == "HornedRockBeast")
{
#region HornedRockBeast
if (!killer.Owner.Inventory.Contains(3008745, 1))
{
if (killer.Owner.Inventory.Contains(3008754, 5))
{

killer.Owner.Inventory.Add(3008745, 0, 1);
killer.Owner.Inventory.Remove(3008754, 5);
killer.Owner.MessageBox("You received the Earth Force! Hurry and transform it into Metal Force through the Wheel of Nature!",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19165;
data.ID = 162;
data.wParam1 = 578;
data.wParam2 = 419;
p.Send(data);
}, null);

}
else
{

if (Kernel.Rate(40))
{
killer.Owner.Inventory.Add(3008754, 0, 1);

}
}
}
#endregion
}
#endregion
#region HellfireBeast
if (Name == "HellfireBeast")
{
#region HellfireBeast
if (killer.Owner.Inventory.Contains(3008748, 100))
{
killer.Owner.MessageBox("You`ve collected enough number of Star Ores. Go and try to extract the Essence of Star at the altar.",
p =>
{
Data data = new Data(true);
data.UID = p.Entity.UID;
data.TimeStamp2 = 19165;
data.ID = 162;
data.wParam1 = 571;
data.wParam2 = 424;
p.Send(data);
}, null);

}
else
{
killer.Owner.Inventory.Add(3008748, 0, 5);

}
#endregion
}
#endregion
#endregion
#region CrystalBounty
if (killer.MapID == 3935)
{
if (killer.Owner.Quests.CheckQuest(QuestID.CrystalBou nty) != QuestPacket.QuestData.QuestStatus.Finished)
{
if (killer.Owner.Quests.GetQuest(QuestID.CrystalBount y) == null || killer.Owner.Quests.CheckQuest(QuestID.CrystalBoun ty) == QuestPacket.QuestData.QuestStatus.Available)
killer.Owner.Quests.Accept(QuestID.CrystalBounty);
if (killer.Owner.Quests.GetQuest(QuestID.CrystalBount y).Kills < 50)
{
int R = 5;
if (Name == "RealmSolider")
{
R = Kernel.Random.Next(1, 1);
}
if (Name.Contains("MilitaryOfficer"))
{

R = Kernel.Random.Next(1, 1);
}
if (Name == "KylinChariot")
{
R = Kernel.Random.Next(10, 10);
}
killer.Owner.Quests.CrystalBounty(QuestID.CrystalB ounty, (uint)R);
if (killer.Owner.Quests.GetQuest(QuestID.CrystalBount y).Kills >= 50)
{
killer.Owner.Send(new Message("You've eliminated 50 enemies. Hurry and claim a bounty from the Realm Crystal.", System.Drawing.Color.Red, Message.System));
}
}
else
{
killer.Owner.Send(new Message("You've eliminated 50 enemies. Hurry and claim a bounty from the Realm Crystal.", System.Drawing.Color.Red, Message.System));
}
}
}
#endregion
#region BeastsOfLegend
if (killer.MapID == 3935)
{
if (killer.Owner.Quests.GetQuest(QuestID.BeastsOfLege nd) == null || killer.Owner.Quests.CheckQuest(QuestID.BeastsOfLeg end) == QuestPacket.QuestData.QuestStatus.Available)
killer.Owner.Quests.Accept(QuestID.BeastsOfLegend) ;
if (killer.Owner.Quests.GetQuest(QuestID.BeastsOfLege nd).QItem.Status != QuestPacket.QuestData.QuestStatus.Finished)
{
if (Name.Contains("VermilionBirdDef") || Name.Contains("WhiteTigerDefend") || Name.Contains("AzureDragonDefen") || Name.Contains("BlackTurtleDefen"))
{
if (Kernel.Rate(30))
{
Database.MonsterInformation monster = new Database.MonsterInformation();

monster.Hitpoints = 500000;
monster.Level = 140;
if (Name.Contains("AzureDragonDefen"))
{
monster.Mesh = 711;
monster.Name = "AzureDragon";
monster.ID = 7885;
}
if (Name.Contains("BlackTurtleDefen"))
{
monster.Mesh = 712;
monster.Name = "BlackTurtle";
monster.ID = 7888;
}
if (Name.Contains("WhiteTigerDefend"))
{
monster.Mesh = 709;
monster.Name = "WhiteTiger";
monster.ID = 7886;
}
if (Name.Contains("VermilionBirdDef"))
{
monster.Mesh = 710;
monster.Name = "VermilionBird";
monster.ID = 7887;
}
monster.MaxAttack = 2100;
monster.AttackRange = 3;
monster.AttackType = 2;
monster.AttackSpeed = 1000;
monster.ViewRange = 20;
monster.MoveSpeed = 1000;
monster.RunSpeed = 1000;
monster.MinAttack = 1000;
Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false);
entity.MapObjType = Game.MapObjectType.Monster;
entity.MonsterInfo = monster;
entity.MonsterInfo.Owner = entity;
entity.Name = monster.Name;
entity.MinAttack = monster.MinAttack;
entity.MaxAttack = entity.MagicAttack = monster.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints;
entity.Body = monster.Mesh;
entity.Level = monster.Level;
entity.Defence = 90;
entity.X = killer.X;
entity.Y = killer.Y;
entity.UID = Kernel.Maps[3935].EntityUIDCounter.Next;
entity.MapID = 3935;
entity.SendUpdates = true;
killer.Owner.Map.RemoveEntity(entity);
killer.Owner.Map.AddEntity(entity);
killer.Owner.Screen.Reload(null);
}
}
if (Name == "AzureDragon" || Name == "WhiteTiger" || Name == "BlackTurtle" || Name == "VermilionBird")
{
if (killer.Owner.Quests.GetQuest(QuestID.BeastsOfLege nd).Kills == 0)
{
killer.Owner.Quests.IncreaseQuestKills(QuestID.Bea stsOfLegend, 1);
killer.Owner.MessageBox("You`ve defeated the divine beast. Hurry and claim your reward from the Kingdom Mission Envoy!");
}
}
}
}
#endregion
#region Scramble
if (killer.MapID == 3935)
{
if (killer.Owner.Quests.GetQuest(QuestID.ScrambleforJ ustice) == null || killer.Owner.Quests.CheckQuest(QuestID.Scramblefor Justice) == QuestPacket.QuestData.QuestStatus.Available)
killer.Owner.Quests.Accept(QuestID.ScrambleforJust ice);
if (killer.Owner.Quests.GetQuest(QuestID.ScrambleforJ ustice).QItem.Status != QuestPacket.QuestData.QuestStatus.Finished)
{
if (Name == "AlluringWitch")
{
killer.Owner.MessageBox("You`ve defeated the AlluringWitch! Here's your reward!");
killer.Owner.Quests.FinishQuest(QuestID.Scramblefo rJustice);
killer.Owner.Inventory.Add("SavageBone");
}
}
}
#endregion
#region SnakeIsland
if (Name == "SnakeKing")
{
int R = Kernel.Random.Next(1, 6);
if (R == 1)
{
int r = Kernel.Random.Next(1, 5);
for (int x = 0; x < r; x++)
{
uint ItemID = 1088001;
var infos6 = Database.ConquerItemInformation.BaseInformations[ItemID];
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = xEmper.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 =
(xEmper.Game.Enums.Color)xEmper.Kernel.Random.Next (4, 8);
floorItem.Item.ID = ItemID;
floorItem.Item.MaximDurability = infos6.Durability;
floorItem.Item.Durability = infos6.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.OwnerUID = killer.UID;
floorItem.Item.StackSize = 1;
floorItem.Item.MaxStackSize = infos6.StackSize;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Owner = killer.Owner;
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);
}
}
}
if (R == 2)
{
uint ItemID = 1088000;
var infos6 = Database.ConquerItemInformation.BaseInformations[ItemID];
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = xEmper.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 =
(xEmper.Game.Enums.Color)xEmper.Kernel.Random.Next (4, 8);
floorItem.Item.ID = ItemID;
floorItem.Item.MaximDurability = infos6.Durability;
floorItem.Item.Durability = infos6.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.Item.StackSize = 1;
floorItem.Item.MaxStackSize = infos6.StackSize;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Owner = killer.Owner;
floorItem.Owner = killer.Owner;
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);
}
}
if (R == 3)
{
uint ItemID = 700013;
var infos6 = Database.ConquerItemInformation.BaseInformations[ItemID];
ushort X = Owner.X, Y = Owner.Y;
Game.Map Map = xEmper.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 =
(xEmper.Game.Enums.Color)xEmper.Kernel.Random.Next (4, 8);
floorItem.Item.ID = ItemID;
floorItem.Item.MaximDurability = infos6.Durability;
floorItem.Item.Durability = infos6.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.Item.StackSize = 1;
floorItem.Item.MaxStackSize = infos6.StackSize;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = X;
floorItem.Y = Y;
floorItem.Owner = killer.Owner;
floorItem.Owner = killer.Owner;
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);
}
}
if (R == 4)
{
killer.SubClasses.StudyPoints += (ushort)Kernel.Random.Next(1, 2000);
}
if (R == 5)
{
uint ItemID = 0;
int x = Kernel.Random.Next(1, 10);
if (x == 1)
ItemID = 723713;
if (x == 2)
ItemID = 723714;
if (x == 3)
ItemID = 723715;
if (x == 4)
ItemID = 723716;
if (x == 5)
ItemID = 723717;
if (x == 6)
ItemID = 723718;
if (x == 7)
ItemID = 723719;
if (x == 8)
ItemID = 723720;
if (x == 9)
ItemID = 723721;
if (x == 10)
ItemID = 723722;
killer.Owner.Inventory.Add(ItemID, 0, 1);

}
}
#endregion
#region Labirinth
#region Slinger-GoldGhost
if (Name == "Slinger" || Name == "GoldGhost")
{
uint Uid = 0;
byte type = (byte)Kernel.Random.Next(1, 45);
switch (type)
{
case 5:
case 4:
case 6:
case 8:
if (!killer.Owner.Inventory.Contains(3007529, 5))
{
killer.Owner.Inventory.Add(3007529, 0, 1);
}
break;
case 32:
case 30:
if (killer.Owner.Inventory.Contains(3007528, 5))
return;
killer.Owner.Inventory.Add(3007528, 0, 1);
killer.Update(_String.Effect, "waybee", true);
break;
case 25:
case 24:
if (!killer.Owner.Inventory.Contains(721537, 5))
{
killer.Owner.Inventory.Add(721537, 0, 1);
}
break;
case 2:
case 7:
case 9:
Uid = 721533;
break;
case 19:
case 20:
case 21:
case 22:
case 23:
killer.CycloneStamp = Time32.Now;
killer.CycloneTime = 20;
killer.AddFlag(Update.Flags.Cyclone);
killer.Owner.Send(new Message("You received Storm effect!", System.Drawing.Color.CadetBlue, Message.System));
break;
}
if (Uid != 0)
{
killer.Owner.Inventory.Add(Uid, 0, 1);
}
}
#endregion
#region Bladeling-AgileRat
if (Name == "Bladeling" || Name == "AgileRat")
{
uint Uid = 0;
byte type = (byte)Kernel.Random.Next(1, 45);
switch (type)
{
case 5:
case 6:
case 8:
case 4:
if (!killer.Owner.Inventory.Contains(3007529, 5))
killer.Owner.Inventory.Add(3007529, 0, 1);
break;

case 30:
case 32:
if (!killer.Owner.Inventory.Contains(3007528, 5))
{
killer.Owner.Inventory.Add(3007528, 0, 1);
killer.Update(_String.Effect, "waybee", true);
}
break;
case 24:
if (!killer.Owner.Inventory.Contains(721538, 5))
killer.Owner.Inventory.Add(721538, 0, 1);
break;
case 25:
if (!killer.Owner.Inventory.Contains(721538, 5))
killer.Owner.Inventory.Add(721538, 0, 1);
break;
case 2:
case 7:
case 9:
Uid = 721534;
break;
case 19:
case 20:
case 21:
case 22:
case 23:
killer.CycloneStamp = Time32.Now;
killer.CycloneTime = 20;
killer.AddFlag(Update.Flags.Cyclone);
killer.Owner.Send(new Message("You received Storm effect!", System.Drawing.Color.CadetBlue, Message.System));
break;
}

if (Uid != 0)
{
killer.Owner.Inventory.Add(Uid, 0, 1);
}
}
#endregion
#region FiendBat-BlueBird
if (Name == "FiendBat" || Name == "BlueBird")
{
uint Uid = 0;
byte type = (byte)Kernel.Random.Next(1, 45);
switch (type)
{
case 5:
case 4:
case 6:
case 8:
if (!killer.Owner.Inventory.Contains(3007529, 5))
killer.Owner.Inventory.Add(3007529, 0, 1);
break;
case 30:
case 32:
if (!killer.Owner.Inventory.Contains(3007528, 5))
{
killer.Owner.Inventory.Add(3007528, 0, 1);
killer.Update(_String.Effect, "waybee", true);
}
break;
case 24:
case 25:
if (killer.Owner.Inventory.Contains(721539, 5))
killer.Owner.Inventory.Add(721539, 0, 1);
break;
case 2:
case 7:
case 9:
Uid = 721535;
break;
case 19:
case 20:
case 21:
case 22:
case 23:
killer.CycloneStamp = Time32.Now;
killer.CycloneTime = 20;
killer.AddFlag(Update.Flags.Cyclone);
killer.Owner.Send(new Message("You received Storm effect!", System.Drawing.Color.CadetBlue, Message.System));
break;
}

if (Uid != 0)
{
killer.Owner.Inventory.Add(Uid, 0, 1);
}
}
#endregion
#region MinotaurL120
if (Name == "MinotaurL120")
{
uint Uid = 0;
byte type = (byte)Kernel.Random.Next(1, 45);
switch (type)
{
case 5:
case 4:
case 6:
case 8:
if (!killer.Owner.Inventory.Contains(3007529, 5))
killer.Owner.Inventory.Add(3007529, 0, 1);
break;
case 30:
case 32:
if (!killer.Owner.Inventory.Contains(3007528, 5))
{
killer.Owner.Inventory.Add(3007528, 0, 1);
killer.Update(_String.Effect, "waybee", true);
}
break;
case 2:
case 7:
case 9:
Uid = 721536;
break;
case 19:
case 20:
case 21:
case 22:
case 23:
killer.CycloneStamp = Time32.Now;
killer.CycloneTime = 20;
killer.AddFlag(Update.Flags.Cyclone);
killer.Owner.Send(new Message("You received Storm effect!", System.Drawing.Color.CadetBlue, Message.System));
break;
}

if (Uid != 0)
{
killer.Owner.Inventory.Add(Uid, 0, 1);
}
}
#endregion
#endregion
#region Ganoderma and titan
if (Name.Contains("Ganoderma") || Name.Contains("Titan"))
{
killer.DoubleExperienceTime = 3600;
}
#endregion

-بعد كدا إفتح كلاس ==> Inventory.cs وضيف دول ف الكلاس ..

public void Add(string Name)
{
foreach (var item in Database.ConquerItemInformation.BaseInformations.V alues)
{
if (item.Name == Name)
{
Add(item.ID, 0, 1);
break;
}
}
}
public bool AddTime(uint id, uint seconds, bool bound = false)
{
try
{
Database.ConquerItemInformation infos = new Database.ConquerItemInformation(id, 0);
if (Count <= 39)
{
ConquerItem item;
item = new ConquerItem(true);
{
item.ID = id;
item.Plus = 0;
item.Bless = 0;
item.Enchant = 0;
item.SocketOne = 0;
item.SocketTwo = 0;
item.Bound = bound;
item.TimeStamp = DateTime.Now;
item.Minutes = (seconds / 60);
item.TimeLeftInMinutes = seconds;
item.Durability = item.MaximDurability = infos.BaseInformation.Durability;
};
Add(item, Enums.ItemUse.CreateAndAdd);
}
else
{
return false;
}
}
catch (Exception)
{
}
return true;
}

-ف كلاس QuestPacket.cs

-إبحث عن

public enum QuestID : uint

-ضيف دول تحت القوس



SorrowofDesolation = 3644,
FireForce = 3647,
GloryOfThePast= 3637,
SecretOfBright = 3638,
HealingTheDying = 3642,
PathToFlameTemple = 3643,
TheWayofTommorow = 3631,
UnexceptedDiscovery = 3639,
BloodVengeance = 3634,
MetalForce = 3646,
MysteriousMetal = 3640,
EvilRoot = 3635,
ForgeFurance = 3636,
EndHomelessness = 3649,
SacrificetotheDead = 3641,
WaitingForMiracle = 3648,
UnknownDangers = 3632,
WheelofNature = 3645,
ScrambleforJustice = 35034,
CrystalBounty = 35028,
AshesOfAnger = 35024,
BeastsOfLegend = 35025,
DisCity1 = 6472,
MonsterSage = 3633,
Discity2 = 6473,
DisCity3 = 6474,
DisCity4 = 6475,
ThunderStrike = 35007,
WorshipLeaders = 6329,
Spirit_Beads = 2375,
TowerOfMystery = 6126,
EvilLabyrinth = 6467,
HeavenTreasury = 6390,
Magnolias = 6014,
TempestWing = 200,
EveryThingHasAPrice = 6245,
Release_the_souls = 6049,
RareMaterials = 6366,
SecondQuestStageOne = 2414,
SkyPass = 6350,
SecondQuestStageTwo = 2416,
SecondQuestStageThree = 2418,
SecondQuestStageFour = 2419,
Secret_in_the_Chest = 3679,
Weird_Formation = 3680,
Mind_of_Evil = 3682,

-إبحث عن



رpublic void IncreaseQuestKills(QuestID


-إقفلها من السالب وضيف تحتها دا ..



#region Realm
public void ThunderStrike(QuestID UID, uint Kills)
{
if (src.ContainsKey(UID) && IsActiveQuest(UID))
{
var item = src[UID];
item.Kills += Kills;
src[UID] = item;

QuestData dataq = new QuestData(true);
dataq.UID = UID;
dataq.ThunderStrike = item.Kills;
Player.Send(dataq);
}
}
public void CrystalBounty(QuestID UID, uint Kills)
{
if (src.ContainsKey(UID) && IsActiveQuest(UID))
{
var item = src[UID];
item.Kills += Kills;
src[UID] = item;

QuestData dataq = new QuestData(true);
dataq.UID = UID;
dataq.CrystalBounty = item.Kills;
Player.Send(dataq);
}
}
public void AshesOfAnger/*Realm*/(QuestID UID, uint Kills1)
{
if (src.ContainsKey(UID))
{
var item = src[UID];
item.Kills += Kills1;
src[UID] = item;

QuestData dataq = new QuestData(true);
dataq.UID = UID;
dataq.AshesOfAnger = item.Kills;
Player.Send(dataq);
}
}
#endregion

-إبحث عن



public class QuestData : Writer,


-ضيف تحت القوس دول ..



public uint Bright
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { Write(value, 16, Buffer); }
}
public uint AshesOfAnger
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { Write(value, 16, Buffer); }
}
public uint CrystalBounty
{
get { return BitConverter.ToUInt32(Buffer, 12); }
set { Write(value, 12, Buffer); }
}
public uint ThunderStrike
{
get { return BitConverter.ToUInt32(Buffer, 32); }
set { Write(value, 32, Buffer); }
}

-إبحث عن



public void IncreaseQuestKills


-إقفلها من السالب وضيف فوقها دا ..



public void IncreaseQuestKills5(QuestID UID, uint Kills)
{
if (src.ContainsKey(UID) && IsActiveQuest(UID))
{
var item = src[UID];
item.Kills += Kills;
src[UID] = item;

QuestData dataq = new QuestData(true);
dataq.UID = UID;
dataq[1] = item.Kills;
if (item.Kills == 15)
{
dataq.Bright = 1;
}
Player.Send(dataq);
}
}

-إفتح كلاس

Entity.cs

ضيف دا تحت أى public عندك ..


public uint KingdomDeed = 0;



-إفتح كلاس

Conqueritem.cs


ulong minutes = 0;
public ulong Minutes
{
get
{
return minutes;
}
set
{
minutes = value;
Database.ConquerItemTable.UpdateMinutes(this);
}
}
DateTime timestamp;
public DateTime TimeStamp
{
get
{
return timestamp;
}
set
{
timestamp = value;
Database.ConquerItemTable.UpdateTimeStamp(this);
}
}


-إفتح كلاس

ConquerItemTable.cs



-ضيف فيه دوول


public static void UpdateMinutes(ConquerItem Item)
{
UpdateData(Item, "MinutesLeft", Item.Minutes);
}
public static void UpdateTimeStamp(ConquerItem Item)
{
UpdateData(Item, "TimeStamp", Item.TimeStamp);
}

-إفتح كلاس ==> PacketHandler.cs



-إبحث عن


static void UseItem(ConquerItem item, Client.Game



-تحت القوس الى تحت كلمة switch ضيف دوول ..




#region RealmCrytalFragment
case 3600029:
{
if (client.Inventory.Count <= 39)
{
int R = Kernel.Random.Next(1, 4);
if (R == 1) client.Inventory.Add(3008994, 0, 1);
if (R == 2) client.Inventory.Add(3006539, 0, 1);
if (R == 3) client.Inventory.Add(3002030, 0, 3);
else client.Inventory.Add(3002030, 0, 3);
client.Entity.KingdomDeed += 6;
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
}
else client.Send(Constants.FullInventory);
break;
}
#endregion
#region KingdomMissionItems
case 3007108:
{
client.Entity.InnerPower.AddPotency(null, client, 400);
client.UnionExploits += 50;
if (client.Union != null)
{
client.Union.UnionFund += 100;
}
client.MessageBox("You got 50 War Exploits, 400 PotencyPoints and 100 Union Fund!");
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
break;
}
case 3007109:
{
client.Entity.InnerPower.AddPotency(null, client, 600);
client.UnionExploits += 100;
if (client.Union != null)
{
client.Union.UnionFund += 160;
}
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.MessageBox("You got 100 War Exploits, 600 PotencyPoints, 50 ChampionPoints and 160 Union Fund!");
break;
}
case 3007110:
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.UnionExploits += 150;
client.Entity.InnerPower.AddPotency(null, client, 1000);
if (client.Union != null)
{
client.Union.UnionFund += 360;
}
client.MessageBox("You got 150 War Exploits, 1000 PotencyPoints, 100 ChampionPoints and 360 Union Fund!");
break;
}
#endregion
#region Bounties
case 3200000:
{
if (client.Inventory.Count <= 37)
{
client.Send(new Message("Your excellent performance in the battle has earned yourself a wonderful bountry!", Color.Red, Message.System));
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
client.Inventory.AddTime(3200334, 1 * 24 * 60 * 60);
client.Inventory.AddTime(3007109, 7 * 24 * 60 * 60);
client.Inventory.Add(3006539, 0, 1);
client.Entity.KingdomDeed += 90;
}
else client.Send(Constants.FullInventory);
break;
}
case 3200005:
{
if (client.Inventory.Count <= 38)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
int R = Kernel.Random.Next(1, 3);
if (R == 1) client.Inventory.AddTime(3008965, 2 * 24 * 60 * 60);
else client.Inventory.AddTime(3008963, 2 * 24 * 60 * 60);
int x = Kernel.Random.Next(1, 3);
if (x == 1) client.Inventory.Add(3002926, 0, 2);
if (x == 2) client.Inventory.Add(3002030, 0, 2);
else client.Inventory.Add(3003125, 0, 2);
client.Entity.KingdomDeed += 60;
}
else client.Send(Constants.FullInventory);
break;
}
case 3200004:
{
if (client.Inventory.Count <= 38)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
int R = Kernel.Random.Next(1, 3);
if (R == 1) client.Inventory.AddTime(3008965, 2 * 24 * 60 * 60);
else client.Inventory.AddTime(3008963, 2 * 24 * 60 * 60);
int x = Kernel.Random.Next(1, 3);
if (x == 1) client.Inventory.Add(3002926, 0, 2);
if (x == 2) client.Inventory.Add(3002030, 0, 2);
else client.Inventory.Add(3003125, 0, 2);
client.Entity.KingdomDeed += 30;
}
else client.Send(Constants.FullInventory);
break;
}
#endregion


-خلصنا شغل السى شارب -- فاضل شغل النافى كات

-ادخل ف القاعدة Table monsterinfo

-ضيف فيه دول [ بس أنصحك ضفهم بايدك متاخدهمش كوبى ] ..

7861 SmallCrystal 1 916 20 0 1 1 10000 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7860 BigCrystal 1 916 80 0 1 1 10000 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7896 RealmSoldier 1 290 50000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7897 MilitaryOfficer 1 910 100000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7898 KylinChariot 1 788 100000 0 2100 1000 90 1 15 1000 4000000000 135 3 4000000000 0 100 0 0 0 0 0 0
7891 VermilionBirdDef 1 197 50000 0 2100 100 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7890 WhiteTigerDefend 1 384 50000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7889 AzureDragonDefen 1 255 50000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7892 BlackTurtleDefen 1 168 50000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7883 AlluringWitch 1 919 22500000 0 2100 1000 80000 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7884 DarkCrystalofSky 1 916 5000000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7971 DarkCrystalofWin 1 916 5000000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7972 ThunderCrystal 1 916 5000000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
7973 DarkCrystalofFir 1 916 5000000 0 2100 1000 90 1 15 1000 500 135 3 500 0 100 0 0 0 0 0 0
4151 LavaBeast 1 251 15000000 0 20000 20000 20000 3 15 1000 1000 135 3 500 0 100 0 0 0 0 0 0
2760 VioletBatKing 1 210 109800 0 2100 1000 500 1 8 1000 1000 122 3 500 0 100 0 0 0 0 0 0
7565 PurpleBanshee 1 951 54000000 0 5000 5000 50000 14 15 800 500 138 3 500 0 100 0 0

-إدخل ف القاعدة Table monsterspwans

-ضيف فيه دول [ بس أنصحك ضفهم بايدك متاخدهمش كوبى ] ..

945446 3935 1 1 700 700 600 1 600 7896
5466 3935 1 1 700 700 100 1 100 7897
45646 3935 397 256 6 1 1 30 1 7898
456464 3935 400 296 1 1 1 30 1 7898
456445 3935 348 263 1 1 1 30 1 7898
45646456 3935 349 275 1 1 1 30 1 7898
56464 3935 382 293 15 15 25 1 25 7891
56616 3935 367 458 15 15 25 1 25 7890
5464564 3935 471 370 15 15 25 1 25 7889
21615 3935 296 340 15 15 25 1 25 7892
54564 3935 307 277 1 1 1 30 1 7898
456456 3935 288 413 1 1 1 30 1 7898
4544949 3935 298 434 1 1 1 30 1 7898
656463 3935 315 461 1 1 1 30 1 7898
56446 3935 397 504 1 1 1 30 1 7898
44494949 3935 410 502 1 1 1 30 1 7898
456456145 3935 433 493 1 1 1 30 1 7898
8894984 3935 421 491 1 1 1 30 1 7898
545464 3935 475 497 1 1 1 30 1 7898
6161464 3935 441 492 1 1 1 30 1 7898
6545664 3935 417 502 1 1 1 30 1 7898
565645456 3935 389 507 1 1 1 30 1 7898
44944 3935 317 474 1 1 1 30 1 7898

عفواً لايمكن عرض الروابط في الإرشيف

MohamedModyAdel
2019-06-25, 10:40 PM
جميل

انت عمري
2019-10-23, 02:29 PM
ممكن نفس الكويستة بس لسورس اليكس