Voice commands from HTML

Find the proper support area, Saga-Version.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
energy
Posts: 37
Joined: Tue Jun 24, 2008 2:55 pm

Voice commands from HTML

Post 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
takhs7
Posts: 110
Joined: Sun Aug 31, 2008 7:16 am

Re: Voice commands from HTML

Post 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 :)
energy
Posts: 37
Joined: Tue Jun 24, 2008 2:55 pm

Re: Voice commands from HTML

Post 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!
takhs7
Posts: 110
Joined: Sun Aug 31, 2008 7:16 am

Re: Voice commands from HTML

Post 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"..
energy
Posts: 37
Joined: Tue Jun 24, 2008 2:55 pm

Re: Voice commands from HTML

Post 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
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Voice commands from HTML

Post by Zoey76 »

Moved to viewforum.php?f=82, not a contribution.
Powered by Eclipse 4.34 ๐ŸŒŒ | Eclipse Temurin 21 โ˜• | MariaDB 11.3.2 ๐Ÿ—ƒ๏ธ | L2J Server 2.6.3.0 - High Five ๐Ÿš€

๐Ÿ”— Join our Discord! ๐ŸŽฎ๐Ÿ’ฌ
Post Reply