Hey guys, I was wondering if someone could help me make it so normal players can use /item , but it was limited to +9. im making a pvp server and i dont want every1 to get +12s with this command, so if u can help it b appreciated =)
Here is the original command:
Here is the original command:
Code:
if (Splitter[0] == "/item")
{
Ini ItemNames = new Ini(System.Windows.Forms.Application.StartupPath + @"\ItemNamesToId.ini");
string ItemName = Splitter[2];
string ItemQuality = Splitter[1];
byte Plus = byte.Parse(Splitter[3]);
byte Bless = byte.Parse(Splitter[4]);
byte Enchant = byte.Parse(Splitter[5]);
byte Soc1 = byte.Parse(Splitter[6]);
byte Soc2 = byte.Parse(Splitter[7]);
uint ItemId = 0;
ItemId = uint.Parse(ItemNames.ReadValue("Items", ItemName));
if (ItemId == 0)
return;
byte Quality = 1;
if (ItemQuality == "One")
Quality = 1;
else if (ItemQuality == "Normal")
Quality = 5;
else if (ItemQuality == "Unique")
Quality = 7;
else if (ItemQuality == "Refined")
Quality = 6;
else if (ItemQuality == "Elite")
Quality = 8;
else if (ItemQuality == "Super")
Quality = 9;
else
Quality = (byte)Other.ItemQuality(ItemId);
ItemId = Other.ItemQualityChange(ItemId, Quality);
if (MyChar.ItemsInInventory < 40)
MyChar.AddItem(ItemId.ToString() + "-" + Plus.ToString() + "-" + Bless.ToString() + "-" + Enchant.ToString() + "-" + Soc1.ToString() + "-" + Soc2.ToString(), 0, (uint)General.Rand.Next(57458353));
}