Page 1 of 1
Voice commands from HTML
Posted: Wed Jan 20, 2010 5:04 pm
by energy
hello i find this in old l2jforum posted from Merwllyra
http://www.l2jserver.com/old-forum/thre ... adid=26607
i try it but i get message in the console : No handler registered for bypass online i try it with other voiced command too but same error.
i added this in RequestBypassToServer and compile fine without problems.
else if (_command.startsWith("voiced_"))
{
IVoicedCommandHandler vch = null;
if (_command.indexOf(' ') == -1)
{
vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(_command);
} else {
vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(_command.substring(0, _command.indexOf(' ')));
}
if (vch != null)
vch.useVoicedCommand(_command, activeChar, null);
else
_log.warning("No handler registered for bypass '"+_command+"'");
}
and i use bypass: "bypass -h voiced_online"
but i get No handler registered for bypass online error in the console
someone some solution ty
Re: Voice commands from HTML
Posted: Wed Jan 20, 2010 6:02 pm
by takhs7
fixed it for ya..
//Voiced Bypass - Start
if (_command.startsWith("voiced_"))
{
String command = _command.split(" ")[0];
IVoicedCommandHandler ach = VoicedCommandHandler.getInstance().getVoicedCommandHandler(_command.substring(7));
if (ach == null)
{
activeChar.sendMessage("The command " + command.substring(7) + " does not exist!");
_log.warning("No handler registered for command '" + _command + "'");
return;
}
ach.useVoicedCommand(_command.substring(7), activeChar, null);
}
//Voiced Bypass - End
i tested it and works.. if u find any errors then tell me

Re: Voice commands from HTML
Posted: Wed Jan 20, 2010 6:17 pm
by energy
takhs7 wrote:fixed it for ya..
//Voiced Bypass - Start
if (_command.startsWith("voiced_"))
{
String command = _command.split(" ")[0];
IVoicedCommandHandler ach = VoicedCommandHandler.getInstance().getVoicedCommandHandler(_command.substring(7));
if (ach == null)
{
activeChar.sendMessage("The command " + command.substring(7) + " does not exist!");
_log.warning("No handler registered for command '" + _command + "'");
return;
}
ach.useVoicedCommand(_command.substring(7), activeChar, null);
}
//Voiced Bypass - End
i tested it and works.. if u find any errors then tell me

dont work for me again i get same error!
Re: Voice commands from HTML
Posted: Wed Jan 20, 2010 6:32 pm
by takhs7
it works mate.. maybe u dont add it right in the core? :/ try for example this...
Code: Select all
<td><button value="Engage" action="bypass -h voiced_engage" width=55 height=15 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
.. maybe ur trying not an Voiced command but a user command? :/ (those who start with "/" .. like /sit .. /invite)
edit: also make sure u have typed the command in the bypass right.. coz its not case insensitive.. example... voiced_
Engage its not good...
edit2: maybe u need to make it "else if" (in the start).. but for me worked without "else"..
Re: Voice commands from HTML
Posted: Wed Jan 20, 2010 7:07 pm
by energy
takhs7 wrote:it works mate.. maybe u dont add it right in the core? :/ try for example this...
Code: Select all
<td><button value="Engage" action="bypass -h voiced_engage" width=55 height=15 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
.. maybe ur trying not an Voiced command but a user command? :/ (those who start with "/" .. like /sit .. /invite)
edit: also make sure u have typed the command in the bypass right.. coz its not case insensitive.. example... voiced_
Engage its not good...
edit2: maybe u need to make it "else if" (in the start).. but for me worked without "else"..
yes the problem was Caps must be written how its called in voice script!
by me was "Online" and i used bypass online
or Status must be called with bypass Status not status
ty man
Re: Voice commands from HTML
Posted: Mon Feb 06, 2012 5:31 am
by Zoey76
Moved to
viewforum.php?f=82, not a contribution.