[Help] Npc To clear inv

06/06/2009 22:02 nuhali#1
have any for me a npc that can clear your inv for coemuv2
06/06/2009 22:10 mejo33#2
Use function
Quote:
if (CSocket.Client.Inventory.Count == 40)
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Your inventory is full. You need to clear invectory?", Struct.ChatType.Top));
CSocket.Client.Inventory.Clear
return;
}
I dont test, sorry about that if its dont work :)
06/06/2009 22:19 nuhali#3
k i gonna try it
06/06/2009 22:24 nuhali#4
dont work for me can u make a full npc for me?
06/06/2009 22:31 mejo33#5
case 10010656: // ClearInv
{
if (LinkBack == 0)
{
if (CSocket.Client.Inventory.Count == 40)
{
Text("Im clear invectory. U need it?", CSocket);
Link("Yes, i need.", 1, CSocket);
Link("No, i still here.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else
Text("Your inventory is full. You need to clear invectory?", CSocket);
Link("Yes, i need.", 1, CSocket);
Link("No, i still here.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if(CSocket.Client.Inventory.Count == 0)
Text("Your inventory is empty. All remove", CSocket);
Link("THANKS!!!", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
break;
}


Take, press thanks if im help
06/06/2009 22:38 nuhali#6
it didn't work
it dont clear
06/06/2009 22:39 damianpesta#7
Quote:
Originally Posted by mejo33 View Post
case 10010656: // ClearInv
{
if (LinkBack == 0)
{
if (CSocket.Client.Inventory.Count == 40)
{
Text("Im clear invectory. U need it?", CSocket);
Link("Yes, i need.", 1, CSocket);
Link("No, i still here.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else
Text("Your inventory is full. You need to clear invectory?", CSocket);
Link("Yes, i need.", 1, CSocket);
Link("No, i still here.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if(CSocket.Client.Inventory.Count == 0)
Text("Your inventory is empty. All remove", CSocket);
Link("THANKS!!!", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
break;
}


Take, press thanks if im help

He said full npc , but w.e dont do the work for him.
06/06/2009 22:39 _Emme_#8
Quote:
case "clearinv":
{
CSocket.Client.Inventory.Clear();
CSocket.Client.Inventory = new Dictionary<int, Struct.ItemInfo>();
break;
}
Something along those lines? I don't even have the CoEmu source but since I saw one thread or another about the source I know how it uses inventory and command.
06/06/2009 22:44 HunterT#9
Quote:
Originally Posted by nuhali View Post
dont work for me can u make a full npc for me?
I can send it to you, do you need the full npc.dat file thing?
06/06/2009 22:44 mejo33#10
hehe i say im not sure :) thanks emme for fix