Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:52

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

Advertisement



ShowShowItem (4267) - Need Advice

Discussion on ShowShowItem (4267) - Need Advice within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
TwistedIllusions's Avatar
 
elite*gold: 0
Join Date: Jul 2005
Posts: 42
Received Thanks: 10
ShowShowItem (4267) - Need Advice

I started working on the CoFuture 4267 source - on the basis that I miss the days of yore, and that seemed like the best source from the collection.

I'm already fairly proficient with C#, and so it wasn't too hard to get into the source, I started by figuring out ArtisanRow/his UI; removing the broken items, and adding an in-game DMap write command, to allow me to map spaces in the dmap files that are not already mapped (mostly bridges), and added in the packet for dropping money, which was strangely missing - all of this is beside the point - and I add it to show that I am figuring most of this out on my own + with the packet wiki, I'm not intending to release a public server either - I'm learning a lot about networking; and a game I used to love.

But anyways.
I got to working on market stalls; and I realized that the provided Vending class was very very nearly complete - it didn't take me too long to figure out the missing packet to open the store for real, allowing me to add items to be vended - from debugging it, the item now can be added and the price is correctly stored - great!

But the items don't show when another player attempts to view them - then I figured out that what I'm sending to the client is the item UID, the price, and the showshopitem flag - but I'm not sending any information about the item itself to the client; which is probably why it isn't showing. I've tried various flags for the mode in the ItemInformation packet; none of those are the correct ones, and now I'm pretty much at a loss as to what to try next.

I don't want to be given the answer, but a point in the right direction would be really appreciated. Thanks!
TwistedIllusions is offline  
Old 09/03/2014, 06:46   #2
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
Basically you send the packet 0x454 with the Item UID, the ShopUID and the price to the one that clicked the shop.

PHP Code:
Viewer.Send(Packets.AddItemToShop(Item.UniqIdGetId(), Item.ValueUser.GetItemByUID(Item.UniqId), Item.Money)); 
The packet below is for version 5017 and should be very similar to the 4267 one.

PHP Code:
public static byte[] AddItemToShop(uint ItemUIDuint ShopIduint PriceItem Itembool Money)
        {
            const 
ushort PacketType 0x454;
            var 
Packet = new byte[40];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = PacketType;
                *((
uint*)(4)) = ItemUID;
                *((
uint*)(8)) = ShopId;
                *((
uint*)(12)) = Price;
                *((
uint*)(16)) = Item.ID;
                *((
ushort*)(20)) = (ushort)Item.CurDurability;
                *((
ushort*)(22)) = (ushort)Item.Durability;
                *(
24) = Money ? (byte)0x01 : (byte)0x03;
                *(
32) = Item.Gem1;
                *(
33) = Item.Gem2;
                *(
34) = (byte)Item.RebornEffect;
                *(
36) = Item.Plus;
                *(
37) = Item.Bless;
                *(
38) = (byte)Item.Enchant;
            }
            return 
Packet;
        } 
Xio. is offline  
Thanks
1 User
Old 09/03/2014, 09:58   #3
 
TwistedIllusions's Avatar
 
elite*gold: 0
Join Date: Jul 2005
Posts: 42
Received Thanks: 10
I wish there where more buttons I could press to say thanks; that was exactly the information I needed!
TwistedIllusions is offline  
Reply


Similar Threads Similar Threads
4267 question
03/11/2013 - CO2 Private Server - 13 Replies
I can`t believe I`m actually asking this, but I have a problem with spawning players. I never had this problem before. I have the spawn packet (1014) structured after Korvacs` wiki, but I can`t seem to spawn anything between my players (screening works as intended, I can chat). Nothing appears, not even shadows, names, nothing at all. I`m setting the 4 item ids to 0 (no equipment implemented yet), guildid to 0 and guildrank to 0 (for the same reason). Could anyone tell me what I`m missing...
4267 itemtype
02/26/2013 - CO2 Private Server - 4 Replies
I have a question regarding some of the values in the 4267 itemtype. This is the structure I have for it, but the value after price, and the five values after status are something I don't know. Can anyone give a hand? dword StaticID; char Name; char Class; char Proficiency; char Level; char RequiredGender; word StrengthRequirement;
[4267] Vending Bug.
02/25/2012 - CO2 Private Server - 4 Replies
Okay so, I've been working on this 4267 base I picked up on, BUT, I seem to find a small bug to it. Once you click "Ok" on the vending dialog nothing happens. I'm fairly sure(101%) that vending is fully coded inside the source just cant seem to find the problem. here is my StartVending() method: public bool StartVending(uint lParam) { if (m_IsVending) return false; Dictionary<uint, INpc> npcs;
I need 4267 source!!!!please
09/27/2010 - CO2 Private Server - 6 Replies
some one give me the 4267 source?? thx ....please
[?] 5017 to 4267
02/14/2010 - CO2 Private Server - 4 Replies
I haven't asked a question in a while. I am trying to convert the CharacterInfo packet to work on a 4267. I attempted to convert but I am still failing! So if anyone can help, it will be well appreciated thank you. Here is my attempt below. public static byte CharacterInfo(GameClient Client) { byte Packet = new byte; WriteUInt16((ushort)Packet.Length, Packet, 0); WriteUInt16(1006, Packet, 2); WriteUInt32(Client.Entity.UID,...



All times are GMT +1. The time now is 15:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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