Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

@resetstr @resetint @resetdex @resetluk commands

Experienced Elementalist
Joined
Jul 26, 2008
Messages
280
Reaction score
0
Location
SiNGaPoRe
Since I couldn't find this anywhere on the forums, I decided to release it. Instead of resetting your whole ap from an npc, you can choose how much to reset what with a command. Credits goes to me for creating this and airflow0 for creating @setstats command. *Note* This method is assuming you have @str @int @dex @luk commands in your server.

First, open CommandProcessor.java. Make sure you have this import, if not add it.
Code:
import net.sf.odinms.client.MapleStat;
After that, find
Code:
} else if (splitted[0].equals("@str")) {
Above it, add
Code:
} else if (splitted[0].equals("@resetstr")) {
                   int down;
                    down = Integer.parseInt(splitted[1]);
                    if ( player.getStr() < 4 || player.getStr() - down <= 4) {
                        mc.dropMessage("Reached minimum str.");
                    } else if ( player.getStr() < down) {
                        mc.dropMessage("Not enough str to reset");
                    } else {
                          player.setStr(player.getStr() - down);
                          player.setRemainingAp(player.getRemainingAp() + down);
                          player.updateSingleStat(MapleStat.STR, player.getStr());
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                }
                    //INT 
                }else if (splitted[0].equals("@resetint")) {
                   int down;
                    down = Integer.parseInt(splitted[1]);
                    if ( player.getInt() < 4 || player.getInt() - down <= 4) {
                        mc.dropMessage("Reached minimum int.");
                    } else if ( player.getInt() < down) {
                        mc.dropMessage("Not enough int to reset");
                    } else {
                          player.setInt(player.getInt() - down);
                          player.setRemainingAp(player.getRemainingAp() + down);
                          player.updateSingleStat(MapleStat.INT, player.getInt());
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                }
                    //DEX
                }else if (splitted[0].equals("@resetdex")) {
                   int down;
                    down = Integer.parseInt(splitted[1]);
                    if ( player.getDex() < 4 || player.getDex() - down <= 4) {
                        mc.dropMessage("Reached minimum dex.");
                    } else if ( player.getDex() < down) {
                        mc.dropMessage("Not enough dex to reset");
                    } else {
                          player.setDex(player.getDex() - down);
                          player.setRemainingAp(player.getRemainingAp() + down);
                          player.updateSingleStat(MapleStat.DEX, player.getDex());
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                }
                    //LUCK
                }else if (splitted[0].equals("@resetluk")) {
                   int down;
                    down = Integer.parseInt(splitted[1]);
                    if ( player.getLuk() < 4 || player.getLuk() - down <= 4) {
                        mc.dropMessage("Reached minimum luk.");
                    } else if ( player.getLuk() < down) {
                        mc.dropMessage("Not enough luk to reset");
                    } else {
                          player.setLuk(player.getLuk() - down);
                          player.setRemainingAp(player.getRemainingAp() + down);
                          player.updateSingleStat(MapleStat.LUK, player.getLuk());
                          player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                }
You can still add this if you don't have @str commands. Just add the above code anywhere you like in the commands. Tested and working.
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

thanks :)
ill use it for sure:)(:
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

isnt that what a stat reseter is for?
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

Uh not really. This is more convenient. A stat resetter requires you to go to the npc and reset ALL of your stats back to 4. This allows you to choose how much you want to reset a stat and you just have to type in e.g. @resetstr 5. Also saves time from making an ap reset npc.
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

but you could just make the npc command so
@stat reseter, would open the stat reseter
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

At least you get the freedom to choose what to reset and not to reset everything :P
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

no, most server have a stat reseter that you can choose what to reset
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

Oh then don't use it if you don't want to. Nobody is forcing you to use this.
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

Nice release but u Im add this on my server @reset and it pops up a list letting u choose which u want to do instead of remembering all those commands =)
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

nice release man i should add it to my pserver =D
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

xblackcat you're truely retarded, either you want to get into an argument to up your post count, or just an idiot. This is very useful. Save you the time from going to a npc. Very nice
 
Re: [Release] @resetstr @resetint @resetdex @resetluk commands

nice been looking for this
 
Back