Register for your free account! | Forgot your password?

You last visited: Today at 11:57

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

Advertisement



Help please

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

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 45
Received Thanks: 3
Help please

Alright.
I'm trying to add a new item and i'm coding it in character.cs, so when I right click the item it will give me gear.
Listen, here is the code i'm using.
AddItem(150249, 9, 12, 7, 255, 13, 13);AddItem, is getting the method from here:
Code:
private void AddItem(int p, int p_2, int p_3, int p_4, int p_5, int p_6, int p_7)
        {
            throw new NotImplementedException();
        }
How can I change it so that it get's the method from here:
Code:
public void AddItemf(uint ID, byte Plus, byte bless, byte ench, Item.Gem soc1, Item.Gem soc2)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;
            I.Enchant = ench;
            I.Bless = bless;
            I.Soc1 = soc1;
            I.Soc2 = soc2;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
Thanks in advance.
KinG^PlutO is offline  
Old 05/05/2010, 03:05   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 50
Quote:
Originally Posted by KinG^PlutO View Post
Alright.
I'm trying to add a new item and i'm coding it in character.cs, so when I right click the item it will give me gear.
Listen, here is the code i'm using.
AddItem(150249, 9, 12, 7, 255, 13, 13);AddItem, is getting the method from here:
Code:
private void AddItem(int p, int p_2, int p_3, int p_4, int p_5, int p_6, int p_7)
        {
            throw new NotImplementedException();
        }
How can I change it so that it get's the method from here:
Code:
public void AddItemf(uint ID, byte Plus, byte bless, byte ench, Item.Gem soc1, Item.Gem soc2)
        {
            Item I = new Item();
            I.Plus = Plus;
            I.ID = ID;
            I.UID = (uint)Rnd.Next(10000000);
            I.MaxDur = I.DBInfo.Durability;
            I.CurDur = I.MaxDur;
            I.Enchant = ench;
            I.Bless = bless;
            I.Soc1 = soc1;
            I.Soc2 = soc2;

            if (I.UID == 0)
            {
                I.UID = (uint)Rnd.Next(10000000);
            }

            Inventory.Add(I);
            MyClient.AddSend(Packets.AddItem(I, 0));
        }
Thanks in advance.
Are the two methods in the same class? If so, your method call has a different name than the one you want to call, and you're passing in 7 arguments when the one you want to call takes only 6. This may or may not be what you're looking for since I don't know what source you're using.
s.bat is offline  

Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.