Jump to content
  • 0

Question

Posted (edited)

Hi all, i add info voice command with "Info". All goods, but i want to know what bypass i can use after Chat 1.

I make this

<td align=center><button value="Rates" action="bypass -h npc_%objectId%_Chat 1" width=90 height=26 back="l2ui_ct1.windows_df_drawer_bg_darker" fore="l2ui_ct1.windows_df_drawer_bg_darker"></td>

and it is looking like that,

http://8bvhRUP.png

and this is 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 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 http://www.gnu.org/licenses/
*/
package handlers.voicedcommandhandlers;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 * @author L2Amyra
 */
public class Info implements IVoicedCommandHandler
{
	private static String[] VOICED_COMMANDS =
	{
		"info"
	};
	
	/*
	 * (non-Javadoc)
	 * @see com.l2jfree.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, com.l2jfree.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
	 */
	@Override
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
		NpcHtmlMessage html = new NpcHtmlMessage();
		html.setFile(activeChar.getHtmlPrefix(), "data/html/merchant/Info.htm");
		activeChar.sendPacket(html);
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
}

Now, the question is how i can open that `Rates` like that window, but looks like that?

Edited by InFocus

6 answers to this question

Recommended Posts

  • 0
Posted

sinces its voiced command you have to use requestbypasstoserver for this one npc_%objectid%_ is not used anymore

 

maybe

action="bypass -h  voice .info"

  • 0
Posted
@see com.l2jfree.gameserver.

:'''D

 

ontopic

check requestbypasstoserver packet and another command handler and check inside htm's too you will propably understand by your self how it works its not hard.

  • 0
Posted

Whatever you link. You only have to register the bypass and add action to it. Eventually check how htm books work, there are items with unique handler that pops up htm window. But I'm not sure if it supports pages. 

  • 0
Posted
On 10/5/2018 at 8:22 PM, SweeTs said:

Whatever you link. You only have to register the bypass and add action to it. Eventually check how htm books work, there are items with unique handler that pops up htm window. But I'm not sure if it supports pages. 

It is working ! SOlved. Can close topic !

Guest
This topic is now closed to further replies.


×
×
  • Create New...