sacrifice Posted November 14, 2022 Posted November 14, 2022 (edited) Hello Has anyone ever managed to create a 2nd html window like NPCdialog I was thinking of duplicating the NPCDialoghtm of the XDAT with another name and I don't really know how to add it in the interface.u and on the Server Core side I don't really know how to succeed in calling it and that it doesn't close the official NPCdialog page and have both pages at the same time. Has anyone ever managed to do something like this? I m in Gracia Final Part (L2JFree) THX Edited January 11, 2023 by Vision Quote
xdem Posted November 14, 2022 Posted November 14, 2022 its possible but still goes through the same html script you have to redirect it to the new Quote
sacrifice Posted November 14, 2022 Author Posted November 14, 2022 so it's impossible to have 2 windows at the same time? Where and how are we redirected? Quote
911reg Posted November 14, 2022 Posted November 14, 2022 1 hour ago, sacrifice said: so it's impossible to have 2 windows at the same time? Where and how are we redirected? It's not impossible, as xdem pointed out you just need to redirect the html string from a window to another, since you can't add server packets to your client. Otherwise yo can re-utilize the html viewer from TutorialViewerWnd https://docs.unrealengine.com/udk/Two/UnrealScriptReference.html https://docs.unrealengine.com/udk/Two/CoreUnrealScriptObjects.html https://docs.unrealengine.com/udk/Two/UnrealScriptStartupCodeFlow.html Quote
sacrifice Posted November 14, 2022 Author Posted November 14, 2022 (edited) For example side core package com.l2jfree.gameserver.network.packets.server; import com.l2jfree.gameserver.network.packets.L2ServerPacket; public class TutorialShowHtml extends L2ServerPacket { private static final String _S__A6_TUTORIALSHOWHTML = "[S] a6 TutorialShowHtml"; private final String _html; public TutorialShowHtml(String html) { _html = html; } /* (non-Javadoc) * @see com.l2jfree.gameserver.serverpackets.ServerBasePacket#writeImpl() */ @Override protected void writeImpl() { writeC(0xa6); writeS(_html); } /* (non-Javadoc) * @see com.l2jfree.gameserver.BasePacket#getType() */ @Override public String getType() { return _S__A6_TUTORIALSHOWHTML; } } interface.u side: TutorialBtnWnd.uc TutorialViewerWnd.uc SystemTutorialWnd.uc ..... If create new uc for new window I dont know how to link for open I would like a small example of code to guide me to succeed in doing this with the tutorial window for example Edited November 14, 2022 by sacrifice Quote
wongerlt Posted November 15, 2022 Posted November 15, 2022 so u already have 2 windows. npc dialog html and tutorial html Quote
sacrifice Posted November 15, 2022 Author Posted November 15, 2022 (edited) me too but how can use tutorial windows for open with my custom html? I dont find where is original html of this windows "This is Sedrick's......" Edited November 15, 2022 by sacrifice Quote
wongerlt Posted November 15, 2022 Posted November 15, 2022 TutorialShowHtml TutorialCloseHtml http://web.archive.org/web/20190806183427/http://netpro.revengineer.eu/packets/sm_tutorialshowhtml.html Quote
sacrifice Posted November 15, 2022 Author Posted November 15, 2022 yes A6 is in Tutorialshowhtml.java private static final String _S__A6_TUTORIALSHOWHTML = "[S] a6 TutorialShowHtml"; But How call this page in code java sb.append("</html>"); html.setHtml(sb.toString()); player.sendPacket(html); break; Quote
arm4729 Posted November 15, 2022 Posted November 15, 2022 check requesttutorial.java you have bypass there Quote
sacrifice Posted November 16, 2022 Author Posted November 16, 2022 package com.l2jfree.gameserver.network.packets.client; import com.l2jfree.gameserver.gameobjects.L2Player; import com.l2jfree.gameserver.model.quest.QuestState; import com.l2jfree.gameserver.network.packets.L2ClientPacket; public class RequestTutorialPassCmdToServer extends L2ClientPacket { private String _bypass = null; @Override protected void readImpl() { _bypass = readS(); } @Override protected void runImpl() { L2Player player = getClient().getActiveChar(); if (player == null) return; QuestState qs = player.getQuestState("255_Tutorial"); if (qs != null) qs.getQuest().notifyEvent(_bypass, null, player); sendAF(); } @Override public String getType() { return "[C] 86 RequestTutorialPassCmdToServer"; } } package com.l2jfree.gameserver.network.packets.client; import com.l2jfree.gameserver.gameobjects.L2Player; import com.l2jfree.gameserver.gameobjects.instance.L2ClassMasterInstance; import com.l2jfree.gameserver.model.quest.QuestState; import com.l2jfree.gameserver.network.packets.L2ClientPacket; /** * 7B 74 00 75 00 74 00 6F 00 72 00 69 00 61 00 6C * 00 5F 00 63 00 6C 00 6F 00 73 00 65 00 5F 00 32 * 00 00 00 * * Format: (c) S * * @author DaDummy */ public class RequestTutorialLinkHtml extends L2ClientPacket { private static final String _C__7B_REQUESTTUTORIALLINKHTML = "[C] 7B equestTutorialLinkHtml"; private String _link; @Override protected void readImpl() { _link = readS(); // link } @Override protected void runImpl() { L2Player player = getClient().getActiveChar(); if (player == null) return; L2ClassMasterInstance.onTutorialLink(player, _link); player.onTutorialLink(_link); QuestState qs = player.getQuestState("255_Tutorial"); if (qs != null) qs.getQuest().notifyEvent(_link, null, player); sendAF(); } @Override public String getType() { return _C__7B_REQUESTTUTORIALLINKHTML; } } Quote
arm4729 Posted November 18, 2022 Posted November 18, 2022 (edited) protected void runImpl() { L2Player player = getClient().getActiveChar(); if (player == null) return; +if (_link.startsWith("bp_close")) { + player.sendPacket(TutorialCloseHtml.STATIC_PACKET); + } L2ClassMasterInstance.onTutorialLink(player, _link); player.onTutorialLink(_link); QuestState qs = player.getQuestState("255_Tutorial"); if (qs != null) qs.getQuest().notifyEvent(_link, null, player); sendAF(); } make button on html file with bypas bp_close , it should close tutorial htm window... if not works you should register your bypass somewhere i don't remember right now search for bypass handlers .. try it and reply Edited November 18, 2022 by arm4729 Quote
sacrifice Posted November 20, 2022 Author Posted November 20, 2022 (edited) yes work Edited November 20, 2022 by sacrifice Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.