|
المشاركات 1,941 |
+التقييم 0.98 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
if (client.Account.State == Database.AccountTable.AccountState.Administrator)
{
if (client.Account.State == 3)
{
switch (Data[0])
{
case "WindwalkerTop":
{
client.Player.AddFlag4((ulong)Network.GamePackets.MsgUpdate.Flags4.WindwalkerTop);
break;
}
case "removetop":
{
client.Player.RemoveTopStatus(ulong.Parse(Data[1]), byte.Parse(Data[1]));
break;
}
case "reloadmobs":
{
client.Map.FreezeMonsters = true;
var Clone = client.Map.Entities.Values.ToArray();
foreach (var mob in Clone)
if (!mob.Companion)
{
client.Map.Floor[mob.X, mob.Y, Game.MapObjectType.Monster, mob] = true;
client.Map.Entities.Remove(mob.UID);
}
Clone = new Game.Player[0];
client.Map.EntityUIDCounter.Now = 400000;
client.Map.LoadMonsters();
client.Map.FreezeMonsters = false;
foreach (GameState Client in Server.GamePool)
{
if (Client.Map.ID == client.Map.ID)
{
Client.Player.Teleport(Client.Player.MapID, Client.Player.X, Client.Player.Y);
}
}
break;
}
case "mobmesh":
{
client.Player.Body = ushort.Parse(Data[1]);
break;
}
case "trace":
{
foreach (var pClient in Server.GamePool)
{
string name = pClient.Player.LoweredName;
if (name.Contains(Data[1]))
{
client.Player.Teleport(pClient.Player.MapID, pClient.Player.X, pClient.Player.Y);
}
}
break;
}
case "bring":
{
foreach (var pClient in Server.GamePool)
{
if (pClient.Player.LoweredName.Contains(Data[1]) || Data[1].ToLower() == "all")
if (Data[1].ToLower() == "all")
{
pClient.Player.Teleport(client.Player.MapID,
(ushort)Kernel.Random.Next(client.Player.X - 5, client.Player.X + 5),
(ushort)Kernel.Random.Next(client.Player.Y - 5, client.Player.Y + 5));
}
else
pClient.Player.Teleport(client.Player.MapID, client.Player.X, client.Player.Y);
}
break;
}
case "restart":
{
Server.Save();
Server.CommandsAI("@restart");
break;
}
case "kick":
{
foreach (var Client in Server.GamePool)
{
if (Client.Player.LoweredName.Contains(Data[1]))
{
Client.Disconnect();
break;
}
}
break;
}
case "ban":
{
foreach (var Client in Server.GamePool)
{
//if (Client.Account.State >= client.Account.State) continue;
if (Client.Player.LoweredName.Contains(Data[1]))
{
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Client.Disconnect();
Kernel.SendWorldMessage(new MsgTalk(client.Account.State.ToString() + " " + client.Player.Name + " has banned the player " + Client.Player.Name, GamePackets.MsgTalk.Center));
break;
}
}
break;
}
case "save1":
{
Server.Save();
break;
}
case "unban":
{
var Account = new Database.AccountTable(Data[1]);
if (Account.State == Database.AccountTable.AccountState.Banned)
{
Account.State = Database.AccountTable.AccountState.Player;
Account.SaveState();
}
break;
}
case "Mac":
{
var macAddr = (from nic in NetworkInterface.GetAllNetworkInterfaces()
where nic.OperationalStatus == OperationalStatus.Up
select nic.GetPhysicalAddress().ToString()).FirstOrDefault();
Console.Write(macAddr);
break;
}
case "banip":
{
string bannedIP = "";
foreach (var Client in Server.Values)
{
//if (Client.Account.State >= client.Account.State)
// continue;
if (Client.Player.LoweredName.Contains(Data[1]))
{
bannedIP = Client.Account.IP;
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Database.IPBan.Ban(Client.Account.IP);
Client.Disconnect();
break;
}
}
if (bannedIP == "")
//Kernel.SendWorldMessage(new MsgTalk(client.Account.State.ToString() + " " + client.Player.Name + " has banned the IP: " + bannedIP, GamePackets.Message.Center));
foreach (var Client in Server.Values)
{
if (Client.Account.State >= client.Account.State)
continue;
if (Client.Account.IP == bannedIP)
{
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Client.Disconnect();
}
}
break;
}
/* case "banip":
{
string bannedIP = "";
foreach (var Client in Server.GamePool)
{
if (Client.Account.State >= client.Account.State)
continue;
if (Client.Player.LoweredName.Contains(Data[1]))
{
bannedIP = Client.Account.IP;
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Database.IPBan.Ban(Client.Account.IP);
Client.Disconnect();
break;
}
}
if (bannedIP == "")
Kernel.SendWorldMessage(new MsgTalk(client.Account.State.ToString() + " " + client.Player.Name + " has banned the IP: " + bannedIP, GamePackets.MsgTalk.Center));
foreach (var Client in Server.GamePool)
{
if (Client.Account.State >= client.Account.State)
continue;
if (Client.Account.IP == bannedIP)
{
Client.Account.State = Database.AccountTable.AccountState.Banned;
Client.Account.SaveState();
Client.Disconnect();
}
}
break;
}*/
case "unbanip":
{
Database.IPBan.Unban(Data[1]);
break;
}
case "chatban":
{
foreach (var Client in Server.GamePool)
{
if (Client.Player.Name.Contains(Data[1]))
{
Client.ChatBanLasts = uint.Parse(Data[2]);
Client.ChatBanTime = DateTime.Now;
Client.ChatBanned = true;
}
}
break;
}
case "a7a88":
{
client.Send(new MsgTalk("Welcome in Rangers", uint.Parse(Data[1])));
break;
}
case "whois":
{
foreach (var pClient in Server.GamePool)
{
if (pClient == null) continue;
if (pClient.Player.LoweredName == Data[1])
{
client.Send(new MsgTalk("[Whois " + pClient.Player.Name + "]", System.Drawing.Color.Red, GamePackets.MsgTalk.FirstRightCorner));
client.Send(new MsgTalk("Username: " + pClient.Account.Username, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
if (client.Account.State == Database.AccountTable.AccountState.Administrator)
client.Send(new MsgTalk("Password: " + pClient.Account.Password, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("IP: " + pClient.Account.IP, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("Location: " + pClient.Account.EarthAdress, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("CPs: " + pClient.Player.ConquerPoints, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("Money: " + pClient.Player.Money, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("BP: " + pClient.Player.BattlePower, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("Map: [" + pClient.Player.MapID + "] " + pClient.Player.X + "," + pClient.Player.Y, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
client.Send(new MsgTalk("Attack range: " + pClient.Player.AttackRange, System.Drawing.Color.Red, GamePackets.MsgTalk.ContinueRightCorner));
}
}
return true;
}
case "increaseexp":
{
client.IncreaseExperience(ulong.Parse(Data[1]), true);
break;
}
case "chatunban":
{
foreach (var Client in Server.GamePool)
{
if (Client.Player.Name.Contains(Data[1]))
{
Client.ChatBanned = false;
}
}
break;
}
case "bc":
{
Game.ConquerStructures.Broadcast.Broadcasts.Clear();
Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new Game.ConquerStructures.Broadcast.BroadcastStr();
broadcast.EntityID = client.Player.UID;
broadcast.EntityName = client.Player.Name;
broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next;
broadcast.Message = message_.Remove(0, 2);
Kernel.SendWorldMessage(new MsgTalk(message_.Remove(0, 2), "ALLUSERS", client.Player.Name, System.Drawing.Color.Red, GamePackets.MsgTalk.BroadcastMessage, Game.ConquerStructures.Broadcast.CurrentBroadcast.UnionTitle), Server.GamePool);
Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1;
Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast;
break;
}
case "broadcast":
{
Game.ConquerStructures.Broadcast.Broadcasts.Clear();
Game.ConquerStructures.Broadcast.BroadcastStr broadcast = new Game.ConquerStructures.Broadcast.BroadcastStr();
broadcast.EntityID = client.Player.UID;
broadcast.EntityName = client.Player.Name;
broadcast.ID = Game.ConquerStructures.Broadcast.BroadcastCounter.Next;
broadcast.Message = message_.Remove(0, 9);
Kernel.SendWorldMessage(new MsgTalk(message_.Remove(0, 9), "ALLUSERS", client.Player.Name, System.Drawing.Color.Red, GamePackets.MsgTalk.BroadcastMessage, Game.ConquerStructures.Broadcast.CurrentBroadcast.UnionTitle), Server.GamePool);
Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID = 1;
Game.ConquerStructures.Broadcast.CurrentBroadcast = broadcast;
break;
}
case "ann":
{
Kernel.SendWorldMessage(new MsgTalk("[Announce] by " + client.Player.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, GamePackets.MsgTalk.Center), Server.GamePool);
Kernel.SendWorldMessage(new MsgTalk("[Announce] by " + client.Player.Name + ": " + Mess.Remove(0, 3), System.Drawing.Color.Red, GamePackets.MsgTalk.World), Server.GamePool);
break;
}
case "announce":
{
Kernel.SendWorldMessage(new MsgTalk("[Announce] by " + client.Player.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, GamePackets.MsgTalk.Center), Server.GamePool);
Kernel.SendWorldMessage(new MsgTalk("[Announce] by " + client.Player.Name + ": " + Mess.Remove(0, 8), System.Drawing.Color.Red, GamePackets.MsgTalk.World), Server.GamePool);
break;
}
case "arenapoints":
{
client.ArenaStatistic.ArenaPoints = uint.Parse(Data[1]);
client.ArenaStatistic.Send(client);
break;
}
case "record":
{
if (client.Account.State != Database.AccountTable.AccountState.Administrator)
break;
switch (Data[1])
{
case "on": client.Player.Mode = Game.Enums.Mode.Recording; break;
case "off": Server.CommandsAI("/saverecord"); break;
} break;
}
case "a7a":
{
MsgItemInfo[] inventory = new MsgItemInfo[client.Inventory.Objects.Length];
client.Inventory.Objects.CopyTo(inventory, 0);
foreach (MsgItemInfo item in inventory)
{
client.Inventory.Remove(item, Game.Enums.ItemUse.Remove);
}
break;
}
case "find":
{
foreach (var pClient in Kernel.GamePool.Values)
{
if (pClient.Player.Name.ToLower().Contains(Data[1]))
{
client.Player.Teleport(pClient.Player.MapID, pClient.Player.X, pClient.Player.Y);
}
}
break;
}
case "superhero":
{
client.Player.Defence = ushort.MaxValue;
client.Player.MagicDefence = ushort.MaxValue / 2;
client.Player.MagicDefence = ushort.MaxValue / 2;
client.Player.Dodge = byte.MaxValue;
client.Player.Vigor = ushort.MaxValue;
client.Player.ExtraVigor = ushort.MaxValue;
client.Player.MagicAttack = uint.MaxValue / 2;
client.Player.MagicAttack = uint.MaxValue / 2;
client.Player.WoodResistance = ushort.MaxValue;
client.Player.FireResistance = ushort.MaxValue;
client.Player.WaterResistance = ushort.MaxValue;
client.Player.EarthResistance = ushort.MaxValue;
client.Player.Breaktrough = ushort.MaxValue;
client.Player.CriticalStrike = ushort.MaxValue;
client.Player.Immunity = ushort.MaxValue;
client.Player.Penetration = ushort.MaxValue;
client.Player.Counteraction = ushort.MaxValue;
client.Player.Block = ushort.MaxValue;
client.Player.Detoxication = ushort.MaxValue;
client.Player.Intensification = ushort.MaxValue;
client.Player.Penetration = ushort.MaxValue;
client.Player.SkillCStrike = ushort.MaxValue;
client.Player.MaxAttack = uint.MaxValue;
client.Player.MinAttack = uint.MaxValue;
client.Player.PhysicalDamageDecrease = ushort.MaxValue;
client.Player.MagicDamageDecrease = ushort.MaxValue;
client.Player.MagicDamageIncrease = ushort.MaxValue;
client.Player.PhysicalDamageIncrease = ushort.MaxValue;
client.Player.MagicDefencePercent = ushort.MaxValue;
client.Player.ItemHP = ushort.MaxValue;
client.Player.ItemMP = ushort.MaxValue;
client.Player.ItemBless = ushort.MaxValue;
client.Player.AttackRange = ushort.MaxValue;
client.Player.BaseMinAttack = uint.MaxValue;
client.Player.BaseMaxAttack = uint.MaxValue;
client.Player.BaseMagicDefence = uint.MaxValue;
client.Player.BaseDefence = ushort.MaxValue;
client.Player.MagicDamageIncrease = ushort.MaxValue;
client.Player.MaxHitpoints = uint.MaxValue;
//client.Player.Hitpoints = uint.MaxValue;
break;
}
case "online":
{
client.Send(new MsgTalk("Online players count: " + Kernel.GamePool.Count, System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
string line = "";
foreach (GameState pClient in Server.GamePool)
line += pClient.Player.Name + ",";
if (line.Length >= 255) return true;
client.Send(new GamePackets.MsgTalk(line, System.Drawing.Color.Beige, GamePackets.MsgTalk.Talk));
break;
}
case "reallot":
{
if (client.Player.Reborn != 0)
{
client.Player.Agility = 0;
client.Player.Strength = 0;
client.Player.Vitality = 1;
client.Player.Spirit = 0;
if (client.Player.Reborn == 1)
{
client.Player.Atributes = (ushort)(client.ExtraAtributePoints(client.Player.FirstRebornLevel, client.Player.FirstRebornLevel)
+ 52 + 3 * (client.Player.Level - 15));
}
else
{
client.Player.Atributes = (ushort)(client.ExtraAtributePoints(client.Player.FirstRebornLevel, client.Player.FirstRebornClass) +
client.ExtraAtributePoints(client.Player.SecondRebornLevel, client.Player.SecondRebornClass) + 52 + 3 * (client.Player.Level - 15));
}
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "str":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Player.Atributes >= atr)
{
client.Player.Strength += atr;
client.Player.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "agi":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Player.Atributes >= atr)
{
client.Player.Agility += atr;
client.Player.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "vit":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Player.Atributes >= atr)
{
client.Player.Vitality += atr;
client.Player.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "spi":
{
ushort atr = 0;
ushort.TryParse(Data[1], out atr);
if (client.Player.Atributes >= atr)
{
client.Player.Spirit += atr;
client.Player.Atributes -= atr;
client.CalculateStatBonus();
client.CalculateHPBonus();
}
break;
}
case "reborns":
{
client.Player.Reborn = byte.Parse(Data[1]);
break;
}
case "reborn":
{
if (client.Player.Reborn < 2)
{
if (client.Player.Class % 10 == 5)
{
if (client.Player.Class != 15 &&
client.Player.Class != 25 &&
client.Player.Class != 45 &&
client.Player.Class != 55 &&
client.Player.Class != 65 &&
client.Player.Class != 75 &&
client.Player.Class != 135 &&
client.Player.Class != 165 &&
client.Player.Class != 145)
{
client.Send(new MsgTalk("You need to be an existing class.", System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
}
else
{
byte newclass = 10;
byte.TryParse(Data[1], out newclass);
if (newclass != 11 &&
newclass != 21 &&
newclass != 41 &&
newclass != 51 &&
newclass != 61 &&
newclass != 71 &&
newclass != 132 &&
newclass != 161 &&
newclass != 142)
{
client.Send(new MsgTalk("You need to reborn into an existing class. For fire class = 142 and for waters class = 132.", System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
}
else
{
if (!client.Reborn(newclass))
client.Send(new MsgTalk("You need atleast 2 spaces in your inventory.", System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
}
}
}
else
client.Send(new MsgTalk("You need to be a master to be able to reborn.", System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
}
else
client.Send(new MsgTalk("You can't reborn any more.", System.Drawing.Color.BurlyWood, GamePackets.MsgTalk.TopLeft));
break;
}
case "dc":
{
client.Disconnect();
break;
}
case "prof":
{
Interfaces.IProf proficiency = new GamePackets.MsgWeaponSkill(true);
if (Data.Length > 1)
proficiency.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
proficiency.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
proficiency.Experience = uint.Parse(Data[3]);
client.AddProficiency(proficiency);
break;
}
case "spellr":
{
client.RemoveSpell(new MsgMagicInfo(true)
{
ID = ushort.Parse(Data[1])
});
break;
}
case "spell":
{
ISkill spell = new MsgMagicInfo(true);
if (Data.Length > 1)
spell.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
spell.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
spell.Experience = uint.Parse(Data[3]);
client.AddSpell(spell);
break;
}
case "level":
{
byte level = client.Player.Level;
byte.TryParse(Data[1], out level);
level = Math.Min((byte)255, Math.Max((byte)1, level));
client.Player.Level = level;
client.Player.Experience = 0;
{
Database.DataHolder.GetStats(client.Player.Class, level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
case "class":
{
byte _class = client.Player.Class;
byte.TryParse(Data[1], out _class);
_class = Math.Min((byte)165, Math.Max((byte)1, _class));
client.Player.Class = _class;
if (client.Player.Reborn == 0)
{
Database.DataHolder.GetStats(_class, client.Player.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
case "body":
{
ushort body = client.Player.Body;
ushort.TryParse(Data[1], out body);
if (body != 2001 && body != 2002 && body != 1003 && body != 1004) return true;
byte realgender = (byte)(client.Player.Body % 10);
byte gender = (byte)(body % 10);
if (client.Equipment.Objects[8] != null)
if (gender >= 3 && realgender <= 2)
return true;
client.Player.Body = body;
if (gender >= 3 && realgender <= 2)
client.Player.Face -= 200;
if (gender <= 2 && realgender >= 3)
client.Player.Face += 200;
break;
}
case "hair":
{
ushort hair = client.Player.HairStyle;
ushort.TryParse(Data[1], out hair);
client.Player.HairStyle = hair;
break;
}
case "map":
{
client.Send(new MsgTalk("Map: " + client.Map.ID, System.Drawing.Color.Blue, GamePackets.MsgTalk.TopLeft));
break;
}
case "inv":
{
if (client.Player.Invisable)
{
client.Player.Invisable = false;
client.SendScreenSpawn(client.Player, true);
}
else
{
client.Player.Invisable = true;
client.RemoveScreenSpawn(client.Player, true);
}
break;
}
case "tele":
{
if (Data.Length > 3)
{
client.Player.Teleport(ushort.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3]));
}
break;
}
case "tele2":
{
if (Data.Length > 3)
{
client.Player.TeleportHouse(ushort.Parse(Data[1]), ushort.Parse(Data[2]), ushort.Parse(Data[3]));
}
break;
}
case "transform":
{
if (client.Player.Dead) break;
bool wasTransformated = client.Player.Transformed;
if (wasTransformated)
{
client.Player.Hitpoints = client.Player.MaxHitpoints;
client.Player.TransformationID = 0;
client.Player.TransformationStamp = Time32.Now;
return true;
}
ushort transformation = client.Player.TransformationID;
ushort.TryParse(Data[1], out transformation);
client.Player.TransformationID = transformation;
client.Player.TransformationStamp = Time32.Now;
client.Player.TransformationTime = 110;
MsgMagicEffect spellUse = new MsgMagicEffect(true);
spellUse.Attacker = client.Player.UID;
spellUse.SpellID = 1360;
spellUse.SpellLevel = 4;
spellUse.X = client.Player.X;
spellUse.Y = client.Player.Y;
spellUse.AddTarget(client.Player.UID, (uint)0, null);
client.Send(spellUse);
client.Player.TransformationMaxHP = 3000;
double maxHP = client.Player.MaxHitpoints;
double HP = client.Player.Hitpoints;
double point = HP / maxHP;
client.Player.Hitpoints = (uint)(client.Player.TransformationMaxHP * point);
client.Player.Update((byte)MsgUpdate.DataType.MaxHitpoints, client.Player.TransformationMaxHP, false);
break;
}
case "effects":
{
client.Player.Update(MsgName.Mode.Effect, Data[1], true);
break;
}
case "nflag":
{
client.Player.nAddFlag(int.Parse(Data[1]));
break;
}
case "flag3":
{
client.Player.AddFlag3((ulong)1UL << (int.Parse(Data[1])));
break;
}
case "flag4":
{
client.Player.AddFlag4((ulong)1UL << (int.Parse(Data[1])));
break;
}
case "flag2":
{
client.Player.AddFlag2((ulong)1UL << (int.Parse(Data[1])));
break;
}
case "flag":
{
client.Player.AddFlag((ulong)1UL << (int.Parse(Data[1])));
break;
}
case "item":
{
if (Data.Length > 2)
{
string ItemName = Data[1].ToLower();
Game.Enums.ItemQuality Quality = Game.Enums.ItemQuality.Fixed;
switch (Data[2].ToLower())
{
case "fixed": Quality = Game.Enums.ItemQuality.Fixed; break;
case "normal": Quality = Game.Enums.ItemQuality.Normal; break;
case "normalv1": Quality = Game.Enums.ItemQuality.NormalV1; break;
case "normalv2": Quality = Game.Enums.ItemQuality.NormalV2; break;
case "normalv3": Quality = Game.Enums.ItemQuality.NormalV3; break;
case "refined": Quality = Game.Enums.ItemQuality.Refined; break;
case "unique": Quality = Game.Enums.ItemQuality.Unique; break;
case "elite": Quality = Game.Enums.ItemQuality.Elite; break;
case "super": Quality = Game.Enums.ItemQuality.Super; break;
case "other": Quality = Game.Enums.ItemQuality.Other; break;
default:
{
Quality = (Game.Enums.ItemQuality)int.Parse(Data[2]);
break;
}
}
Database.ConquerItemBaseInformation CIBI = null;
foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values)
{
if (infos.LoweredName == ItemName && Quality == (Game.Enums.ItemQuality)(infos.ID % 10))
{
CIBI = infos;
}
}
if (CIBI == null)
break;
MsgItemInfo newItem = new GamePackets.MsgItemInfo(true);
newItem.ID = CIBI.ID;
newItem.Durability = CIBI.Durability;
newItem.MaximDurability = CIBI.Durability;
if (Data.Length > 3)
{
byte plus = 0;
byte.TryParse(Data[3], out plus);
newItem.Plus = Math.Min((byte)12, plus);
if (Data.Length > 4)
{
byte bless = 0;
byte.TryParse(Data[4], out bless);
newItem.Bless = Math.Min((byte)7, bless);
if (Data.Length > 5)
{
byte ench = 0;
byte.TryParse(Data[5], out ench);
newItem.Enchant = Math.Min((byte)255, ench);
if (Data.Length > 6)
{
byte soc1 = 0;
byte.TryParse(Data[6], out soc1);
if (Enum.IsDefined(typeof(Game.Enums.Gem), soc1))
{
newItem.SocketOne = (Game.Enums.Gem)soc1;
}
if (Data.Length > 7)
{
byte soc2 = 0;
byte.TryParse(Data[7], out soc2);
if (Enum.IsDefined(typeof(Game.Enums.Gem), soc2))
{
newItem.SocketTwo = (Game.Enums.Gem)soc2;
}
}
if (Data.Length > 10)
{
byte R = 0, G = 0, B = 0;
byte.TryParse(Data[8], out R);
byte.TryParse(Data[9], out G);
byte.TryParse(Data[10], out B);
newItem.SocketProgress = (uint)(B | (G << 8) | (R << 16));
}
}
}
}
}
newItem.Color = (Game.Enums.Color)Kernel.Random.Next(4, 8);
if (client.Account.State == Database.AccountTable.AccountState.Administrator)
newItem.Bound = true;
client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
client.Send("Item ID " + newItem.ID);
}
break;
}
case "gui99":
{
MsgAction data = new MsgAction(true);
data.ID = (MsgAction.Mode)116;
data.UID = client.Player.UID;
data.TimeStamp = Time32.Now;
data.dwParam = 3264;
client.Send(data);
break;
}
case "booth":
{
client.Send(new MsgMapInfo() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[1036].Status });
client.Booth = new Game.ConquerStructures.Booth(client, new MsgAction(true) { UID = client.Player.UID });
client.Send(new MsgAction(true) { ID = MsgAction.Mode.ChangeAction, UID = client.Player.UID, dwParam = 0 });
break;
}
}
return true;
}
الذين يشاهدون محتوى الموضوع الآن : 2 ( الأعضاء 0 والزوار 2) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
شفرات 2020 منى انا وبس | Mr. Co | تطوير سيرفرات كونكر | 0 | 2020-03-24 11:42 AM |
عمل شفراة محدودة للبي ام | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-01-30 01:08 PM |
شفرات محدودة | nova | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-09-16 08:15 PM |
مشكلة ف شفرات الجي ام | Adel Abd El Hay | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-05-11 12:17 AM |
بخصوص موضع شفرات محدوده لي pm | Hassan Emprator | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-04-20 09:46 PM |