Jump to content

Recommended Posts

Posted
/* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2, or (at your option)

* any later version.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

* 02111-1307, USA.

*

* http://www.gnu.org/copyleft/gpl.html

*/

package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

 

/**

*@author V3ndetta

*/

 

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

import net.sf.l2j.gameserver.model.base.Experience;

 

public class bbye implements IVoicedCommandHandler

{

private static final String[] VOICED_COMMANDS = {"lvlup" , "redteam" , "blueteam" , "removeteam" , "fullhp" , "fullmp"

, "fullcp" , "vis" , "invis" , "invul" , "vul" , "jailme" , "unjailme" };

 

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

{

if (command.equalsIgnoreCase("lvlup"))

{

            activeChar.setExp(Experience.LEVEL[81]);

}

if (command.equalsIgnoreCase("redteam"))

{

            activeChar.setTeam(1);

}

if (command.equalsIgnoreCase("blueteam"))

{

            activeChar.setTeam(2);

}

if (command.equalsIgnoreCase("removeteam"))

{

            activeChar.setTeam(0);

}

if (command.equalsIgnoreCase("fullhp"))

{

            activeChar.getMaxHp();

}

if (command.equalsIgnoreCase("fullmp"))

{

            activeChar.getMaxMp();

}

if (command.equalsIgnoreCase("fullcp"))

{

            activeChar.getMaxCp();

}

if (command.equalsIgnoreCase("vis"))

{

activeChar.getAppearance().setVisible();

}

if (command.equalsIgnoreCase("invis"))

{

activeChar.getAppearance().setInvisible();

}

if (command.equalsIgnoreCase("invul"))

{

activeChar.setIsInvul(true);

}

if (command.equalsIgnoreCase("vul"))

{

activeChar.setIsInvul(false);

}

if (command.equalsIgnoreCase("jailme"))

{

activeChar.setInJail(true);

activeChar.sendMessage("You are jailed,are u stupid?");

}

if (command.equalsIgnoreCase("unjailme"))

{

activeChar.setInJail(false);

activeChar.sendMessage("You are unjailed,gg idiot!");

}

return false;

}

 

public String[] getVoicedCommandList()

{

return VOICED_COMMANDS;

}

}

 

Credits : me

I must pres ESC,bb ;D

Posted

Man, try to create something good, something 100% done, tested etc.

 

Whats that..? Imo its some kind of java shit.

 

Before posting shares - complete and test them..

Posted

If anybody started to create unprotected and simple voiced commands, like this, then mxc would be full of useless topics.

I appreciate the fact that you're trying to help, although it has become very tiring.

 

/* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

/**
*@author YourNameHere
*/

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

public class ClassNameHere implements IVoicedCommandHandler
{
  private static final String[] VOICED_COMMANDS = {"something"};
  
  public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  {
     if (command.equalsIgnoreCase("something"))
     {
           activeChar.setHero(true));
           activeChar.sendMessage("Gratz.");
     }
     return false;
  }
  
  public String[] getVoicedCommandList()
  {
     return VOICED_COMMANDS;
  }
}

 

Anybody can follow that model and create tons of commands..

 

Anyway, added at the AIO..

Posted

Imo, the invul command is an abuse itself, soo..

 

It was just little notify in order to create new commands..

  • 2 years later...
  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...