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!

Unable to Recharge Certain Items (Stars, Bullets)

Discord: .z41n
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
Hi All,

Balanced Fury's recharge fine. However other rechargeable items don't have the option.
I checked MapleShop and see all the items are there, including BF:

PHP:
public class MapleShop {
    private static final Set<Integer> rechargeableItems = new LinkedHashSet<>();
    private int id;
    private int npcId;
    private List<MapleShopItem> items;
    private int tokenvalue = 1000000000;
    private int token = 4000313;

    static 
    {
        // BULLETS ADD RECHARGE
        rechargeableItems.add(2330000);
        rechargeableItems.add(2330001);
        rechargeableItems.add(2330002);
        rechargeableItems.add(2330003);
        rechargeableItems.add(2330004);
        rechargeableItems.add(2330005);
        
        // STARS ADD RECHARGE
        rechargeableItems.add(2070000);
        rechargeableItems.add(2070001);
        rechargeableItems.add(2070008);
        rechargeableItems.add(2070002);
        rechargeableItems.add(2070009);
        rechargeableItems.add(2070012);
        rechargeableItems.add(2070013);
        rechargeableItems.add(2070003);
        rechargeableItems.add(2070010);
        rechargeableItems.add(2070011);
        rechargeableItems.add(2070004);
        rechargeableItems.add(2070005);
        rechargeableItems.add(2070006);
        rechargeableItems.add(2070007);
        rechargeableItems.add(2070016);
        rechargeableItems.add(2070018);
    }

BF is 2070018, and when I commented that line out, BF were unable to be recharged (as expected).
So I'm not sure why the others are not registering.
Item ID's were confirmed correct.

Any ideas? I hope this isn't a client issue
 
Discord: .z41n
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
This is due to your WZ's.

Yup you're right, used an old set and it worked but still need to use my new wz instead of the old ones due to new items I've added.

To fix this, I compared the new and the old, here's what I found:

Old XML Data for Illbis (Recharge works):
PHP:
  <imgdir name="02070006">
    <imgdir name="info">
      <canvas name="icon" width="27" height="30">
        <vector name="origin" x="-3" y="30"/>
        <int name="z" value="0"/>
      </canvas>
      <canvas name="iconRaw" width="27" height="27">
        <vector name="origin" x="-3" y="30"/>
        <int name="z" value="0"/>
      </canvas>
      <int name="price" value="20000"/>
      <int name="slotMax" value="800"/>
      <double name="unitPrice" value="0,8"/>
      <int name="incPAD" value="27"/>
      <int name="reqLevel" value="10"/>
    </imgdir>
    <imgdir name="bullet">
      <canvas name="0" width="27" height="27">
        <vector name="origin" x="13" y="13"/>
        <int name="z" value="0"/>
      </canvas>
      <canvas name="1" width="27" height="27">
        <vector name="origin" x="13" y="13"/>
        <int name="z" value="0"/>
      </canvas>
    </imgdir>
  </imgdir>

New XML for Ilbis (Recharge does NOT work):
PHP:
    <imgdir name="02070006">
        <imgdir name="info">
            <canvas name="icon" width="27" height="30">
                <vector name="origin" x="-3" y="30" />
                <int name="z" value="0" />
            </canvas>
            <canvas name="iconRaw" width="27" height="27">
                <vector name="origin" x="-3" y="30" />
                <int name="z" value="0" />
            </canvas>
            <int name="price" value="20000" />
            <int name="slotMax" value="800" />
            <double name="unitPrice" value="0.8" />
            <int name="incPAD" value="27" />
            <int name="reqLevel" value="10" />
        </imgdir>
        <imgdir name="bullet">
            <canvas name="0" width="27" height="27">
                <vector name="origin" x="13" y="13" />
                <int name="z" value="0" />
            </canvas>
            <canvas name="1" width="27" height="27">
                <vector name="origin" x="13" y="13" />
                <int name="z" value="0" />
            </canvas>
        </imgdir>
    </imgdir>

The only line that was different was Unit Price, which was 0.8 and I changed it to 0,8. Restarted server, and it didn't work.

Any ideas, @Monokuma
 
Last edited:
Upvote 0
Discord: .z41n
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
I already gave you the exact root of your problem, you still don't see the issue?

Well I looked into the WZ as you mentioned, tested the old version (which worked), compared the code, found a difference, made the change, and its still not working. Since all you said is "This is due to your WZ's", and I just showed you what I did for the WZ, I'm not sure what else you mean.

Also, I'm looking at the XMLs on the server side rather than the WZ on the client side because changing the XMLs alone made it work. Considering I just compared the two codes for illbis, I'm unsure where else to look.

Can you push me a little further please?
 
Upvote 0
Back
Top