This is a simple NPC I made in 2 minutes.
Code:
#region Clear Items NPC
case [COLOR="red"]30165[/COLOR]:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("I can clear your inventory, do you want to?");
dialog.Link("Sure", 1);
dialog.Link("No thanks", 255);
dialog.Avatar(99);
dialog.Send();
break;
}
case 1:
{
if (client.Inventory.Count >= 1)
{
if (client.Entity.ConquerPoints >= [COLOR="red"]#[/COLOR])
{
client.Inventory.Clear(Conquer_Online_Server.Game.Enums.ItemUse.Remove);
client.Entity.ConquerPoints -= [COLOR="Red"]#[/COLOR];
break;
}
else
{
dialog.Text("You don't have enough CPs!");
dialog.Link("I see", 255);
dialog.Avatar(99);
dialog.Send();
break;
}
}
else
{
dialog.Text("Your inventory doesn't contains any item!");
dialog.Link("I see", 255);
dialog.Avatar(99);
dialog.Send();
break;
}
}
}
}
break;
#endregion
# = CPs amount.
30165 = The ID of the NPC (Currently set to EscortChief)