its the same ID but All edit I Maked in the source didn't worked =/
case 2071://CPAdmin
{
if (LinkBack == 0)
{
Text("Hello! I am the CP Admin, here you can trade your DragonBalls for CPs.", CSocket);
Text("Remember, you can exchange a DragonBall for 215 CPs, or exchange a", CSocket);
Text("DragonBall Scroll for 2150 CPs.", CSocket);
Link("Exchange a DBScroll", 1, CSocket);
Link("Exchange a DragonBall", 2, CSocket);
Link("I have nothing!", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1) //DBScroll
{
bool ContainItem = false;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 720028) //DBScroll
{
CSocket.Client.Inventory.Remove(Item.UID);//Remove
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(Item.UID);
ContainItem = true;
break;
}
}
if (ContainItem)
{
CSocket.Client.CPs += 2150;//Add
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
Text("Here you go, 2150 CPs. Spend them well!", CSocket);
Link("I will, thanks!", 255, CSocket);
End(CSocket);
}
else
{
Text("Where is your DBScroll?", CSocket);
Link("Sorry, I have none.", 255, CSocket);
End(CSocket);
}
}
else if (LinkBack == 2) //DragonBall
{
bool ContainItem = false;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088000) //DragonBall
{
CSocket.Client.Inventory.Remove(Item.UID);//Remove
CSocket.Send(ConquerPacket.ItemUsage(Item.UID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(Item.UID);
ContainItem = true;
break;
}
}
if (ContainItem)
{
CSocket.Client.CPs += 215;//Add
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
Text("Here you go, 215 CPs. Spend them well!", CSocket);
Link("I will, thanks!", 255, CSocket);
End(CSocket);
}
else
{
Text("You don't have any DragonBalls. Come Back when you get one.", CSocket);
Link("Sure, I will.", 255, CSocket);
End(CSocket);
}
}
break;
}
case 5004://Milionaire Lee (Meteors -> MeteorScroll / DragonBalls -> DBScroll)
{
if (LinkBack == 0)
{
Text("Hunting meteors and dagonballs is an exciting thing.", CSocket);
Text("However, they also pile up in your inventories.", CSocket);
Link("Agreed. How do you deal with it?", 1, CSocket);
Link("I am poor and do not have the problem.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("I can pack dragonballs and meteors for you. Give me 10 meteors or 10", CSocket);
Text("dragonballs. I will make it to a MeteorScroll or a DBScroll that occupies", CSocket);
Text("only one slot. Just right click on it, it will return 10 meteors or 10", CSocket);
Text("dragonballs again.", CSocket);
Link("Cool. Please pack my meteors.", 2, CSocket);
Link("Cool. Please pack my dragonballs.", 3, CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
int[] ContainItems = new int[10];
int Counter = 0;
foreach (Struct.ItemInfo InvItem in CSocket.Client.Inventory.Values)
{
if (InvItem.ItemID == 1088001) //Meteor
{
ContainItems[Counter] = InvItem.UID;
Counter++;
if (Counter == 10)
{
foreach (int UID in ContainItems)
{
CSocket.Client.Inventory.Remove(UID);//Remove
CSocket.Send(ConquerPacket.ItemUsage(UID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(UID);
}
Struct.ItemInfo Item = new Struct.ItemInfo();//MeteorScroll
Item.Bless = 0;
Item.Enchant = 0;
Item.ItemID = 720027;
Item.Plus = 0;
Item.Position = 0;
Item.Soc1 = 0;
Item.Soc2 = 0;
Item.Color = 0;
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));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your meteors have been packed successfully.", Struct.ChatType.Top));
break;
}
}
}
if (Counter < 10)
{
Text("Sorry, you don't have 10 meteors.", CSocket);
Link("OK, I know.", 255, CSocket);
End(CSocket);
}
}
else if (LinkBack == 3)
{
int[] ContainItems = new int[10];
int Counter = 0;
foreach (Struct.ItemInfo ItemInv in CSocket.Client.Inventory.Values)
{
if (ItemInv.ItemID == 1088000) //DragonBall
{
ContainItems[Counter] = ItemInv.UID;
Counter++;
if (Counter == 10)
{
foreach (int UID in ContainItems)
{
CSocket.Client.Inventory.Remove(UID);//Remove
CSocket.Send(ConquerPacket.ItemUsage(UID, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(UID);
}
Struct.ItemInfo Item = new Struct.ItemInfo();//DBScroll
Item.Bless = 0;
Item.Enchant = 0;
Item.ItemID = 720028;
Item.Plus = 0;
Item.Position = 0;
Item.Soc1 = 0;
Item.Soc2 = 0;
Item.Color = 0;
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));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your dragonballs have been packed successfully.", Struct.ChatType.Top));
break;
}
}
}
if (Counter < 10)
{
Text("Sorry, you don't have 10 dragonballs.", CSocket);
Link("OK, I know.", 255, CSocket);
End(CSocket);
}
}
break;
}
case 720027://MeteorScoll
{
if (CSocket.Client.Inventory.Count <= 30)
{
for (int i = 0; i < 10; i++)
{
Struct.ItemInfo ItemScroll = new Struct.ItemInfo();//Meteor
ItemScroll.Bless = 0;
ItemScroll.Enchant = 0;
ItemScroll.ItemID = 1088001;
ItemScroll.Plus = 0;
ItemScroll.Position = 0;
ItemScroll.Soc1 = 0;
ItemScroll.Soc2 = 0;
ItemScroll.Color = 0;
ItemScroll.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(ItemScroll, CSocket);
while (!created)
{
ItemScroll.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(ItemScroll, CSocket);
}
CSocket.Client.Inventory.Add(ItemScroll.UID, ItemScroll);
CSocket.Send(ConquerPacket.ItemInfo(ItemScroll.UID, ItemScroll.ItemID, ItemScroll.Plus, ItemScroll.Bless, ItemScroll.Enchant, ItemScroll.Soc1, ItemScroll.Soc2, ItemScroll.Dura, ItemScroll.MaxDura, ItemScroll.Position, ItemScroll.Color));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You opened the MeteorScroll and get 10 Meteors.", Struct.ChatType.Top));
}
}
else
{
Delete = false;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your inventory is full.", Struct.ChatType.Top));
}
break;
}
case 720028://DBScoll
{
if (CSocket.Client.Inventory.Count <= 30)
{
for (int i = 0; i < 10; i++)
{
Struct.ItemInfo ItemScroll = new Struct.ItemInfo();//DragonBall
ItemScroll.Bless = 0;
ItemScroll.Enchant = 0;
ItemScroll.ItemID = 1088000;
ItemScroll.Plus = 0;
ItemScroll.Position = 0;
ItemScroll.Soc1 = 0;
ItemScroll.Soc2 = 0;
ItemScroll.Color = 0;
ItemScroll.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(ItemScroll, CSocket);
while (!created)
{
ItemScroll.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(ItemScroll, CSocket);
}
CSocket.Client.Inventory.Add(ItemScroll.UID, ItemScroll);
CSocket.Send(ConquerPacket.ItemInfo(ItemScroll.UID, ItemScroll.ItemID, ItemScroll.Plus, ItemScroll.Bless, ItemScroll.Enchant, ItemScroll.Soc1, ItemScroll.Soc2, ItemScroll.Dura, ItemScroll.MaxDura, ItemScroll.Position, ItemScroll.Color));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You opened the DBScroll and get 10 DragonBalls.", Struct.ChatType.Top));
}
}
else
{
Delete = false;
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your inventory is full.", Struct.ChatType.Top));
}
break;
}