Quote:
Originally Posted by n0mansland
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.