[Release]CPAdmin chaning CPs for DBs

05/31/2009 13:19 koio#1
ok
here is a CPAdmin who change Dragonballs or Dragonballscrolls to CPs
search for
Code:
case 35500
or go into you NPCTalk.cs

Code:
#region CPAdmin
                    case 2071://CPAdmin Guy Coded by Koio
                    {
                        if (LinkBack == 0)
                        {
                            Text("Would like to exchange for Cps with ur money? I will give you 255 CPs for a DragonBall and 2550 for a DragonBallScroll", CSocket);
                            Link("I want it for a DB.", 1, CSocket);
                            Link("I want it for a DBScroll.", 1, CSocket);
                            Link("Nah No thanks!!", 255, CSocket);
                            End(CSocket);
                        }
                       
                        else if (LinkBack == 1)
                        {
                            int DBUID = 0;
                            int DBcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 1088000)
                                {
                                    DBUID = Item.UID;
                                    DBcount++;
                                }
                            }


                            if (DBcount >= 1)
                            {
                                CPs(+255, CSocket);
                                CSocket.Client.Inventory.Remove(DBUID);
                                CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(DBUID);
                                Text("OK. You have get 255 CPS for your DragonBall", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a DragonBall", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }

                        else if (LinkBack == 2)
                        {
                            int DBSUID = 0;
                            int DBScount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 720028)
                                {
                                    DBSUID = Item.UID;
                                    DBScount++;
                                }
                            }


                            if (DBScount >= 1)
                            {
                                CPs(+255, CSocket);
                                CSocket.Client.Inventory.Remove(DBSUID);
                                CSocket.Send(ConquerPacket.ItemUsage(DBSUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(DBSUID);
                                Text("OK. You have get 2550 CPS for your DragonBallScroll", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a DragonBallScroll", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }

                        break;
                    }
#endregion
05/31/2009 18:40 ~*Dutchess*~#2
There are a few bugs with this. It will give you cps for a dragonball. but it doesnt take away the db. it also doesnt take scrolls. reads only the single dbs.
05/31/2009 18:46 Kiyono#3
Isn't the CPAdmin already released in here [Only registered and activated users can see links. Click Here To Register...].
Code:
case 2071://Market CPAdmin - by scottdavey
                    {
                        if (LinkBack == 0)
                        {
                            Text("Do you have any unwanted dragonballs? \nI can give you 215 CPs per dragonball and 2150 per DB Scroll.", CSocket);
                            Link("Yes, i want 215 CPs for my dragonball.", 1, CSocket);
                            Link("Yes, i want 2150 CPs for my DBScroll.", 2, CSocket);
                            Link("Just passing by.", 255, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (InventoryContains(1088000, 1, CSocket))
                            {
                                CSocket.Client.CPs += 215;
                                int uid = ReturnUID(1088000, CSocket);
                                CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You now have " + CSocket.Client.CPs + " CPs.", Struct.ChatType.Top));
                                CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
                                CSocket.Client.Inventory.Remove(uid);
                                CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(uid);
                            }
                            else
                            {
                                Text("You don't have a dragonball.", CSocket);
                                Link("Ok.", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 2)
                        {
                            if (InventoryContains(720028, 1, CSocket))
                            {
                                CSocket.Client.CPs += 2150;
                                int uid = ReturnUID(720028, CSocket);
                                CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You now have " + CSocket.Client.CPs + " CPs.", Struct.ChatType.Top));
                                CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
                                CSocket.Client.Inventory.Remove(uid);
                                CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(uid);
                            }
                            else
                            {
                                Text("You don't have a dragonball scroll.", CSocket);
                                Link("Ok.", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket);
                            }
                        }
                        break;
                    }
05/31/2009 20:46 koio#4
Quote:
Originally Posted by ~*Dutchess*~ View Post
There are a few bugs with this. It will give you cps for a dragonball. but it doesnt take away the db. it also doesnt take scrolls. reads only the single dbs.
for me it takes the db away
and i am sorry i did see the other release
06/25/2009 09:40 0105653642#5
Quote:
Originally Posted by koio View Post
ok
here is a CPAdmin who change Dragonballs or Dragonballscrolls to CPs
search for
Code:
case 35500
or go into you NPCTalk.cs

Code:
#region CPAdmin
                    case 2071://CPAdmin Guy Coded by Koio
                    {
                        if (LinkBack == 0)
                        {
                            Text("Would like to exchange for Cps with ur money? I will give you 255 CPs for a DragonBall and 2550 for a DragonBallScroll", CSocket);
                            Link("I want it for a DB.", 1, CSocket);
                            Link("I want it for a DBScroll.", 1, CSocket);
                            Link("Nah No thanks!!", 255, CSocket);
                            End(CSocket);
                        }
                       
                        else if (LinkBack == 1)
                        {
                            int DBUID = 0;
                            int DBcount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 1088000)
                                {
                                    DBUID = Item.UID;
                                    DBcount++;
                                }
                            }


                            if (DBcount >= 1)
                            {
                                CPs(+255, CSocket);
                                CSocket.Client.Inventory.Remove(DBUID);
                                CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(DBUID);
                                Text("OK. You have get 255 CPS for your DragonBall", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a DragonBall", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }

                        else if (LinkBack == 2)
                        {
                            int DBSUID = 0;
                            int DBScount = 0;

                            foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
                            {
                                if (Item.ItemID == 720028)
                                {
                                    DBSUID = Item.UID;
                                    DBScount++;
                                }
                            }


                            if (DBScount >= 1)
                            {
                                CPs(+255, CSocket);
                                CSocket.Client.Inventory.Remove(DBSUID);
                                CSocket.Send(ConquerPacket.ItemUsage(DBSUID, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(DBSUID);
                                Text("OK. You have get 2550 CPS for your DragonBallScroll", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("You don't have a DragonBallScroll", CSocket);
                                Link("Bye", 255, CSocket);
                                End(CSocket);
                            }
                        }

                        break;
                    }
#endregion
wow Nice work it works he take the db and give me 215 cps thanx alot
06/27/2009 01:18 el mogrm#6
..Sorry for that idiot question !! But i dont know yet the NPC talk cs !! Can anyone tell me what is it or where i can find it > Sry for newbie question ! :)
10/04/2009 10:39 bazemad#7
Quote:
Originally Posted by el mogrm View Post
..Sorry for that idiot question !! But i dont know yet the NPC talk cs !! Can anyone tell me what is it or where i can find it > Sry for newbie question ! :)
\CoEmu v2 GameServer\Handlers\NpcTalk.cs