[Help] Errors

02/17/2010 23:56 Decker_#1
#request close
Thanks spare!
02/18/2010 00:14 Arcо#2
"182975-12-7-255-13-13"
02/18/2010 00:32 Decker_#3
Still has the same errors :S
02/18/2010 00:33 Arcо#4
#updated first post.
02/18/2010 01:01 Decker_#5
Nope, still same errors, lol.
I've used a npc similiar to this before and no problem occured.
02/18/2010 01:03 spare2#6
Quote:
Originally Posted by .Arco View Post
#updated first post.
There are no AddItem methods that take a string as an argument. At least not in my source. So Decker's source probably doesn't have one also.

Decker here's what I suggest you to do.

Open up your source with VS C#, and press Control + F. Type in "AddItem" and choose Current Project in Look in. Press Find Next.
[Only registered and activated users can see links. Click Here To Register...]

Then right click on AddItem that is highlighted and click Go to definition. Then you will see
[Only registered and activated users can see links. Click Here To Register...]
After the last bracket of
Code:
public void AddItem(uint ID)
paste in
Code:
        public void AddItem(uint ID, byte Plus, byte ench, byte bless, 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));
        }
After then you can go back to your NPC script and use the following code to get a DarkWizard
Code:
GC.MyChar.AddItem(191305, 9, 255, 7, Item.Gem.SuperDragonGem, Item.Gem.SuperDragonGem);
02/18/2010 01:11 Decker_#7
wtf, it works lol.
Thanks bro!