• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Hired Merchant bug v62 1st leaves all get dc.

Newbie Spellweaver
Joined
Jan 22, 2009
Messages
72
Reaction score
0
Hello i have a bug on my server that cause all visitors get dc with error 38 once the 1st slot leaves the store . there is no red circle when 3 people in it.
This is my Hired Merchant code:

i tried to use these but no cause:

http://forum.ragezone.com/f427/fix-merchant-issue-669807/

Code:
 public static MaplePacket getInteraction(MapleCharacter chr, boolean firstTime) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.PLAYER_INTERACTION.getValue()); // header.

        IPlayerInteractionManager ips = chr.getInteraction();
        int type = ips.getShopType();
        if (type == 1) {
            mplew.write(HexTool.getByteArrayFromHexString("05 05 04"));
        } else if (type == 2) {
            mplew.write(HexTool.getByteArrayFromHexString("05 04 04"));
        } else if (type == 3) {
            mplew.write(HexTool.getByteArrayFromHexString("05 02 02"));
        } else if (type == 4) {
            mplew.write(HexTool.getByteArrayFromHexString("05 01 02"));
        }

        mplew.write(ips.isOwner(chr) ? 0 : 1);
        mplew.write(0);
        if (type == 2 || type == 3 || type == 4) {
            addCharLook(mplew, ((MaplePlayerShop) ips).getMCOwner(), false);
            mplew.writeMapleAsciiString(ips.getOwnerName());
        } else {
            mplew.writeInt(((HiredMerchant) ips).getItemId());
            mplew.writeMapleAsciiString("Hired Merchant");
        }
        for (int i = 0; i < 3; i++) {
            if (ips.getVisitors()[i] != null) {
                mplew.write(i + 1);
                addCharLook(mplew, ips.getVisitors()[i], false);
                mplew.writeMapleAsciiString(ips.getVisitors()[i].getName());
            }
        }
        mplew.write(0xFF);
        if (type == 1) {
            mplew.writeShort(0);
            mplew.writeMapleAsciiString(ips.getOwnerName());
            if (ips.isOwner(chr)) {
                mplew.writeInt(Integer.MAX_VALUE); // contains timing, suck my penis we dont need this
                mplew.write(firstTime ? 1 : 0);
                mplew.write(HexTool.getByteArrayFromHexString("00 00 00 00 00"));
            }
 
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
Still haven't learned packets and IDA? I still highly recommend reading some tutorials and learning because you're going to need that kind of understanding in order to fix these kinds of things on your own..

The red circle (which I assume means it's full or something?) would be sent on the balloon with the other information, not when you OnEnter into a MiniRoom. It's the same issue that occurs with minigames, all Odin sources just have the bytes wrong or misplaced. The packet when they leave is just wrong and short in length which is causing you to crash. In the balloon sent when you display an Employee (or, in Odin terms, a Hired Merchant) includes bytes for nCurUsers and nMaxUsers. When nMaxUsers hits the maximum, thats when the circle is enabled because the client detects it to be full. Same goes for Mini Games. You have to set them to max, but to enable the "In Progress" you need to send bGameOn to true in the balloon packet. Otherwise it just won't update.

Now, the packet you posted is when you enter. Do you crash when you enter? If not, then this packet has nothing wrong with it besides the int for time being maxed and a hex stringed int of zeros for your mesos.

The packet causing dces when you leave is a leave packet. You should post that so I can see if it's correct. As for the Employee's balloon.. I don't even know if sources use that actually which explains why you never see the red circle. I remember when I looked for it in Moople a while ago they had the send header but the packet wasn't in MaplePacketCreator.. But that's the packet you're going to need in order to update the Hired Merchants' balloon which will display and handle the user count. I think currently Odin sources don't update the merchant, they just only show the initial box from when the Employee entered the field. This is also v62, so it may be even more behind than v83 sources that I am referencing.
 
Upvote 0
Newbie Spellweaver
Joined
Jan 22, 2009
Messages
72
Reaction score
0
Still haven't learned packets and IDA? I still highly recommend reading some tutorials and learning because you're going to need that kind of understanding in order to fix these kinds of things on your own..

The red circle (which I assume means it's full or something?) would be sent on the balloon with the other information, not when you OnEnter into a MiniRoom. It's the same issue that occurs with minigames, all Odin sources just have the bytes wrong or misplaced. The packet when they leave is just wrong and short in length which is causing you to crash. In the balloon sent when you display an Employee (or, in Odin terms, a Hired Merchant) includes bytes for nCurUsers and nMaxUsers. When nMaxUsers hits the maximum, thats when the circle is enabled because the client detects it to be full. Same goes for Mini Games. You have to set them to max, but to enable the "In Progress" you need to send bGameOn to true in the balloon packet. Otherwise it just won't update.

Now, the packet you posted is when you enter. Do you crash when you enter? If not, then this packet has nothing wrong with it besides the int for time being maxed and a hex stringed int of zeros for your mesos.

The packet causing dces when you leave is a leave packet. You should post that so I can see if it's correct. As for the Employee's balloon.. I don't even know if sources use that actually which explains why you never see the red circle. I remember when I looked for it in Moople a while ago they had the send header but the packet wasn't in MaplePacketCreator.. But that's the packet you're going to need in order to update the Hired Merchants' balloon which will display and handle the user count. I think currently Odin sources don't update the merchant, they just only show the initial box from when the Employee entered the field. This is also v62, so it may be even more behind than v83 sources that I am referencing.

i tried to learn them but no cause , you any guide for me or tut , something for starters , and that's all i have, i can teamviewer with ya if you give me ur skype on PM , please help me Eric really annoying ppl that plying my server.
Even LeaderMsrev2 dont have the fix for htat.



Still haven't learned packets and IDA? I still highly recommend reading some tutorials and learning because you're going to need that kind of understanding in order to fix these kinds of things on your own..

The red circle (which I assume means it's full or something?) would be sent on the balloon with the other information, not when you OnEnter into a MiniRoom. It's the same issue that occurs with minigames, all Odin sources just have the bytes wrong or misplaced. The packet when they leave is just wrong and short in length which is causing you to crash. In the balloon sent when you display an Employee (or, in Odin terms, a Hired Merchant) includes bytes for nCurUsers and nMaxUsers. When nMaxUsers hits the maximum, thats when the circle is enabled because the client detects it to be full. Same goes for Mini Games. You have to set them to max, but to enable the "In Progress" you need to send bGameOn to true in the balloon packet. Otherwise it just won't update.

Now, the packet you posted is when you enter. Do you crash when you enter? If not, then this packet has nothing wrong with it besides the int for time being maxed and a hex stringed int of zeros for your mesos.

The packet causing dces when you leave is a leave packet. You should post that so I can see if it's correct. As for the Employee's balloon.. I don't even know if sources use that actually which explains why you never see the red circle. I remember when I looked for it in Moople a while ago they had the send header but the packet wasn't in MaplePacketCreator.. But that's the packet you're going to need in order to update the Hired Merchants' balloon which will display and handle the user count. I think currently Odin sources don't update the merchant, they just only show the initial box from when the Employee entered the field. This is also v62, so it may be even more behind than v83 sources that I am referencing.
@Override
public int getVisitorSlot(MapleCharacter visitor) {
for (int i = 1; i < 3; i++) {
if (visitors == visitor) {
return i;
}
}
return 0;
}
 
Upvote 0
Interesting...
Loyal Member
Joined
Oct 25, 2008
Messages
1,372
Reaction score
604
i tried to learn them but no cause , you any guide for me or tut , something for starters , and that's all i have, i can teamviewer with ya if you give me ur skype on PM , please help me Eric really annoying ppl that plying my server.
Even LeaderMsrev2 dont have the fix for htat.

The packet when they leave is just wrong and short in length which is causing you to crash.

The packet causing dces when you leave is a leave packet. You should post that so I can see if it's correct.

There are quite a few guides for getting a basic grasp of packets. Check the tutorial section? Nobody sane is going to teamviewer/skype with you when you put in this little effort in asking for help. You're just asking to be spoonfed without learning a single thing. Eric literally told you that your packet is wrong because it is SHORT IN LENGTH. Then he even asked that you post the packet here so that he or somebody else can verify or offer more in-depth help and instead you decided to close your eyes, scroll around the file for a bit, open your eyes, and paste whatever code snippet your mouse happened to be on.

Either look for other v62 sources for differences, paste your actual packet here, or just add
Code:
mplew.writeZeroBytes(1000);
at the end of the packet which will likely prevent any DCs.
 
Upvote 0
Newbie Spellweaver
Joined
Jan 22, 2009
Messages
72
Reaction score
0
There are quite a few guides for getting a basic grasp of packets. Check the tutorial section? Nobody sane is going to teamviewer/skype with you when you put in this little effort in asking for help. You're just asking to be spoonfed without learning a single thing. Eric literally told you that your packet is wrong because it is SHORT IN LENGTH. Then he even asked that you post the packet here so that he or somebody else can verify or offer more in-depth help and instead you decided to close your eyes, scroll around the file for a bit, open your eyes, and paste whatever code snippet your mouse happened to be on.

Either look for other v62 sources for differences, paste your actual packet here, or just add
Code:
mplew.writeZeroBytes(1000);
at the end of the packet which will likely prevent any DCs.

i've tryied to add it end of the code , didn't helped me i searched at the help section and found nothiing can you gemme the guide to understand the packets , pelase.
 
Upvote 0
Junior Spellweaver
Joined
Sep 11, 2014
Messages
181
Reaction score
76
i've tryied to add it end of the code , didn't helped me i searched at the help section and found nothiing can you gemme the guide to understand the packets , pelase.

What about the beginner's packet guide? http://forum.ragezone.com/f428/updating-server-version-updated-762816/
It has some decent information even today when everyone relevant uses IDA. It didn't get 100+ thanks for nothing!
Also it manages to call out people like Flav, and people that thank others who release bad packets.

I recommend the second post.
 
Upvote 0
Newbie Spellweaver
Joined
Jan 22, 2009
Messages
72
Reaction score
0
Upvote 0
Junior Spellweaver
Joined
Sep 11, 2014
Messages
181
Reaction score
76
thanks i'll try it out , hope it will handle v62.

The concepts work for any versions. It's what I used to upgrade v62 to v75.

Friendly tip: Add mplew.writeZeroBytes(573); at the end of each Hired Merchant packet, right before return mplew.getPacket();
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Sep 11, 2014
Messages
181
Reaction score
76
added, accept me , thank you.

Forgot the password, sorry. I don't use skype.

Did this work for you?
Friendly tip: Add mplew.writeZeroBytes(573); at the end of each Hired Merchant packet, right before return mplew.getPacket();
 
Upvote 0
Back
Top