Commander
2019-12-14, 08:04 PM
بسم الله الرحمن الرحيم
بناءا علي طلب zezenever تم عمل كويسته للفي اي بي وفكرتها ان كل لاعب هيجي يخشها هيخش ماب لوحده هيلاقي 10 وحوش هيقتلهم كل وحش هيوقع شنطه او توكن ده تتحكم فيها براحتك وهشرح ازاي في الاضافه وبعد ما تجمع 10 هدوس علي اي واحده فيهم هياخدهم منك و يطلعلك وحش بس قوي جدا هتخلصو هتاخد جايزه انت الي تحددها براحتك بقي معلش بقي جربوها وقولولي فيها مشكلة ولا لا علشان انا معنديش كلنت اجرب بس ان شاء الله مفيش مشاكل
اول حاجه اضافة الان بي سي
#region CommanderVip
case 764733:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Do You Want Join Commander Vip Quest ");
dialog.Option("Yes , Please", 1);
dialog.Option("No Thanks", 255);
dialog.Avatar(7070);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.VIPLevel == 6)
{
CommanderVIP.join(client);
}
else
{
dialog.Text("You Need Vip Level 6");
dialog.Option("No Thanks", 255);
dialog.Send();
}
break;
}
}
break;
}
#endregion
بعد كدا هتعمل كلاس جديد وتحط فيه
using ResidentEvil.Client;
using ResidentEvil.Game;
using ResidentEvil.Network.GamePackets;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ResidentEvil
{
class CommanderVIP
{
public static Map dynamicMap;
static ushort tempX, tempY = 0;
public static void join(GameState client)
{
#region join and generatemap
dynamicMap = Kernel.Maps[(ushort)2068].MakeDynamicMap();
client.Entity.Teleport(2068, dynamicMap.ID, (ushort)Kernel.Random.Next(35, 70), (ushort)Kernel.Random.Next(35, 70));
#endregion
#region CommanderVip [Monster]
ushort MapID = dynamicMap.ID;
uint id = 41720;
for (int i = 0; i < 10; i++)
{
if (Kernel.Maps.ContainsKey(MapID))
{
ushort x = (ushort)Kernel.Random.Next(35, 70), y = (ushort)Kernel.Random.Next(35, 70);
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (var client23 in Kernel.GamePool.Values)
{
if (client23.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(client23.Entity.X, client23.Entity.Y, entity.X, entity.Y) < Constants.nScreenDistance)
{
entity.SendSpawn(client, false);
client23.Send(stringPacket);
client23.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
client23.Send(upd);
}
}
}
}
}
}
}
#endregion
}
public static void BigMonster(GameState client)
{
#region CommanderVip [Monster]
ushort MapID = client.Entity.MapID;
uint id = 41721;
if (Kernel.Maps.ContainsKey(MapID))
{
ushort x = client.Entity.X, y = client.Entity.Y;
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (var client23 in Kernel.GamePool.Values)
{
if (client23.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(client23.Entity.X, client23.Entity.Y, entity.X, entity.Y) < Constants.nScreenDistance)
{
entity.SendSpawn(client, false);
client23.Send(stringPacket);
client23.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
client23.Send(upd);
}
}
}
}
}
}
#endregion
}
}
}
بعد كدا هتروح نضيف اكواد الدروب فوق دروب اي وحش كبير زي مثلا هتبحث عن
#region SnowBanshee
حط فوقيه دول
#region CommanderVIP
if (Name == "CommanderVip")
{
killer.Owner.Inventory.Add(3304325, 0, 1);
return;
}
#endregion
#region CommanderBigBoss
#region SnowBanshee
if (Name == "CommanderBig")
{
uint ItemID = 0;
byte type1 = 25;
for (int i = 0; i < 11; i++)
{
type1 = (byte)Kernel.Random.Next(1, 11);
switch (type1)
{
#region IDs
case 1:
ItemID = 3004188;//SavageBone
break;
case 2:
ItemID = 3004188;////SavageBone
break;
case 3:
ItemID = 3009003;//Pro
break;
case 4:
ItemID = 3009003;//Pro
break;
case 5:
ItemID = 3009002;//Pro
break;
case 6:
ItemID = 3009002;//Pro
break;
case 7:
ItemID = 3009002;//Pro
break;
case 8:
ItemID = 3009002;//Pro
break;
case 9:
ItemID = 3009002;//Pro
break;
case 10:
ItemID = 723717;////5 mi
break;
case 11:
ItemID = 723717;////5 mi
break;
#endregion
}
var infos = Database.ConquerItemInformation.BaseInformations[ItemID];
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 = (ResidentEvil.Game.Enums.Color)Kernel.Random.Next( 1, 10);
floorItem.Item.ID = ItemID;
floorItem.Item.Plus = floorItem.Item.Plus;
floorItem.Item.MaximDurability = infos.Durability;
floorItem.Item.Durability = infos.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = (ushort)Kernel.Random.Next(killer.X + 0, killer.X + 15);
floorItem.Y = (ushort)Kernel.Random.Next(killer.Y + 0, killer.Y + 15);
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);
}
}
killer.ConquerPoints += 2000000;
ResidentEvil.Kernel.SendWorldMessage(new ResidentEvil.Network.GamePackets.Message("Congratulations! " + killer.Name + " has killed CommanderBigboss and Droped SavageBone To Get Random Soul Pack && 2,000,000 Cps ", Message.Center));
return;
}
#endregion
#endregion
بعد كدا روح لكلاس packethandler ابحث عن
static void useitem
أنزل وضيف ده تحت اي ايتم
#region Commander-Bag
case 3304325:
{
if (client.Inventory.Contains(3304325, 10))
{
client.Inventory.Remove(3304325, 10);
CommanderVIP.BigMonster(client);
}
else
{
client.MessageBox("You Don't Have 10 Bag");
}
break;
}
#endregion
بعد كدا في القاعده ضيف دول بي عن طريق ال consle او ضيفهم يدوي عادي في MonsterInfo
41720 CommanderVip 0 1 951 60000000 0 100 100 100 19 86 0 0 0 0 14 15 0 200 100 1 3 100000 0 0 3451130116 100 0 0 0 0 0 0 0 0 0 0 0 100 0 10000 0 0 0 0 0 0
41721 CommanderBig 0 1 1004 600000000 0 5000 5000 30000 19 86 0 0 0 0 14 15 0 400 100 1 3 100000 0 0 3451130116 100 0 0 0 0 0 0 0 0 0 0 0 100 0 10000 0 0 0 0 0 0
شايفين الاي دي ده 3304325 ده لو غيرتو باي دي اي ايتم تانيه عادي شغال زي ما انت عايز اهم حاجه تغيره في دروب الوحش و في الاضافه الي في الباكت هاندلر وشكرا
اتمني للجميع التوفيق
بناءا علي طلب zezenever تم عمل كويسته للفي اي بي وفكرتها ان كل لاعب هيجي يخشها هيخش ماب لوحده هيلاقي 10 وحوش هيقتلهم كل وحش هيوقع شنطه او توكن ده تتحكم فيها براحتك وهشرح ازاي في الاضافه وبعد ما تجمع 10 هدوس علي اي واحده فيهم هياخدهم منك و يطلعلك وحش بس قوي جدا هتخلصو هتاخد جايزه انت الي تحددها براحتك بقي معلش بقي جربوها وقولولي فيها مشكلة ولا لا علشان انا معنديش كلنت اجرب بس ان شاء الله مفيش مشاكل
اول حاجه اضافة الان بي سي
#region CommanderVip
case 764733:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Do You Want Join Commander Vip Quest ");
dialog.Option("Yes , Please", 1);
dialog.Option("No Thanks", 255);
dialog.Avatar(7070);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.VIPLevel == 6)
{
CommanderVIP.join(client);
}
else
{
dialog.Text("You Need Vip Level 6");
dialog.Option("No Thanks", 255);
dialog.Send();
}
break;
}
}
break;
}
#endregion
بعد كدا هتعمل كلاس جديد وتحط فيه
using ResidentEvil.Client;
using ResidentEvil.Game;
using ResidentEvil.Network.GamePackets;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ResidentEvil
{
class CommanderVIP
{
public static Map dynamicMap;
static ushort tempX, tempY = 0;
public static void join(GameState client)
{
#region join and generatemap
dynamicMap = Kernel.Maps[(ushort)2068].MakeDynamicMap();
client.Entity.Teleport(2068, dynamicMap.ID, (ushort)Kernel.Random.Next(35, 70), (ushort)Kernel.Random.Next(35, 70));
#endregion
#region CommanderVip [Monster]
ushort MapID = dynamicMap.ID;
uint id = 41720;
for (int i = 0; i < 10; i++)
{
if (Kernel.Maps.ContainsKey(MapID))
{
ushort x = (ushort)Kernel.Random.Next(35, 70), y = (ushort)Kernel.Random.Next(35, 70);
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (var client23 in Kernel.GamePool.Values)
{
if (client23.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(client23.Entity.X, client23.Entity.Y, entity.X, entity.Y) < Constants.nScreenDistance)
{
entity.SendSpawn(client, false);
client23.Send(stringPacket);
client23.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
client23.Send(upd);
}
}
}
}
}
}
}
#endregion
}
public static void BigMonster(GameState client)
{
#region CommanderVip [Monster]
ushort MapID = client.Entity.MapID;
uint id = 41721;
if (Kernel.Maps.ContainsKey(MapID))
{
ushort x = client.Entity.X, y = client.Entity.Y;
var Map = Kernel.Maps[MapID];
if (Database.MonsterInformation.MonsterInformations.C ontainsKey(id))
{
Database.MonsterInformation mt = Database.MonsterInformation.MonsterInformations[id];
mt.BoundX = x;
mt.BoundY = y;
Entity entity = new Entity(EntityFlag.Monster, false);
entity.MapObjType = MapObjectType.Monster;
entity.MonsterInfo = mt.Copy();
entity.MonsterInfo.Owner = entity;
entity.Name = mt.Name;
entity.MinAttack = mt.MinAttack;
entity.MaxAttack = entity.MagicAttack = mt.MaxAttack;
entity.Hitpoints = entity.MaxHitpoints = mt.Hitpoints;
entity.Defence = mt.Defence;
entity.Body = mt.Mesh;
entity.Level = mt.Level;
entity.UID = Map.EntityUIDCounter.Next;
entity.MapID = MapID;
entity.X = x;
entity.Boss = 1;
entity.Y = y;
if (x == 0 || y == 0)
{
var cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
do
{
cord = Map.RandomCoordinates();
entity.X = cord.Item1;
entity.Y = cord.Item2;
}
while (!Map.Floor[entity.X, entity.Y, MapObjectType.Monster]);
}
Map.AddEntity(entity);
Network.GamePackets._String stringPacket =
new Network.GamePackets._String(true);
stringPacket.UID = entity.UID;
stringPacket.Type = Network.GamePackets._String.Effect;
stringPacket.Texts.Add("MBStandard");
Data data = new Data(true);
data.UID = entity.UID;
data.ID = Network.GamePackets.Data.AddEntity;
data.wParam1 = entity.X;
data.wParam2 = entity.Y;
foreach (var client23 in Kernel.GamePool.Values)
{
if (client23.Map.ID == entity.MapID)
{
if (Kernel.GetDistance(client23.Entity.X, client23.Entity.Y, entity.X, entity.Y) < Constants.nScreenDistance)
{
entity.SendSpawn(client, false);
client23.Send(stringPacket);
client23.Send(data);
if (entity.MaxHitpoints > 65535)
{
Update upd = new Update(true) { UID = entity.UID };
upd.Append(Update.MaxHitpoints, entity.MaxHitpoints);
upd.Append(Update.Hitpoints, entity.Hitpoints);
client23.Send(upd);
}
}
}
}
}
}
#endregion
}
}
}
بعد كدا هتروح نضيف اكواد الدروب فوق دروب اي وحش كبير زي مثلا هتبحث عن
#region SnowBanshee
حط فوقيه دول
#region CommanderVIP
if (Name == "CommanderVip")
{
killer.Owner.Inventory.Add(3304325, 0, 1);
return;
}
#endregion
#region CommanderBigBoss
#region SnowBanshee
if (Name == "CommanderBig")
{
uint ItemID = 0;
byte type1 = 25;
for (int i = 0; i < 11; i++)
{
type1 = (byte)Kernel.Random.Next(1, 11);
switch (type1)
{
#region IDs
case 1:
ItemID = 3004188;//SavageBone
break;
case 2:
ItemID = 3004188;////SavageBone
break;
case 3:
ItemID = 3009003;//Pro
break;
case 4:
ItemID = 3009003;//Pro
break;
case 5:
ItemID = 3009002;//Pro
break;
case 6:
ItemID = 3009002;//Pro
break;
case 7:
ItemID = 3009002;//Pro
break;
case 8:
ItemID = 3009002;//Pro
break;
case 9:
ItemID = 3009002;//Pro
break;
case 10:
ItemID = 723717;////5 mi
break;
case 11:
ItemID = 723717;////5 mi
break;
#endregion
}
var infos = Database.ConquerItemInformation.BaseInformations[ItemID];
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 = (ResidentEvil.Game.Enums.Color)Kernel.Random.Next( 1, 10);
floorItem.Item.ID = ItemID;
floorItem.Item.Plus = floorItem.Item.Plus;
floorItem.Item.MaximDurability = infos.Durability;
floorItem.Item.Durability = infos.Durability;
floorItem.Item.MobDropped = true;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = ItemID;
floorItem.MapID = Owner.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = (ushort)Kernel.Random.Next(killer.X + 0, killer.X + 15);
floorItem.Y = (ushort)Kernel.Random.Next(killer.Y + 0, killer.Y + 15);
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);
}
}
killer.ConquerPoints += 2000000;
ResidentEvil.Kernel.SendWorldMessage(new ResidentEvil.Network.GamePackets.Message("Congratulations! " + killer.Name + " has killed CommanderBigboss and Droped SavageBone To Get Random Soul Pack && 2,000,000 Cps ", Message.Center));
return;
}
#endregion
#endregion
بعد كدا روح لكلاس packethandler ابحث عن
static void useitem
أنزل وضيف ده تحت اي ايتم
#region Commander-Bag
case 3304325:
{
if (client.Inventory.Contains(3304325, 10))
{
client.Inventory.Remove(3304325, 10);
CommanderVIP.BigMonster(client);
}
else
{
client.MessageBox("You Don't Have 10 Bag");
}
break;
}
#endregion
بعد كدا في القاعده ضيف دول بي عن طريق ال consle او ضيفهم يدوي عادي في MonsterInfo
41720 CommanderVip 0 1 951 60000000 0 100 100 100 19 86 0 0 0 0 14 15 0 200 100 1 3 100000 0 0 3451130116 100 0 0 0 0 0 0 0 0 0 0 0 100 0 10000 0 0 0 0 0 0
41721 CommanderBig 0 1 1004 600000000 0 5000 5000 30000 19 86 0 0 0 0 14 15 0 400 100 1 3 100000 0 0 3451130116 100 0 0 0 0 0 0 0 0 0 0 0 100 0 10000 0 0 0 0 0 0
شايفين الاي دي ده 3304325 ده لو غيرتو باي دي اي ايتم تانيه عادي شغال زي ما انت عايز اهم حاجه تغيره في دروب الوحش و في الاضافه الي في الباكت هاندلر وشكرا
اتمني للجميع التوفيق