or you could just make it work like /item BuriedBlade Super 12 7 255 13 13 Free
if (Cmd[0] == "/item")
{
uint ID = 0;
foreach (DatabaseItem DI in Database.DatabaseItems.Values)
if (DI.Name == Cmd[1])
{
ID = DI.ID;
Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
Game.Item.ItemQuality Quality = e.Quality;
if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
if (e.Quality == Quality)
break;
}
if (ID != 0 && GC.MyChar.Inventory.Count < 40)
{
Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
Game.Item.ItemQuality Quality = e.Quality;
bool change = true;
if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
else change = false;
if (change)
e.QualityChange(Quality);
ID = e.ToID();
if (!Database.DatabaseItems.ContainsKey(ID))
{
return;
}
Game.Item I = new NewestCOServer.Game.Item();
if (e.Part(0, 2) == 11 || e.Part(0, 2) == 13 || e.Part(0, 3) == 123 || e.Part(0, 3) == 141 || e.Part(0, 3) == 142)
I.Color = NewestCOServer.Game.Item.ArmorColor.Orange; if(Cmd.Length > 8 && Cmd[8].ToLower() == "free" || Cmd[8].ToLower() == "bound")
I.FreeItem = true;
I.ID = ID;
I.UID = (uint)Program.Rnd.Next(10000000);
try
{
I.MaxDur = I.DBInfo.Durability;
I.CurDur = I.MaxDur;
}
catch (Exception Exc) { Program.WriteLine(Exc); }
try
{
I.Plus = byte.Parse(Cmd[3]);
}
catch { }
try
{
I.Bless = byte.Parse(Cmd[4]);
}
catch { }
try
{
I.Enchant = byte.Parse(Cmd[5]);
}
catch { }
try
{
I.Soc1 = (Game.Item.Gem)byte.Parse(Cmd[6]);
}
catch { }
try
{
I.Soc2 = (Game.Item.Gem)byte.Parse(Cmd[7]);
}
catch { }
//I.Effect = NewestCOServer.Game.Item.RebornEffect.None; // <-- no use
[RELEASE]Level 135 item (5165) 01/02/2011 - CO2 PServer Guides & Releases - 27 Replies WARNING: I have taken this from another forum and do NOT hit +thanks, Thanks
Well guys i got these 135+ items for all classes and i thot id be nice and release them here this is for 5165 client http://www.*************/forum/images/smilies/smil e.gif hope you guys like it
Download: Multiupload.com - upload your files to multiple file hosting sites!
Allso check out the screen shots below
[Release] /pwn command for 5165 09/28/2010 - CO2 PServer Guides & Releases - 10 Replies Have you ever encountered a very disruptive/annoying player, but don't wanna ban him? USE THIS.
#region /pwn
if (Cmd == "/pwn")
{
Game.Character C = Game.World.CharacterFromName(Cmd);
if (C != null)
{
C.Level = 1; // Makes player back to level 1.
C.Experience = 0;
[Request]Add Bound item 05/13/2010 - CO2 Private Server - 3 Replies I need the code for a npc that give bound items...it would be like GC.MyChar.AddItem(723753);
but what is the right code to give the items (bound)?
I will press thanks for anybody helps me
[Release]5165 /model command 03/22/2010 - CO2 PServer Guides & Releases - 8 Replies idk if this has been posted yet but here it goes
Place this in Chat.cs below this code
To use it, just type
[Release] Item dropping (for events/gm command) 01/16/2010 - CO2 PServer Guides & Releases - 10 Replies So I was bored and figured I might finish my random event code for 1.0 and in the process realized just how much better alot of what I had could be written so I'm in the process of re-writing it all to use voids, switch and all that good stuff.
During that, for my random drop event I decided to write a little command/void to handle dropping items. This can be used however you wish. Maybe you want a gm command to drop x number of db's in twin city, a random event or anything else you want...