• Scheduled Server Maintenance | Friday 6 November

    Our hardware provider has scheduled RAM maintenance to address the recent server instability. Work is expected by 17:00 Central European time.

    Brief downtime or interruptions may occur while the faulty memory modules are replaced. We apologise for the recent disruption and appreciate your patience.


    Special thanks to our sponsor, HyperFilter!

    We keep our community safe. They keep our servers safe. Running your own game servers? Keep them protected with HyperFilter.

Complete Stat Reset Player Command

point me out, why im not right.
and, this command is a failure, there are lot better stat reset command/npc out there.

opps found.
Code:
player.setRemainingAp(player.getRemainingAp + newStat);

i missed a player.
 
That's not it.
player.setRemainingAp(newStat);
player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());

It's doing after you set remainingap to newstat.
getRemainingAP will be newstat. It's obvious.
 
looks, here's the different.
let's say your newStat = 100
and you have 50 base remaingap, after u use this command, u'll still get 100 ap.

but mine,
you'll get 150 ap.

i don't understand why u wanna set it to newStat but not gaining newStat.
 
Dude, you're totally wrong. You are setting AP, not adding it. If you have 50 base remaining AP, you're screwed with this script AND yours.

You have to put it on the top like this:
int newStat = Dex + Int + Str + Luk - 16 + c.getPlayer().getRemainingAp();
 
Dude, you're totally wrong. You are setting AP, not adding it. If you have 50 base remaining AP, you're screwed with this script AND yours.

You have to put it on the top like this:
int newStat = Dex + Int + Str + Luk - 16 + c.getPlayer().getRemainingAp();

yeah i noticed, wasnt really [aying attention at 3 o'clock in the morning...
 
i am using thepack repack rev 76 will it work there and if it does where do i put the command

Yes it should work for almost all Java Sources. If you really want to add custom commands to your server, I suggest you learn where to put them and take a look through your source.
 
Back