Jump to content
  • 0

Command Window


disorder25

Question

Hello I made a command that open a hardcode html window, I would like to add a button to refresh that window, what is the bypass I have to use on the html to refresh it?

 

Thank you>

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Create your bypass in RequestBypassToServer .

example:

else if (_command.startsWith("your_bypass"))
{

...

}

then inside write your code to open the html again

 

then the button must be like this

<a action="bypass -h your_bypass">Your text</a>
Edited by melron
Link to comment
Share on other sites

  • 0

 

Create your bypass in RequestBypassToServer .

example:

else if (_command.startsWith("your_bypass"))
{

...

}

then inside write your code to open the html again

 

then the button must be like this

<a action="bypass -h your_bypass">Your text</a>

 

 

Thank you for your reply.

I did what you said but the window did not refresh, when I click on the button the window closed and I got an error on gameserver.

Here is what I did.

public void onBypassFeedback(final L2PcInstance activeChar, String command)
{
        if (activeChar == null)
	{
		return;
	}
	if (command.startsWith("showMainWindow"))
	{
		getVoteHtml(activeChar);
	}
}
public static String getVoteHtml(L2PcInstance player)
{


          Here I got the working html and I added this bypass to it

          sb.append("<center><button value=\"Refresh\" action=\"bypass -h showMainWindow\" back=\"L2UI_CT1.Button_DF.Gauge_DF_Attribute_Dark\" fore=\"L2UI_CT1.Button_DF.Gauge_DF_Attribute_Dark_bg\" width=95 height=26></center>");
		
}

This is the error I got on gameserver

[Character: whatever[000000000] - Account: whatever - IP: 000.0.0.0] sent not h
andled RequestBypassToServer: [showMainWindow]
Edited by disorder25
Link to comment
Share on other sites

  • 0

 

Thank you for your reply.

I did what you said 

No you didnt... 

go to network.clientpackets.RequestBypassToServer.java

Not at your vc onBypassFeedBack..

 

Make another bypass 

else if (_command.startsWith("your_bypass"))
{

...

}

Here you have to insert the whole code that is in getVoteHtml OR create a function with the same name at the end of the RequestBypassToServer

 

getVoteHtml(L2PcInstance player) and call it again in your new bypass...

Edited by melron
Link to comment
Share on other sites

  • 0

No you didnt... 

go to network.clientpackets.RequestBypassToServer.java

Not at your vc onBypassFeedBack..

 

Make another bypass 

else if (_command.startsWith("your_bypass"))
{

...

}

Here you have to insert the whole code that is in getVoteHtml OR create a function with the same name at the end of the RequestBypassToServer

 

getVoteHtml(L2PcInstance player) and call it again in your new bypass...

 

 

Thank you.I got it working

Appreciate your help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...