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!

[Release] !str !dex[playername] [amount] command

Junior Spellweaver
Joined
Apr 29, 2008
Messages
199
Reaction score
0
original code:

http://forum.ragezone.com/showthread.php?t=448726

half of the credits go to him XD

commands:
!str [playername] [amount]
!dex [playername] [amount]
!int [playername] [amount]
!luk [playername] [amount]


put this in CommandProccesor.java
Code:
else if (splitted[0].equals("!str")) { 
                              int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setStr(up);
                    player.updateSingleStat(MapleStat.STR, player.getStr());                            

                        }else if (splitted[0].equals("!dex")) { 
                              int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setDex(up);
                    player.updateSingleStat(MapleStat.DEX, player.getStr());                            
        }else if (splitted[0].equals("!luk")) { 
                                           int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setLuk(up);
                    player.updateSingleStat(MapleStat.LUK, player.getStr());                            
        } else if (splitted[0].equals("!int")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setInt(up);
                    player.updateSingleStat(MapleStat.INT, player.getStr());                                             
                             
                             
			}

here for hp maxhp mp and maxmp

commands:
!hp [playername] [amount]
!max [playername] [amount]
!mp [playername] [amount]
!maxmp [playername] [amount]

Code:
else if (splitted[0].equals("!hp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setHp(up);
                    player.updateSingleStat(MapleStat.HP, player.getHp());                                         
                     
                    } else if (splitted[0].equals("!maxhp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);
                    victim.setHp(up);
                    player.updateSingleStat(MapleStat.HP, player.getHp()); 
                    victim.setMaxHp(up);
                    player.updateSingleStat(MapleStat.MAXHP, player.getMaxHp()); 
                    
                   } else if (splitted[0].equals("!mp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setMp(up);
                    player.updateSingleStat(MapleStat.MP, player.getMp()); 
                    
                    } else if (splitted[0].equals("!maxmp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                    up = Integer.parseInt(splitted[2]);              
                    victim.setMaxMp(up);
                    player.updateSingleStat(MapleStat.MAXMP, player.getMaxMp()); 
                    victim.setMp(up);
                    player.updateSingleStat(MapleStat.MP, player.getMp()); 
			}


commands:
!sp [playername] [amount]


Code:
else if (splitted[0].equals("!sp")) {
				player.setRemainingSp(getOptionalIntArg(splitted, 1, 1));
				player.updateSingleStat(MapleStat.AVAILABLESP, player.getRemainingSp());
		}
 
Last edited:
Skilled Illusionist
Joined
Apr 11, 2008
Messages
302
Reaction score
0
Thanks for this. Will this work?

} else if (splitted[0].equals("!hp")) {
hp up;
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
up = Integer.parseHp(splitted[2]);
victim.setHp(up);
player.updateSingleStat(MapleStat.HP, player.getStr());
 
Junior Spellweaver
Joined
Apr 29, 2008
Messages
199
Reaction score
0
Thanks for this. Will this work?

} else if (splitted[0].equals("!hp")) {
hp up;
MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
up = Integer.parseHp(splitted[2]);
victim.setHp(up);
player.updateSingleStat(MapleStat.HP, player.getStr());

No but here is fix

Code:
} else if (splitted[0].equals("!hp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage.getCharacterByName(splitted[1]);
                    up = Integer.parseHp(splitted[2]);              
 
                   victim.setHp(up);
                    player.updateSingleStat(MapleStat.HP, player.geHp());
}

up is just an integer int is not interlect as maplestat
and u didnt look at player.getStr()
but its fixed now

here is for maxhp change

Code:
} else if (splitted[0].equals("!hp")) { 
                                          int up;
                    MapleCharacter victim = cserv.getPlayerStorage.getCharacterByName(splitted[1]);
                    up = Integer.parseHp(splitted[2]);              
 
                   victim.setHp(up);
                    player.updateSingleStat(MapleStat.HP, player.geHp());
                   victim.setMaxHp(up);
                    player.updateSingleStat(MapleStat.MAXHP, player.geHp());
}
 
Junior Spellweaver
Joined
Apr 29, 2008
Messages
199
Reaction score
0
it sets the amount
so ...
if u put 10 the stat is 10
if u put 1000 the stat is 1000
 
Legendary Battlemage
Loyal Member
Joined
May 4, 2008
Messages
644
Reaction score
19
You should put a tag for what source, For those people that don't know.
 
Initiate Mage
Joined
Aug 10, 2008
Messages
3
Reaction score
0
You didn't say to put it WHERE.
I'm a noob at making commands.
I'm using PCMaple
Any help?
 
Newbie Spellweaver
Joined
Oct 27, 2008
Messages
8
Reaction score
0
All these threads just have a bunch of text and tells you to insert it into a .java file that has a ton of text but I don't know where in the file to insert it.
 
Experienced Elementalist
Joined
Jul 1, 2008
Messages
270
Reaction score
0
All these threads just have a bunch of text and tells you to insert it into a .java file that has a ton of text but I don't know where in the file to insert it.

learn java and you will and don't bump up old threads
 
Back
Top