Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 07:38

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] MillionaireLee (NPC) + DBScroll/MetScroll Functionality

Discussion on [Release] MillionaireLee (NPC) + DBScroll/MetScroll Functionality within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 05/31/2009, 19:34   #16
 
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
this is working for me with the shoppingmall.
just replace it
Code:
public static void ItemBuy(byte[] Data, ClientSocket CSocket)
        {
            int ID = PacketProcessor.ReadLong(Data, 8);
            int Amount = PacketProcessor.ReadLong(Data, 20);
            
                if (CSocket.Client.Inventory.Count == 40)
                {
                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Your inventory is full.", Struct.ChatType.Top));
                    return;
                }
                    string Shop = System.IO.File.ReadAllText("Shop.dat");
                    if (itemexist(Convert.ToString(ID), Shop))
                    {
                        [COLOR="Red"]//Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
                        if (Nano.Items.ContainsKey(ID))
                        {
                            Struct.ItemData NewItem = Nano.Items[ID];
                            if (NewItem.CPCost > 0)
                            {
                                for (int i = 0; i < Amount; i++)
                                {
                                    if (CSocket.Client.CPs >= NewItem.CPCost)
                                    {
                                        [COLOR="Lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
                                        Handler.CPs(NewItem.CPCost * -1, CSocket);
                                        Item.ItemID = NewItem.ID;
                                        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, 0, 0, 0, 0, 0, 0, 0, 0, 0));
                                    }
                                    else
                                    {
                                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] You do not have enough CPs.", Struct.ChatType.Top));
                                    }
                                }
                            }
                            else if (NewItem.Cost > 0)
                            {
                                if (CSocket.Client.Money >= NewItem.Cost)
                                {
                                    [COLOR="lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]                                    Handler.Money(NewItem.Cost * -1, CSocket);
                                    Item.ItemID = NewItem.ID;
                                    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, 0, 0, 0, 0, 0, 0, 0, 0, 0));
                                }
                                else
                                {
                                    CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] You do not have enough money.", Struct.ChatType.Top));
                                }
                            }
                            else
                            {
                                [COLOR="lime"]Struct.ItemInfo Item = new Struct.ItemInfo();[/COLOR]
                                Item.ItemID = NewItem.ID;
                                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, 0, 0, 0, 0, 0, 0, 0, 0, 0));
                            }
                        }
                    }
                    else
                    {
                        CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[ERROR] Item does not exist in Shop.dat", Struct.ChatType.Top));
                    }
        }
the npc will eat all dbs
why?

Code:
[COLOR="Red"]foreach (int DBUID in DBList)[/COLOR]
                                {
                                    CSocket.Client.Inventory.Remove(DBUID);
                                    CSocket.Send(ConquerPacket.ItemUsage(DBUID, 255, Struct.ItemUsage.RemoveItem));
                                    Database.Database.DeleteItem(DBUID);
                                }
think a bit and you'll be able to change that
good luck
yuko is offline  
Thanks
5 Users
Old 05/31/2009, 19:40   #17

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
It just takes away all DBs now not just 10...
Kiyono is offline  
Old 05/31/2009, 23:02   #18
 
elite*gold: 0
Join Date: Mar 2009
Posts: 56
Received Thanks: 31
I did some further testing. When you buy the dbs as a bulk. it only takes one. same goes for th mets. but if you buy one at a time. it will take all the dbs/mets and packs them.
~*Dutchess*~ is offline  
Old 05/31/2009, 23:08   #19
 
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
#edite

zerocelli updated his post
yuko is offline  
Old 05/31/2009, 23:28   #20
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Reason why is; I updated the code in my server but forgot to update the code in my post. Sorry guys.

And, it's because the Shopping Mall Fix you guys use that it won't work if you buy 10 dbs at once, I fixed my mall myself so it doesn't give you 10 DB's with the same UID, thus you actually delete them all..
Zeroxelli is offline  
Thanks
3 Users
Old 06/01/2009, 17:20   #21
 
almoshax.'s Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 76
Received Thanks: 47
the only problem for me that it take all db or all mets is there any ideas?
almoshax. is offline  
Old 06/01/2009, 18:10   #22
 
