[Help] Didnt want to make a whole thread for it...

06/28/2009 03:43 n0mansland#1
Got a couple questions... Mostly about npcs and crap...

Ok how would you make it so an NPC deletes one of your items (if you have) then adds a new item..

How much experience does UnknownMan add in real CO? There must be a set amount because if there wasnt that would be just too much of a hassle...

Anyone know how to make Seperate house maps for players? ( not sure if everyone gets sent to the same house but im assuming Ill check and edit if they dont )

How would I find Furniture NPC ( Looks )


Ill add more as I need it


Thanks if you help


DONT FLAME I DIDNT WANNA MAKE THIS THREAD EITHER JUST NEED HELP
06/28/2009 03:54 Zanzibar#2
Well, I have a question.

Source or binary.
06/28/2009 04:10 n0mansland#3
Sorry forgot CoEmuV2
06/28/2009 12:25 duddz#4
Quote:
Originally Posted by n0mansland View Post
Got a couple questions... Mostly about npcs and crap...

Ok how would you make it so an NPC deletes one of your items (if you have) then adds a new item..

How much experience does UnknownMan add in real CO? There must be a set amount because if there wasnt that would be just too much of a hassle...

Anyone know how to make Seperate house maps for players? ( not sure if everyone gets sent to the same house but im assuming Ill check and edit if they dont )

How would I find Furniture NPC ( Looks )


Ill add more as I need it


Thanks if you help


DONT FLAME I DIDNT WANNA MAKE THIS THREAD EITHER JUST NEED HELP
To add items add this
Code:
        public static void AddItem(int itemid, int bless, int dura, int enchant, int plus, int progress, int position, int soc1, int soc2, int color, ClientSocket CSocket)
        {
            Struct.ItemInfo Item = new Struct.ItemInfo();
            if (dura == 255)
            {
                Item.Dura = Item.MaxDura;
            }
            else
            {
                Item.Dura = dura;
            }
            Item.Bless = bless;
            Item.Enchant = enchant;
            Item.ItemID = itemid;
            Item.Plus = plus;
            Item.Position = position;
            Item.Soc1 = soc1;
            Item.Soc2 = soc2;
            Item.Color = color;
            Item.UID = Nano.Rand.Next(1, 9999999);
            bool created = Database.Database.NewItem(Item, CSocket);
            while (!created)
            {
                Item.UID = Nano.Rand.Next(1, 9999999);
                created = Database.Database.NewItem(Item, CSocket);
            }

            CSocket.Client.Inventory.Add(Item.UID, Item);
            CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
        }
Then now all you have to do "AddItem(Blah, 0,0,0,0,0,0,0,0,CSocket);" Or something like that.
06/28/2009 17:08 n0mansland#5
Oh i know how to add items probably worded that wrong but I need to figure out how to check if you have a certain item then delete that item and give you a new one..

Let's see
Code:
case 123: //Equipment NPC
{
if (LinkBack == 0)
{
        (Dont feel like making a whole code bla bla bla) I can give you a super  
        shadow bow for a dragon ball
        Link1 Yes,Please.
        Link No thanks. ,255
}
else if (LinkBack == 1)
{
        (Check if have DB) <--- Can't figure out
        (if so delete DB) <--- can't figure out
        (Add super shadow bow) <---- already know how to do
        BLABLABLABLABLAAAABLAA
Just an example what I mean by that

I've seen them in other codes just dont understand what I need and dont need (Gem guy)