Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Perfect Pitch Shop v83

Elite Diviner
Joined
Dec 10, 2012
Messages
475
Reaction score
9
Hello there, can anyone share the perfect pitch shop script v83 here?
Using Solaxia and cant seem to find one around here.

Thanks in advanced!
 
Junior Spellweaver
Joined
Aug 5, 2011
Messages
132
Reaction score
10
This is the packet for NPC shops:
PHP:
public static byte[] getNPCShop(MapleClient c, int sid, List<MapleShopItem> items) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendOpcode.OPEN_SHOP_DLG.getValue());
        mplew.writeInt(sid);
        mplew.writeShort(items.size());
        for (MapleShopItem item : items) {
            mplew.writeInt(item.getItemId());
            mplew.writeInt(item.getPrice());
            mplew.writeInt(item.getPrice() == 0 ? item.getPitch() : 0);
            mplew.writeInt(0);
            mplew.writeInt(0);
            if (!ItemConstants.isRechargable(item.getItemId())) {
                mplew.writeShort(1);
                mplew.writeShort(item.getBuyable());
            } else {
                mplew.writeShort(0);
                mplew.writeInt(0);
                mplew.writeShort(doubleToShortBits(ItemInfo.getPrice(item.getItemId())));
                mplew.writeShort(ItemInfo.getSlotMax(item.getItemId()));
            }
        }
        return mplew.getPacket();
    }

As you can see, Perfect Pitches are handled here:
PHP:
mplew.writeInt(item.getPrice() == 0 ? item.getPitch() : 0);
I don't use Perfect Pitch shops in my server, but from what I understand, you need to add the shop items to the NPC shop in your database and set the item's price to 0, then have a column for Perfect Pitches and set the number of pitches required for the item accordingly. After that, it should work as intended (assuming you properly read from the pitch column).
 
Upvote 0
Junior Spellweaver
Joined
Sep 9, 2015
Messages
132
Reaction score
10
You just put what you want in the SQL on 'shopitems' in the pitch column the price.
The shop ID is 1338.
 
Upvote 0
Back
Top