Register for your free account! | Forgot your password?

You last visited: Today at 19:41

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

Advertisement



[HELP]Market Vending

Discussion on [HELP]Market Vending within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
[HELP]Market Vending

Ok... So I've been making some good progress with my source, thanks to many people for guiding me through it. But now I'm stuck on getting my market vending working. Of course I have the stalls all over, but when a character clicks to open shop, and says yes, it states shop cannot be opened there. I was hoping perhaps someone could give me an idea on what it is I need to add/change to get somewhere with this.

Thanks in advance to anyone willing to help.
Incariuz is offline  
Old 11/12/2008, 22:25   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Infamous just figured it out(full working), and he's the second person(Q? first) to do it... You have to figure out the vending item packet yourself, and the vending button(whatever he meant by that ) and other things.
tao4229 is offline  
Old 11/12/2008, 22:27   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
Hmmm... that doesn't sound fun, lol. Guess I'll just put the market on hold till I learn more I can figure it out alone.
Incariuz is offline  
Old 11/12/2008, 22:34   #4
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
Start Vending - 0x3F2.cs

Code:
using System;
using System.Collections.Generic;
using System.Native;
using Conquer.Client;
using Conquer.SQL;
using Conquer.Structures;
using Conquer.Packets;
using Conquer.Processor.Items;

namespace Conquer.Processor.Packets
{
    public unsafe partial class PacketProcessor
    {
        public static void StartVending(GameClient Client, DataPacket* Packet)
        {
            if (!Client.VendingInfo.IsVending && Client.Entity.MapID == Constants.MarketMapID)
            {
                Dictionary<uint, ConquerNpc> mapNpcs = null;
                if (Database.Npcs.TryGetValue(Client.Entity.MapID, out mapNpcs))
                {
                    foreach (KeyValuePair<uint, ConquerNpc> entry in mapNpcs)
                    {
                        if (entry.Value.X == Client.Entity.Data.X - 2 && entry.Value.Y == Client.Entity.Data.Y)
                        {
                            ConquerNpc npc = entry.Value;
                            npc.ConvertToVendNpc(Client);
                            mapNpcs[npc.UID] = npc;
                            Client.VendingInfo.IsVending = true;
                            Client.VendingInfo.ShopID = npc.UID;

                            SendRangePacket.Add(Client.Entity, Constants.ViewDistance, 0, &npc, npc.Size, null);
                            Packet->dwParam = Client.VendingInfo.ShopID;
                            Client.Send(Packet, Packet->Size);
                            break;
                        }
                    }
                }
            }
        }
    }
}
InfamousNoone is offline  
Thanks
1 User
Old 11/12/2008, 22:39   #5
 
xprincex's Avatar
 
elite*gold: 0
Join Date: Dec 2005
Posts: 163
Received Thanks: 9
Thanks this will help me tons
xprincex is offline  
Old 11/12/2008, 22:41   #6
 
elite*gold: 0
Join Date: Jun 2008
Posts: 97
Received Thanks: 6
hey i need code for fix bloked in portal plz give my
valyy is offline  
Old 11/12/2008, 22:42   #7
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
I'm guessing that will not work with LOTF. I guess I'l play with it sometime, see if it helps me learn something. Thanks Infamous.
Incariuz is offline  
Old 11/13/2008, 08:06   #8
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Quote:
Originally Posted by InfamousNoone View Post
Start Vending - 0x3F2.cs

Code:
using System;
using System.Collections.Generic;
using System.Native;
using Conquer.Client;
using Conquer.SQL;
using Conquer.Structures;
using Conquer.Packets;
using Conquer.Processor.Items;

namespace Conquer.Processor.Packets
{
    public unsafe partial class PacketProcessor
    {
        public static void StartVending(GameClient Client, DataPacket* Packet)
        {
            if (!Client.VendingInfo.IsVending && Client.Entity.MapID == Constants.MarketMapID)
            {
                Dictionary<uint, ConquerNpc> mapNpcs = null;
                if (Database.Npcs.TryGetValue(Client.Entity.MapID, out mapNpcs))
                {
                    foreach (KeyValuePair<uint, ConquerNpc> entry in mapNpcs)
                    {
                        if (entry.Value.X == Client.Entity.Data.X - 2 && entry.Value.Y == Client.Entity.Data.Y)
                        {
                            ConquerNpc npc = entry.Value;
                            npc.ConvertToVendNpc(Client);
                            mapNpcs[npc.UID] = npc;
                            Client.VendingInfo.IsVending = true;
                            Client.VendingInfo.ShopID = npc.UID;

                            SendRangePacket.Add(Client.Entity, Constants.ViewDistance, 0, &npc, npc.Size, null);
                            Packet->dwParam = Client.VendingInfo.ShopID;
                            Client.Send(Packet, Packet->Size);
                            break;
                        }
                    }
                }
            }
        }
    }
}
omg,lol u want to say, the first "1010" packet is the "show vending" and the second is the sending the shop id to the client?

i think i got it DD

inf should know what i mean by that |
alexbigfoot is offline  
Old 11/13/2008, 11:38   #9
 
elite*gold: 0
Join Date: Mar 2007
Posts: 369
Received Thanks: 79
shop Flag Full work

only when Player Sit can't saw ShopFlag Close button

if any one have the packet to Show this Button i want it
Attached Images
File Type: jpg ShopFlag.JPG (186.8 KB, 171 views)
becko713 is offline  
Old 11/13/2008, 12:54   #10
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
Quote:
Originally Posted by InfamousNoone View Post
Start Vending - 0x3F2.cs

Code:
using System;
using System.Collections.Generic;
using System.Native;
using Conquer.Client;
using Conquer.SQL;
using Conquer.Structures;
using Conquer.Packets;
using Conquer.Processor.Items;

