Ir para conteúdo
  • Cadastre-se
  • 0

Implementando comando .tradeoff


heliomatheus

Pergunta

e ai galera to com um problema para adaptar o comando .tradeoff me sai alguns erros e venho pedir ajuda aqui,

 

o arquivo tradeoff.java ja esta dentro da pasta data\scripts\handlers\voicedcommandhandlers ai o arquivo como esta .

 

tradeoff.java

 

 

 

* 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 3 of the License, 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, see <

O conteúdo está oculto, favor efetuar login ou se cadastrar!

*/

package br.xtreme.gameserver.handler.voicedcommandhandlers;

 

import br.xtreme.gameserver.handler.IVoicedCommandHandler;

import br.xtreme.gameserver.model.actor.instance.L2PcInstance;

/**

* @author Intrepid

*

*/

public class TradeOff implements IVoicedCommandHandler

{

private static final String[] VOICED_COMMANDS =

{

"tradeoff",

"tradeon"

};

 

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

{

if ((command.startsWith("tradeoff")))

{

if(activeChar.getTradeRefusal())

{

activeChar.sendMessage("Trade refusal is already enabled!");

}

else

{

activeChar.setTradeRefusal(true);

activeChar.sendMessage("Trade refusal enabled");

}

}

if ((command.startsWith("tradeon")))

{

if(!activeChar.getTradeRefusal())

{

activeChar.sendMessage("Trade refusal is already disabled!");

}

else

{

activeChar.setTradeRefusal(false);

activeChar.sendMessage("Trade refusal disabled");

}

}

return true;

}

 

public String[] getVoicedCommandList()

{

return VOICED_COMMANDS;

}

}

 

..

 

 

 

 

 

agora no masterhandler.java

 

 

 

if (Config.BANKING_SYSTEM_ENABLED)

VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Banking());

+ if (Config.TradeOff_SYSTEM_ENABLED)

VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new TradeOff());

 

 

 

 

 

 

 

 

 

 

Imagens do erro

 

xpo6r9.jpg

Editado por heliomatheus

CPU: I7 4790k - 4.7GHz OC

Water Cooler: Corsair H80i

GPU: Crossfire Radeon R9 290x - 4GB
Motherboard: Asrock fatality z97 killer

RAM: 2 X 8GB Corsair vengeance PRO- DDR3 - 1600mhz
OS: Windows 10 Pro - 64Bits

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts recomendados


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...



×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.