Press the thanks button if you like it
Code:
#region CPAdmin
case XXXXX: <<< Make the case whatever you want and add the NPC
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hello, I can trade you 215 CPs for a DragonBall and 2150 CPs for a DBScroll and silvers to cps 10k silver for 10 cps."));
GC.AddSend(Packets.NPCLink("Here, take all my DragonBall!", 1));
GC.AddSend(Packets.NPCLink("Here, take all my DBScroll!", 2));
GC.AddSend(Packets.NPCLink("All Silvers", 3));
GC.AddSend(Packets.NPCLink("I'm too poor...", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
while (true)
{
if (GC.MyChar.InventoryContains(1088000, 1))
{
Game.Item DB = null;
foreach (Game.Item I in GC.MyChar.Inventory)
if (I.ID == 1088000)
{ DB = I; break; }
if (DB != null)
{
GC.MyChar.CPs += 215;
GC.MyChar.RemoveItem(DB);
}
}
else break;
}
}
if (Control == 2)
{
while (true)
{
if (GC.MyChar.InventoryContains(720028, 1))
{
Game.Item DB = null;
foreach (Game.Item I in GC.MyChar.Inventory)
if (I.ID == 720028)
{ DB = I; break; }
if (DB != null)
{
GC.MyChar.CPs += 2150;
GC.MyChar.RemoveItem(DB);
}
}
else break;
}
}
if (Control == 3)
{
if (GC.MyChar.Silvers >= 10000)
{
while (GC.MyChar.Silvers >= 10000)
{
GC.MyChar.CPs += 10;
GC.MyChar.Silvers -= 10000;
}
}
}
break;
}
#endregion






