[Release] !slap command

Page 1 of 2 12 LastLast
Results 1 to 25 of 37
  1. #1
    Valued Member kirbyluver2 is offline
    MemberRank
    Apr 2008 Join Date
    130Posts

    [Release] !slap command

    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 Code:
    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.HPvictim1.getHp()-loss);
                                            
    victim1.updateSingleStat(MapleStat.MPvictim1.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.HPvictim2.getHp()-loss);
                                            
    victim2.updateSingleStat(MapleStat.MPvictim2.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.HPvictim3.getHp()-loss);
                                            
    victim3.updateSingleStat(MapleStat.MPvictim3.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.HPvictim4.getHp()-loss);
                                            
    victim4.updateSingleStat(MapleStat.MPvictim4.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.HPvictim5.getHp()-loss);
                                            
    victim5.updateSingleStat(MapleStat.MPvictim5.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.HPvictim6.getHp()-loss);
                                            
    victim6.updateSingleStat(MapleStat.MPvictim6.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.HPvictim7.getHp()-loss);
                                            
    victim7.updateSingleStat(MapleStat.MPvictim7.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.HPvictim8.getHp()-loss);
                                            
    victim8.updateSingleStat(MapleStat.MPvictim8.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.HPvictim9.getHp()-loss);
                                            
    victim9.updateSingleStat(MapleStat.MPvictim9.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.HPvictim10.getHp()-loss);
                                            
    victim10.updateSingleStat(MapleStat.MPvictim10.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.HPvictim11.getHp()-loss);
                                            
    victim11.updateSingleStat(MapleStat.MPvictim11.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.HPvictim12.getHp()-loss);
                                            
    victim12.updateSingleStat(MapleStat.MPvictim12.getMp()-loss);
                                            
    mc.dropMessage("You slapped " +victim12.getName()+".");
    // made by Kirby 
    This is more stable, only hits one person at a time.
    PHP Code:
    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.HPvictim.getHp()-loss);
                                            
    victim.updateSingleStat(MapleStat.MPvictim.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 Code:
    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.HPvictims.getHp()-loss);
                                           
    victims.updateSingleStat(MapleStat.MPvictims.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 by kirbyluver2; 08-08-08 at 05:40 AM.


  2. #2
    Account Upgraded | Title Enabled! megoesrawr is offline
    MemberRank
    May 2008 Join Date
    CaliforniaLocation
    873Posts

    Re: !slap command

    Lol did u make the animation for anego show up?

  3. #3
    Account Upgraded | Title Enabled! megoesrawr is offline
    MemberRank
    May 2008 Join Date
    CaliforniaLocation
    873Posts

    Re: !slap command

    Nvm... From looking at ur script... I don't think it has the slap animation :P

  4. #4
    Proficient Member Hotoshii is offline
    MemberRank
    Jul 2008 Join Date
    SoCalLocation
    180Posts

    Re: !slap command

    So you finally got the !slap command you wanted. Very nice, Congrats lol.

  5. #5
    Account Upgraded | Title Enabled! Emulation is offline
    MemberRank
    Jul 2008 Join Date
    205Posts

    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.

  6. #6
    Account Upgraded | Title Enabled! chocokirby is offline
    MemberRank
    Apr 2008 Join Date
    CC PloxLocation
    274Posts

    Re: !slap command

    It'd make sense if the player flew a lil like a flash jump (: nice job though

  7. #7
    Account Upgraded | Title Enabled! megoesrawr is offline
    MemberRank
    May 2008 Join Date
    CaliforniaLocation
    873Posts

    Re: !slap command

    It would be RLY cool if you added the anego animation :P

  8. #8
    Λκαяυz føяeνeя Roamer is offline
    MemberRank
    Jun 2008 Join Date
    215Location
    3,203Posts

    Re: !slap command

    I love it

  9. #9
    Proficient Member Hotoshii is offline
    MemberRank
    Jul 2008 Join Date
    SoCalLocation
    180Posts

    Re: !slap command

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

  10. #10
    Account Upgraded | Title Enabled! iMurad is offline
    MemberRank
    Jun 2008 Join Date
    Illinois, USLocation
    529Posts

    Re: !slap command

    Add [Release] Or you'll be warned.

  11. #11
    Λκαяυz føяeνeя Roamer is offline
    MemberRank
    Jun 2008 Join Date
    215Location
    3,203Posts

    Re: !slap command

    Quote Originally Posted by Hotoshii View Post
    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)

  12. #12
    Valued Member kirbyluver2 is offline
    MemberRank
    Apr 2008 Join Date
    130Posts

    Re: !slap command

    Quote Originally Posted by Roamer View Post
    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.

  13. #13
    Proficient Member Hotoshii is offline
    MemberRank
    Jul 2008 Join Date
    SoCalLocation
    180Posts

    Re: !slap command

    Quote Originally Posted by kirbyluver2 View Post
    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.

  14. #14
    Account Upgraded | Title Enabled! fr00mza is offline
    MemberRank
    Aug 2008 Join Date
    208Posts

    Re: [Release] !slap command

    Lol, wtf.
    Good job?

  15. #15
    Frozen LegendX is offline
    MemberRank
    Aug 2006 Join Date
    homeLocation
    205Posts

    Re: [Release] !slap command

    is there a way to make it message them they got slapped lol..

  16. #16
    Valued Member kirbyluver2 is offline
    MemberRank
    Apr 2008 Join Date
    130Posts

    Re: [Release] !slap command

    Quote Originally Posted by LegendX View Post
    is there a way to make it message them they got slapped lol..

    eh, ill add it later its not really that important right now

  17. #17
    Enthusiast tinyspear is offline
    MemberRank
    May 2008 Join Date
    New ZealandLocation
    25Posts

    Re: [Release] !slap command

    Nice Release.
    It might annoy people though..=P

  18. #18
    Valued Member kirbyluver2 is offline
    MemberRank
    Apr 2008 Join Date
    130Posts

    Re: [Release] !slap command

    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

  19. #19
    Valued Member DkWar is offline
    MemberRank
    Jun 2008 Join Date
    SiNgApOrE , Beatty Secondary School.. Sec ?E2 Ask MeLocation
    103Posts

    Re: [Release] !slap command

    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

  20. #20
    Enthusiast tinyspear is offline
    MemberRank
    May 2008 Join Date
    New ZealandLocation
    25Posts

    Re: [Release] !slap command

    Quote Originally Posted by kirbyluver2 View Post
    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 by tinyspear; 08-08-08 at 10:09 PM. Reason: Sorry for the off-topic

  21. #21
    Account Upgraded | Title Enabled! Onesky is offline
    MemberRank
    Aug 2008 Join Date
    In Your BedLocation
    228Posts

    Re: [Release] !slap command

    some give it the horned tail's skill effect? pushes you back

  22. #22
    Proficient Member Hotoshii is offline
    MemberRank
    Jul 2008 Join Date
    SoCalLocation
    180Posts

    Re: [Release] !slap command

    Quote Originally Posted by Onesky View Post
    some give it the horned tail's skill effect? pushes you back
    LOL! That'd be annoying. !slap player

    player: *flies across the screen to the other side of the map*

  23. #23
    Proficient Member 0aix2 is offline
    MemberRank
    Jul 2008 Join Date
    195Posts

    Re: [Release] !slap command

    Could someone actually help with that part? I have a special reason for using something like that.

  24. #24
    Proficient Member TehSkull is offline
    MemberRank
    Apr 2008 Join Date
    LouisianaLocation
    151Posts

    Re: [Release] !slap command

    I think you could look around in mobs.cpp for his knockback ability/player.cpp for the actual moving of the player back x pixels.

    Edit: You might be able to, but it would be a tiny bit complex. You'd have to make a new void that adds/subtracts the x value in the players current spot using player->setPos.

  25. #25
    Proficient Member 0aix2 is offline
    MemberRank
    Jul 2008 Join Date
    195Posts

    Re: [Release] !slap command

    Im using java, and ive tried that with player.setPosition(new Point(x, y));

    oh well, better wait for someone else to figure it out <.<



Page 1 of 2 12 LastLast

Advertisement