disorder25 Posted January 25, 2017 Posted January 25, 2017 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>
0 melron Posted January 25, 2017 Posted January 25, 2017 (edited) 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 January 25, 2017 by melron
0 disorder25 Posted January 25, 2017 Author Posted January 25, 2017 (edited) 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 January 25, 2017 by disorder25
0 disorder25 Posted January 25, 2017 Author Posted January 25, 2017 (edited) thank you Edited January 26, 2017 by disorder25
0 melron Posted January 25, 2017 Posted January 25, 2017 (edited) 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 January 25, 2017 by melron
0 disorder25 Posted January 26, 2017 Author Posted January 26, 2017 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.
Question
disorder25
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>
7 answers to this question
Recommended Posts