AP reset commands, both GM and regular.

Newbie Spellweaver
Joined
Jul 7, 2008
Messages
22
Reaction score
0
Hello everyone, Sleepwlker here with my first release!(Yay?)
Well, I was bored, so I made some new commands. They are:
!statreset
The GM version sets all stats to 30k.
@statreset
regular version gives a plain reset.

First off, if you haven't added @BLANK commands yet, do this.
Find you're commandprocessor.java.
It should be in Seansource 5.9\src\net\sf\odinms\client\messages
Find
Code:
if (line.charAt(0) == '!' && isGM) {
and replace it with
Code:
if (line.charAt(0) == '!' && isGM || line.charAt(0) =='@') {

Then find
Code:
 else if (splitted[0].equals("!job")) {
				c.getPlayer().changeJob(MapleJob.getById(Integer.parseInt(splitted[1])));
			}
and after that place this:
Code:
 else if (splitted[0].equals("@statreset")) { 
			
			player.setRemainingAp(player.getRemainingAp() + player.getDex() + player.getInt() + player.getStr() + player.getLuk() - 16);			
                          
			player.setStr(4);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.STR, player.getStr());

			player.setDex(4);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.DEX, player.getDex());

			player.setInt(4);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.INT, player.getInt());

			player.setLuk(4);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.LUK, player.getLuk());

			} else if (splitted[0].equals("!statreset")) { 			
                        
			player.setRemainingAp(0);			
  
			player.setStr(30000);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.STR, player.getStr());

			player.setDex(30000);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.DEX, player.getDex());

			player.setInt(30000);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.INT, player.getInt());

			player.setLuk(30000);
                       	player.setRemainingAp(player.getRemainingAp());
                        player.updateSingleStat(MapleStat.AVAILABLEAP, player.getRemainingAp());
                        player.updateSingleStat(MapleStat.LUK, player.getLuk());

			}

Feel free to edit this, remember to clean+compile after adding it. If you are going to edit this and repost, please give me credit.
 
Back