Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gameserver/handler/voicedcommandhandlers/vip.java pigenoume gameserver/handler/voicedcommandhandlers kai kanoume ena untitled text file to onomazoume -> vip.java kai bazoume to parakato code
- /* 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 absolute.power.gameserver.handler.voicedcommandhandlers;
- import absolute.power.gameserver.handler.IVoicedCommandHandler;
- import absolute.power.gameserver.model.actor.instance.L2PcInstance;
- import absolute.power..gameserver.network.serverpackets.InventoryUpdate;
- /**
- * @author AbSoLuTePoWeR
- *
- */
- public class vip implements IVoicedCommandHandler
- {
- private static final String[] VOICED_COMMANDS = {"vip"};
- public boolean useVoicedCommand(String command, L2PcInstance player, String target)
- {
- if(player.isVIP())
- {
- player.sendMessage("You can't use this command twice.");
- return false;
- }
- if (command.equalsIgnoreCase("vip"))
- {
- if(player.getInventory().getItemByItemId(9999) == null)
- {
- player.sendMessage("You must got the vip Item!");
- return false;
- }
- player.getInventory().destroyItemByItemId("Item", 9999, 1, player, player.getTarget());
- player.setVip(true);
- player.sendMessage("You are Vip Player Now, Vip Item has dissapeared!");
- }
- }
- public String[] getVoicedCommandList()
- {
- return VOICED_COMMANDS;
- }
- }
- gameserver/handler/voicedcommandhandler.java pigenoume sto voicedcommandhandler.java pou briskete sto gameserver/handler/ kai bazoume to import kai to register.
- +import absolute.power.gameserver.handler.voicedcommandhandlers.vip;
- egisterVoicedCommandHandler(new loc());
- +registerVoicedCommandHandler(new vip());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement