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!

Just got back to the Maple Scene

Newbie Spellweaver
Joined
May 3, 2014
Messages
90
Reaction score
4
I just got back to the Maple scene after school being busy... and I'm stuck on one thing at moment. well, not stuck more like I completely forget how this works..

Code:
public static class resetap extends CommandExecute {        
@[I][B][URL="http://forum.ragezone.com/members/2000004426.html"]Override[/URL][/B][/I]
        public int execute(MapleClient c, String[] splitted) {
            c.getPlayer().setStr(4);
            c.getPlayer().setDex(4);
            c.getPlayer().setInt(4);
            c.getPlayer().setLuk(4);
            c.getPlayer().updateAllStats(0, true);
            return 1;
        }
    }

Is what I made to resetap, but the issue is with my source is that when it resets the ap, it doesn't go back to the remaining AP , it just deletes it.

Thats my issue atm, I also am wondering how some sources have ti that when they do @str -400, it subtructs the output amount and adds back to remaining ap.
 
Custom Title Activated
Loyal Member
Joined
Mar 14, 2010
Messages
5,363
Reaction score
1,343
I just got back to the Maple scene after school being busy... and I'm stuck on one thing at moment. well, not stuck more like I completely forget how this works..

Code:
public static class resetap extends CommandExecute {        
@[I][B][URL="http://forum.ragezone.com/members/2000004426.html"]Override[/URL][/B][/I]
        public int execute(MapleClient c, String[] splitted) {
            c.getPlayer().setStr(4);
            c.getPlayer().setDex(4);
            c.getPlayer().setInt(4);
            c.getPlayer().setLuk(4);
            c.getPlayer().updateAllStats(0, true);
            return 1;
        }
    }

Is what I made to resetap, but the issue is with my source is that when it resets the ap, it doesn't go back to the remaining AP , it just deletes it.

Thats my issue atm, I also am wondering how some sources have ti that when they do @str -400, it subtructs the output amount and adds back to remaining ap.

Of course it won't give you back your AP. You're using setStr, setDex, setInt and setLuk. You're overriding the current stats they have and making them 4. You have 0 code to actually give back any ap that was used.
 
Upvote 0
Initiate Mage
Joined
Dec 11, 2014
Messages
4
Reaction score
9
oh... That makes much more sense... what would be the proper code?

Code:
totalAP = remainingAP + str + luk + int + dex
str = 4 //4
luk = 4 //8
int = 4 //12
dex = 4 //16
remainingAp = totalAP - 16

I think you can implement.
 
Upvote 0
Junior Spellweaver
Joined
Jan 2, 2014
Messages
150
Reaction score
50
Code:
totalAP = remainingAP + str + luk + int + dex
str = 4 //4
luk = 4 //8
int = 4 //12
dex = 4 //16
remainingAp = totalAP - 16

I think you can implement.
No need to remove 16 as you start with 4 everything.
 
Upvote 0
Back
Top