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!

Better @stat

Status
Not open for further replies.
Junior Spellweaver
Joined
Jun 27, 2008
Messages
148
Reaction score
0
PHP:
else if (splitted[0].equals("@str")) {
                   int up;
                    up = Integer.parseInt(splitted[1]);
                    if ( player.getRemainingAp() < up ||  player.getRemainingAp() < 0 || player.getStr() >= 2000 || up < 0) {
                        mc.dropMessage("Insufficient AP or above the 2000 limit.");
                    } else if ( player.getRemainingAp() > 0) {
                          player.setStr(player.getStr() + up);
                          player.setRemainingAp(player.getRemainingAp() - up);
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                          player.updateSingleStat(MapleStat.STR, player.getStr());
                }
                 
                }else if (splitted[0].equals("@int")) {
                   int up;
                    up = Integer.parseInt(splitted[1]);
                    if ( player.getRemainingAp() < up ||  player.getRemainingAp() < 0 || player.getInt() >= 2000 || up < 0) {
                        mc.dropMessage("Insufficient AP or above the 2000 limit");
                    } else if ( player.getRemainingAp() > 0) {
                          player.setInt(player.getInt() + up);
                          player.setRemainingAp(player.getRemainingAp() - up);
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                          player.updateSingleStat(MapleStat.INT, player.getInt());
                }
                    //DEX
                }else if (splitted[0].equals("@dex")) {
                   int up;
                    up = Integer.parseInt(splitted[1]);
                    if ( player.getRemainingAp() < up ||  player.getRemainingAp() < 0 || player.getDex() >= 2000 || up < 0) {
                        mc.dropMessage("Insufficient AP or above the 2000 limit");
                    } else if ( player.getRemainingAp() > 0) {
                          player.setDex(player.getDex() + up);
                          player.setRemainingAp(player.getRemainingAp() - up);
                           player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                          player.updateSingleStat(MapleStat.DEX, player.getDex());
                }
                    //LUCK
                }else if (splitted[0].equals("@luk")) {
                   int up;
                    up = Integer.parseInt(splitted[1]);
                    if ( player.getRemainingAp() < up ||  player.getRemainingAp() < 0 || player.getLuk() >= 2000 || up < 0) {
                        mc.dropMessage("Insufficient AP or above the 2000 limit");
                    } else if ( player.getRemainingAp() > 0) {
                          player.setLuk(player.getLuk() + up);
                             player.setRemainingAp(player.getRemainingAp() - up);
                           player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                          player.updateSingleStat(MapleStat.LUK, player.getLuk());
                }
                        }
Has a limit for stats, and it also has a fix where you could have done @stat -#.
Enjoy.
Credits to that guy who coded it first and me for sexifying it? D:
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
71
Reaction score
1
Re: [Release] Better @stat

so wats the limit 2000

its nt bad better then the one i have with infinite @str and etc
 
You've got my respect!
Joined
Apr 8, 2008
Messages
508
Reaction score
147
Re: [Release] Better @stat

-I'm tired ._.-
 
Junior Spellweaver
Joined
Jun 27, 2008
Messages
148
Reaction score
0
Re: [Release] Better @stat

This seems stupid, you have to have at least 2000 in the stat if you want to use the command?
At least you fixed: @str -50000
What? Do you know how to read English?
If there's a "limit" that means maximum, not minimum, therefor your "at least" is nullified. So you're wrong, sir.
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
71
Reaction score
1
Re: [Release] Better @stat

highest is 2k 2k isnt needed this is better then the other normal release
 
You've got my respect!
Joined
Apr 8, 2008
Messages
508
Reaction score
147
Re: [Release] Better @stat

-I'm tired ._.-
Sorry about that.
 
Junior Spellweaver
Joined
Jun 27, 2008
Messages
148
Reaction score
0
Re: [Release] Better @stat

"player.getDex() >= 2000"
=
you must have at least 2000 in dex

Code:
                    if ( player.getRemainingAp() < up ||  player.getRemainingAp() < 0 || player.getInt() >= 2000 || up < 0) {
                        mc.dropMessage("Insufficient AP or above the 2000 limit");
                    }
If the player has 2000 and you're trying to add more, it'll say you're over.
learn2/if,else/
 
Newbie Spellweaver
Joined
Jul 7, 2008
Messages
19
Reaction score
0
Re: [Release] Better @stat

very nice.
 
Newbie Spellweaver
Joined
Jul 7, 2008
Messages
19
Reaction score
0
Re: [Release] Better @stat

v1ral do you know if using mega tubi for adding stats/skills fast will cause anything bad.
 
Experienced Elementalist
Joined
May 19, 2008
Messages
281
Reaction score
0
Re: [Release] Better @stat

is this protected against? @str - 29999 , its a known bug . clarify me if i said something wrong ;x
 
Experienced Elementalist
Joined
May 19, 2008
Messages
281
Reaction score
0
Re: [Release] Better @stat

Ok sexy sexy command, thanks v1ral :D
 
Newbie Spellweaver
Joined
Jul 17, 2008
Messages
35
Reaction score
0
Re: [Release] Better @stat

cool ~
 
Skilled Illusionist
Joined
Apr 4, 2008
Messages
382
Reaction score
2
Re: [Release] Better @stat

I love this guy lol always fixing and perfecting stuff and creating poop no one would ever think about
 
Experienced Elementalist
Joined
Jun 18, 2008
Messages
216
Reaction score
0
Re: [Release] Better @stat

Credits to that guy who coded it first and me for sexifying it? D:

lol that guy
 
Newbie Spellweaver
Joined
Jul 3, 2008
Messages
10
Reaction score
0
Re: [Release] Better @stat

Nice job! I tried doing this myself but I couldn't get it working..
 
Newbie Spellweaver
Joined
Jun 1, 2008
Messages
91
Reaction score
0
Re: [Release] Better @stat

This is what I've been looking for due to my old @stat command passing my cap. Thank you.
 
Status
Not open for further replies.
Back
Top