Register for your free account! | Forgot your password?

You last visited: Today at 11:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



comand

Discussion on comand within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 103
Received Thanks: 0
comand

can any one change this comand /item itemname super 12 7 255 13 13 to ( /item Item-ID 12 7 255 13 13 ) please

thnx in advaince
mmno is offline  
Old 02/11/2013, 18:50   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
If you can't do this yourself then start to learn coding, because you got everything needed right in front of you...
Super Aids is offline  
Old 02/11/2013, 19:45   #3
 
elite*gold: 0
Join Date: Sep 2009
Posts: 103
Received Thanks: 0
some one told me to change this " string ItemName = Data[1]; " to ( string ItemID = Data[1]; )

is that right?...
mmno is offline  
Old 02/11/2013, 23:14   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Think about the problem you're having right now...

Currently the command is accepting a string (text) input to let you pick via an item name. You want it to instead accept a int/uint (number) to let you pick an item via ItemID.


first step will be trying to read the item ID from command.



uint itemID = uint.Parse(Data[1]);

Note: This will throw an exception if you do NOT enter a number in the command. As such it's best to either verify that it's a number you're converting or catch the exception before continuing.


Once this is done then you need to try to look up the item information based on ID instead of name.

You should be able to do this via something like...

if(ConquerBaseItemInformations.ContainsKey(ItemID) )
{
//pull Item info and continue generating the item.
}



Keep in mind you won't need any of the quality checks anymore as each item quality has a different ID.
pro4never is offline  
Thanks
2 Users
Old 02/12/2013, 01:56   #5
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
that's from the first source i ever used for nextco
you may only do something like
@item id
and it will try to give you any available quality
or @item id quality pla pla pla
and it will give you a certain quality
Code:
#region items
                            case "item":
                                {
                                    if (Data.Length < 3)
                                    {
                                        string ItemName = Data[1];
                                            Database.ConquerItemBaseInformation CIBI2 = null;
                                            foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values)
                                            {
                                                if (infos.ID == Convert.ToUInt32(Data[1]))
                                                {
                                                    CIBI2 = infos;
                                                }
                                            }
                                            Game.Enums.ItemQuality Quality2 = Game.Enums.ItemQuality.Fixed;
                                            Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true);
                                            newItem.ID = Convert.ToUInt32(Data[1]);
                                            newItem.UID = GamePackets.ConquerItem.ItemUID.Next;
                                            newItem.Durability = CIBI2.Durability;
                                            newItem.MaximDurability = CIBI2.Durability;
                                            newItem.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8);
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
                                            if (Data.Length == 2)
                                            {
                                                for (int i = 0; i < (Convert.ToInt32(Data[2])); i++)
                                                {
                                                    client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
                                                }
                                            }
                                            Quality2 = Game.Enums.ItemQuality.Normal;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.NormalV1;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.NormalV2;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.NormalV3;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.Refined;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.Unique;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.Elite;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);

                                            Quality2 = Game.Enums.ItemQuality.Super;
                                            client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
                                    }
                                    if (Data.Length > 2)
                                    {
                                        string ItemName = Data[1];
                                        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;
                                        }
                                        Database.ConquerItemBaseInformation CIBI = null;
                                        foreach (Database.ConquerItemBaseInformation infos in Database.ConquerItemInformation.BaseInformations.Values)
                                        {
                                            if (infos.Name.ToLower() == ItemName.ToLower() && Quality == (Game.Enums.ItemQuality)(infos.ID % 10))
                                            {
                                                CIBI = infos;
                                            }
                                        }
                                        if (CIBI == null)
                                            break;
                                        Interfaces.IConquerItem newItem = new GamePackets.ConquerItem(true);
                                        newItem.ID = CIBI.ID;
                                        newItem.UID = GamePackets.ConquerItem.ItemUID.Next;
                                        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 = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(4, 8);
                                        client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
                                    }
                                    break;
                                }
                                #endregion
go for it is offline  
Thanks
1 User
Old 02/12/2013, 05:39   #6
 
elite*gold: 0
Join Date: Sep 2009
Posts: 103
Received Thanks: 0
thnx you " go for it " im vary thnxfully to you , you do help too much and also " pro4ever " ^_^


PS: i try to use it and it fine... but can you tell me how to i get " 720615@@+3PassionSteedPack " each time i try to get it , i can use the pack to get it... ( i didnt test it on all item but on steed for now latter i will test it on others. )


thnx in advance
mmno is offline  
Old 02/12/2013, 07:15   #7
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
you mean you always get the pack not the steed inside the pack ?
you want to get the steed from the steedpack id which is not going to happen , you should use the steed id not the pack id
steed id is 300000 (uncolored steed) , you should try with trail and error to get certain color

that's how you color it
at the item command i gave you there is a section where it's saying
Code:
                                                        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));
                                                        }
that's how you color it , those 3 variables R G B
some rare colors i found in an edited trinity
Code:
nightmare 150 150 50
FrostBite 62 63 184
Spotted 147 134 122
BlazeHoof 148 156 137
Zebra 142 39 46
and here is a full command
Code:
@item Steed Quality(which is fixed) +PLUS 0 0 0 0 R G B
and to fit my method it should be
Code:
@item 300000 Fixed +PLUS BLESS Enchant SocketOne SocketTwo R G B
go for it is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Comand´s minecraft
03/03/2011 - Minecraft - 12 Replies
Hey leute wie füg ich comad hinzu ? z.b.w jumpto oder so? hat wer ne anleitung wäre nett
help with a comand
04/14/2010 - Dekaron - 1 Replies
is there a comand for blocking incoming pm's?cuz my friends told me it is but they dont know it,plss help me tell it 2 me:D
[HELP] GW end Comand
12/30/2009 - CO2 Private Server - 16 Replies
how make comand for end gw? I try this but dont work, what do wrong? if (Cmd == "/gwend" && !Features.GuildWars.War) Features.GuildWars.EndWar();



All times are GMT +1. The time now is 11:02.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.