elite*gold: 0
Join Date: Dec 2007
Posts: 226
Received Thanks: 55
yes you need the new npc he updated it after i send mine so i deleted that . just recopy the new one

what he added is a break after the list has 10 dbs

good luck
yuko is offline  
Thanks
1 User
Old 06/01/2009, 19:34   #23
 
elite*gold: 0
Join Date: Sep 2008
Posts: 92
Received Thanks: 21
thx good work dude!
reborn666 is offline  
Old 06/05/2009, 20:22   #24
 
PurePwnage23's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 38
Received Thanks: 18
Hmm i got a error can some 1 help me? It says The Name Delete Doesnt Exist in the current contest :/
PurePwnage23 is offline  
Old 06/05/2009, 21:14   #25
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
@PurePwnage23;

In compile? You might wanna check your 'using' includes at the top, though mouse-over n it will fix it for you in most cases.
Zeroxelli is offline  
Thanks
2 Users
Old 06/06/2009, 07:46   #26
 
Rulzan's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 220
Received Thanks: 29
this works on tq binarys 5065?
Rulzan is offline  
Thanks
1 User
Old 06/06/2009, 09:00   #27
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
Erm, It's for the CoEmu V2 source.
Zeroxelli is offline  
Thanks
4 Users
Old 06/06/2009, 21:30   #28
 
Rulzan's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 220
Received Thanks: 29
****
Ok thanks
Rulzan is offline  
Old 06/16/2009, 02:01   #29
 
elite*gold: 0
Join Date: Feb 2008
Posts: 154
Received Thanks: 53
Quote:
Originally Posted by Zeroxelli View Post
Erm, It's for the CoEmu V2 source.

but someone use your codes and edit them to work on TQ binary v5065 can u help us to make it work on TQ binary ??please
ELB@Sh@BeCkh@M is offline  
Thanks
1 User
Old 06/16/2009, 05:32   #30
 
Zeroxelli's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
**** no, I'll never support the use of the binaries.
Zeroxelli is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
bot stucked when executing StorageAuto functionality
01/08/2010 - Ragnarok Online - 0 Replies
Hi All, Basically i have two related problems 1) my character freezes on the storage map. However this only occurs when im autobuying something. 2) after the bot finish autobuying, autostorage is activated, it goes out of the map and get stuck/freeze. issuing 'autostorage' makes it properly go to storage and store things. then it opens storage for the second time doing nothing. then tries to autosell even if i configured it to not autosell thereby producing error. now it freezes...
[TIP] EASY ALL WIN FOR ENGINES WITHOUT HOTKEY FUNCTIONALITY
08/25/2009 - Grand Chase - 25 Replies
Guyz may technique ako para mabilis ang allwin ndi na kailangan double click or enter para mag change ng value... PARANG HOTKEY NA DIN Requirements: Allwin Address..... First..... double click mo muna ung value then change to 1.. sunod change value ulit sa 0......
[Release]MillionaireLee.sql For TQBinary 5065
07/15/2009 - CO2 PServer Guides & Releases - 5 Replies
here is MillionaireLee.sql for TQBinary To Pack Mets And DBs This Is Da Link MEGAUPLOAD - The leading online storage and file delivery service if u liked my post plz hit thanks button
MetScroll Bugged?
06/29/2009 - CO2 Private Server - 2 Replies
case 720027: // MeteorScroll { if (CSocket.Client.Inventory.Count <= 30) { for (int i = 0; i < 10; i++) { Struct.ItemInfo SubItem = new Struct.ItemInfo(); SubItem.Bless = SubItem.Enchant = SubItem.Position = SubItem.Color = SubItem.Soc1 = SubItem.Soc2 = SubItem.Plus = 0;...
Omg Metscroll
04/09/2006 - Conquer Online 2 - 11 Replies
right thats it im serverly pissed off i been hunting allllll day i get few +1 shit like that i get 10 mets i go to market turn mets into scroll and BAM no scroll someone gotta help me here before i kick the shit outa something lol



All times are GMT +1. The time now is 07:38.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.