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] !slap command

Newbie Spellweaver
Joined
Apr 21, 2008
Messages
75
Reaction score
4
this is a simple command that took about 10 minutes to make. it enables you to slap sombody with a certain amount of damage.

EDIT: made three separate command out of bordum..

here is the command put it in your commandprocessor.java


This is the one that can hit up to 12 people at once.
PHP:
else if (splitted[0].equals("!slap")) {
                                        int loss = Integer.parseInt(splitted[2]);
                                        MapleCharacter victim1 = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                                        victim1.setHp(victim1.getHp()-loss);
                                        victim1.setMp(victim1.getMp()-loss);
                                        victim1.updateSingleStat(MapleStat.HP, victim1.getHp()-loss);
                                        victim1.updateSingleStat(MapleStat.MP, victim1.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim1.getName()+".");
                                        MapleCharacter victim2 = cserv.getPlayerStorage().getCharacterByName(splitted[2]);
                                        victim2.setHp(victim2.getHp()-loss);
                                        victim2.setMp(victim2.getMp()-loss);
                                        victim2.updateSingleStat(MapleStat.HP, victim2.getHp()-loss);
                                        victim2.updateSingleStat(MapleStat.MP, victim2.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim2.getName()+".");
                                        MapleCharacter victim3 = cserv.getPlayerStorage().getCharacterByName(splitted[3]);
                                        victim3.setHp(victim3.getHp()-loss);
                                        victim3.setMp(victim3.getMp()-loss);
                                        victim3.updateSingleStat(MapleStat.HP, victim3.getHp()-loss);
                                        victim3.updateSingleStat(MapleStat.MP, victim3.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim3.getName()+".");
                                        MapleCharacter victim4 = cserv.getPlayerStorage().getCharacterByName(splitted[4]);
                                        victim4.setHp(victim4.getHp()-loss);
                                        victim4.setMp(victim4.getMp()-loss);
                                        victim4.updateSingleStat(MapleStat.HP, victim4.getHp()-loss);
                                        victim4.updateSingleStat(MapleStat.MP, victim4.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim4.getName()+".");
                                        MapleCharacter victim5 = cserv.getPlayerStorage().getCharacterByName(splitted[5]);
                                        victim5.setHp(victim5.getHp()-loss);
                                        victim5.setMp(victim5.getMp()-loss);
                                        victim5.updateSingleStat(MapleStat.HP, victim5.getHp()-loss);
                                        victim5.updateSingleStat(MapleStat.MP, victim5.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim5.getName()+".");
                                        MapleCharacter victim6 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim6.setHp(victim6.getHp()-loss);
                                        victim6.setMp(victim6.getMp()-loss);
                                        victim6.updateSingleStat(MapleStat.HP, victim6.getHp()-loss);
                                        victim6.updateSingleStat(MapleStat.MP, victim6.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim6.getName()+".");
                                        MapleCharacter victim7 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim7.setHp(victim7.getHp()-loss);
                                        victim7.setMp(victim7.getMp()-loss);
                                        victim7.updateSingleStat(MapleStat.HP, victim7.getHp()-loss);
                                        victim7.updateSingleStat(MapleStat.MP, victim7.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim7.getName()+".");
                                        MapleCharacter victim8 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim8.setHp(victim8.getHp()-loss);
                                        victim8.setMp(victim8.getMp()-loss);
                                        victim8.updateSingleStat(MapleStat.HP, victim8.getHp()-loss);
                                        victim8.updateSingleStat(MapleStat.MP, victim8.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim8.getName()+".");
                                        MapleCharacter victim9 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim9.setHp(victim9.getHp()-loss);
                                        victim9.setMp(victim9.getMp()-loss);
                                        victim9.updateSingleStat(MapleStat.HP, victim9.getHp()-loss);
                                        victim9.updateSingleStat(MapleStat.MP, victim9.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim9.getName()+".");
                                        MapleCharacter victim10 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim10.setHp(victim10.getHp()-loss);
                                        victim10.setMp(victim10.getMp()-loss);
                                        victim10.updateSingleStat(MapleStat.HP, victim10.getHp()-loss);
                                        victim10.updateSingleStat(MapleStat.MP, victim10.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim10.getName()+".");
                                        MapleCharacter victim11 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim11.setHp(victim11.getHp()-loss);
                                        victim11.setMp(victim11.getMp()-loss);
                                        victim11.updateSingleStat(MapleStat.HP, victim11.getHp()-loss);
                                        victim11.updateSingleStat(MapleStat.MP, victim11.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim11.getName()+".");
                                         MapleCharacter victim12 = cserv.getPlayerStorage().getCharacterByName(splitted[6]);
                                        victim12.setHp(victim12.getHp()-loss);
                                        victim12.setMp(victim12.getMp()-loss);
                                        victim12.updateSingleStat(MapleStat.HP, victim12.getHp()-loss);
                                        victim12.updateSingleStat(MapleStat.MP, victim12.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim12.getName()+".");
// made by Kirby

This is more stable, only hits one person at a time.
PHP:
else if (splitted[0].equals("!slap")) {
                                        int loss = Integer.parseInt(splitted[2]);
                                        MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                                        victim.setHp(victim.getHp()-loss);
                                        victim.setMp(victim.getMp()-loss);
                                        victim.updateSingleStat(MapleStat.HP, victim.getHp()-loss);
                                        victim.updateSingleStat(MapleStat.MP, victim.getMp()-loss);
                                        mc.dropMessage("You slapped " +victim.getName()+".");
                                        
                        }

This one slaps everybody in the room (tested)
to use this one type simply this: !slapeveryone <anycharactername> <amount>
PHP:
else if (splitted[0].equals("!slapeveryone")) {
                               int loss = Integer.parseInt(splitted[2]);
                               for (MapleCharacter victims : cserv.getPlayerStorage().getAllCharacters())
                                   if (victims != null) {
                                       victims.setHp(victims.getHp()-loss);;
                                       victims.setMp(victims.getMp()-loss);
                                       victims.updateSingleStat(MapleStat.HP, victims.getHp()-loss);
                                       victims.updateSingleStat(MapleStat.MP, victims.getMp()-loss);
                                       mc.dropMessage("You slapped EVERYBODY! People you slapped include: " +victims.getName()+".");
                                         // remove line above if you have a GIANT server with houndreds of people in one town at a time
   
                                   }         
                        
                        }

if this was already released somwhere, i did not no that. well enjoy tell me if there are any problems with it
 
Last edited:
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: !slap command

Lol did u make the animation for anego show up?
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: !slap command

Nvm... From looking at ur script... I don't think it has the slap animation :p
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: !slap command

So you finally got the !slap command you wanted. Very nice, Congrats lol.
 
Junior Spellweaver
Joined
Jul 28, 2008
Messages
154
Reaction score
1
Re: !slap command

Sorry if i've offended you, but, it looks useless, unless there's an anego slap animation.

Otherwise the player who got "slapped" will be puzzled on why their hp/mp decreased suddenly.
 
Newbie Spellweaver
Joined
Apr 5, 2008
Messages
73
Reaction score
0
Re: !slap command

It'd make sense if the player flew a lil like a flash jump :) nice job though
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: !slap command

It would be RLY cool if you added the anego animation :p
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: !slap command

time to make it a player command and enter pvp :D
 
Banned
Banned
Joined
Jun 23, 2008
Messages
197
Reaction score
0
Re: !slap command

Add [Release] Or you'll be warned.
 
Λκαяυz føяeνeя
Loyal Member
Joined
Jun 28, 2008
Messages
1,950
Reaction score
73
Re: !slap command

time to make it a player command and enter pvp :D

Wooohoo
Ideas!:
- warps to pvp (ur doing it now xD)
- warps to henesys and such @warp (this will make the players more happy and feel special)
- @job (gives next job as if thier like a rogue it will make them a assasin or dit, if so it will check if Double stab was maxed or lucky seven)
- @commands (tells all player commands)
 
Newbie Spellweaver
Joined
Apr 21, 2008
Messages
75
Reaction score
4
Re: !slap command

Wooohoo
Ideas!:
- warps to pvp (ur doing it now xD)
- warps to henesys and such @warp (this will make the players more happy and feel special)
- @job (gives next job as if thier like a rogue it will make them a assasin or dit, if so it will check if Double stab was maxed or lucky seven)
- @commands (tells all player commands)

some of those commands exist, i know my server has @commands and the warp things for players.
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: !slap command

some of those commands exist, i know my server has @commands and the warp things for players.

actually, I think ALL those commands exist. I have @commands and commands for players. The warp command I use for regular players was made by qwerty and it takes the player's MP and mesos to limit them from using it a bunch of times.
 
Newbie Spellweaver
Joined
Aug 16, 2006
Messages
84
Reaction score
0
is there a way to make it message them they got slapped lol..
 
Newbie Spellweaver
Joined
Apr 21, 2008
Messages
75
Reaction score
4
um tinyspear, why do you have one of my servers banners with an added picture and some scribble writing at the bottum? and im 100% that its my server's banner because it has my character on it o_O
 
Newbie Spellweaver
Joined
Jun 21, 2008
Messages
72
Reaction score
0
lol n1 if got kb den this will be great
people slapped will be fly around trying to find out why they are fly back and hp and mp decreased
 
Newbie Spellweaver
Joined
May 2, 2008
Messages
17
Reaction score
0
um tinyspear, why do you have one of my servers banners with an added picture and some scribble writing at the bottum? and im 100% that its my server's banner because it has my character on it o_O

It's me iLag
-Sorry for the off-topic post
 
Last edited:
Back
Top