Alguma alma boa poderia adaptar esse mode para l2jfrozen?
package handlers.voicedcommandhandlers;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
/**
* @author Cobra
*/
public class autoloot implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS =
private static String[] _voicedCommands =
{
"autolooton",
"autolootoff"
};
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.equalsIgnoreCase("autolooton"))
{
activeChar.setAutoLootEnabled(true);
activeChar.sendMessage("Auto loot is now enabled.");
}
else if (command.equalsIgnoreCase("autolootoff"))
{
activeChar.setAutoLootEnabled(false);
activeChar.sendMessage("Auto loot is now disabled.");
}
return true;
}
}
Ele ta para l2jserver porem ta faltando o arquivo do L2PCInstance do setAutoLootEnabled
Eu até tentei mas quando testei não rodou o código que criei foi esse
/** AutoLoot parameters*/
private boolean _autoLootEnabled = false;
public void setAutoLootEnabled(final boolean autoLootEnabled)
{
_autoLootEnabled = autoLootEnabled;
}
/**
* @param reference
* @return Returns the autoLootEnabled.
*/
public boolean isAutoLootEnabled(final L2Object reference)
{
return _autoLootEnabled && !(reference instanceof L2GrandBossInstance)
&& !(reference instanceof L2RaidBossInstance)
&& !(reference instanceof L2MinionInstance);
}