namespace Conquer.Processor.Packets
{
    public unsafe partial class PacketProcessor
    {
        public static void StartVending(GameClient Client, DataPacket* Packet)
        {
            if (!Client.VendingInfo.IsVending && Client.Entity.MapID == Constants.MarketMapID)
            {
                Dictionary<uint, ConquerNpc> mapNpcs = null;
                if (Database.Npcs.TryGetValue(Client.Entity.MapID, out mapNpcs))
                {
                    foreach (KeyValuePair<uint, ConquerNpc> entry in mapNpcs)
                    {
                        if (entry.Value.X == Client.Entity.Data.X - 2 && entry.Value.Y == Client.Entity.Data.Y)
                        {
                            ConquerNpc npc = entry.Value;
                            npc.ConvertToVendNpc(Client);
                            mapNpcs[npc.UID] = npc;
                            Client.VendingInfo.IsVending = true;
                            Client.VendingInfo.ShopID = npc.UID;

                            SendRangePacket.Add(Client.Entity, Constants.ViewDistance, 0, &npc, npc.Size, null);
                            Packet->dwParam = Client.VendingInfo.ShopID;
                            Client.Send(Packet, Packet->Size);
                            break;
                        }
                    }
                }
            }
        }
    }
}
So you found the button out xD

Quote:
Originally Posted by Incariuz View Post
I'm guessing that will not work with LOTF. I guess I'l play with it sometime, see if it helps me learn something. Thanks Infamous.
Yeh it will work for lotf, you just gotta know what your doin i guess.
Ultimatum is offline  
Old 11/13/2008, 14:39   #11
 
xprincex's Avatar
 
elite*gold: 0
Join Date: Dec 2005
Posts: 163
Received Thanks: 9
Well if any of you watched Inf tuts on c# and can see how fast he codes it probably just wrote one up real quick and no it dont work with loft unless u tweak it to. So therefore its more as a learning code so you guys understand how it works.

Vivi
xprincex is offline  
Old 11/13/2008, 15:40   #12
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
LOL, your not suppost to copy + paste and everythings done. What i ment was that code hes posted is infact part of vending, if you know how to code you can make it work in lotf.

Im not bothered anyway i allready have it done, just need to analyse the logged packet to get the button to quit vending.
Ultimatum is offline  
Old 11/14/2008, 18:59   #13
 
xprincex's Avatar
 
elite*gold: 0
Join Date: Dec 2005
Posts: 163
Received Thanks: 9
THe way i see if u have a server with cmds vending should be the last thing on your mind
xprincex is offline  
Old 11/14/2008, 21:31   #14
 
elite*gold: 0
Join Date: Jun 2008
Posts: 97
Received Thanks: 6
i have error with Constants
valyy is offline  
Old 11/14/2008, 23:49   #15
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Quote:
Originally Posted by valyy View Post
i have error with Constants
u`re using the codeblock that inf showd?

Quote:
Originally Posted by InfamousNoone View Post
Start Vending - 0x3F2.cs

Code:
using System;
using System.Collections.Generic;
using System.Native;
using Conquer.Client;
using Conquer.SQL;
using Conquer.Structures;
using Conquer.Packets;
using Conquer.Processor.Items;

namespace Conquer.Processor.Packets
{
    public unsafe partial class PacketProcessor
    {
        public static void StartVending(GameClient Client, DataPacket* Packet)
        {
            if (!Client.VendingInfo.IsVending && Client.Entity.MapID == Constants.MarketMapID)
            {
                Dictionary<uint, ConquerNpc> mapNpcs = null;
                if (Database.Npcs.TryGetValue(Client.Entity.MapID, out mapNpcs))
                {
                    foreach (KeyValuePair<uint, ConquerNpc> entry in mapNpcs)
                    {
                        if (entry.Value.X == Client.Entity.Data.X - 2 && entry.Value.Y == Client.Entity.Data.Y)
                        {
                            ConquerNpc npc = entry.Value;
                            npc.ConvertToVendNpc(Client);
                            mapNpcs[npc.UID] = npc;
                            Client.VendingInfo.IsVending = true;
                            Client.VendingInfo.ShopID = npc.UID;

                            SendRangePacket.Add(Client.Entity, Constants.ViewDistance, 0, &npc, npc.Size, null);
                            Packet->dwParam = Client.VendingInfo.ShopID;
                            Client.Send(Packet, Packet->Size);
                            break;
                        }
                    }
                }
            }
        }
    }
}
alexbigfoot is offline  
Reply


Similar Threads Similar Threads
[Question] Source with Market Vending
06/18/2010 - CO2 Private Server - 6 Replies
hello does anyone know a source (5017) that got fixed market vending?
[Question] market vending in 5017
06/16/2010 - CO2 Private Server - 6 Replies
hello, could anyone tell me if its possible to code market vending in 5017? if yes then could u tell me hiw? or a link for a source who got it xD
[help] 5017 market vending
09/27/2009 - CO2 Private Server - 11 Replies
hello anyone know how to fix the market in a 5017 source that you can vending?
How do you add market? (vending) (probably no one will answer)
11/24/2008 - CO2 Private Server - 12 Replies
Ok I was wondering how do you add market? In a lot of servers I see they all have markets and I didn't think it was possible yet... PROLBABLY No one will answer this because it's most likely rare but it's worth a try =/ Thanks,
Vending?
10/29/2004 - Ragnarok Online - 3 Replies
hi, i have revemu (0.95) i was wondering how i use my bot to vend (because when i try to vend regulary my bros a diff game and my rag crashes) ANY help appreciated ;) Iam new to vending with a bot ty all



All times are GMT +2. The time now is 19:41.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.