Jump to content

Custom Second Windows Html (like NPCdialog)


Recommended Posts

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 by Vision
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by sacrifice
Link to comment
Share on other sites

me too but how can use tutorial windows for  open with my custom html?

 

 

spacer.png

I dont find where is  original html of this windows "This is Sedrick's......"

 

Edited by sacrifice
Link to comment
Share on other sites

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;

 

 

Link to comment
Share on other sites

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;
	}
}

 

Link to comment
Share on other sites

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 by arm4729
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Instead of using encedc on it, try renaming it to "Icon.u" instead of "Icon.utx", and put it in your System folder. If it still crashes, the problem might be with your unrealed.
    • How's the project doing? Is there any news? It really interesting 🤔
    • thx for answer, i tried and woks encrypting, but i still having crashes 😞 i changed the icon in skillgrp.dat from "icon.skill0003" to "Myicons.misil" as i saved the file before endec and nothing. this is the report i got
    • New Season coming May 2024! First post updated      Website: L2Kain.net  Discord: https://discord.gg/l2kain  Wiki: https://info.kain.ws/   Important Dates   Server Start: TBD  Open Beta Test: 10th of May 2024!   Basic Information     Briefly about the concept of the server! We decided to move away from the standard Mid-Rate server concept and keep the mechanics of our beloved Lineage 2 that everyone loves! Massive battles for epic bosses, battles for profitable farming locations, resource spoilage and equipment crafting, daily instances, a balanced economy and much more. This server is build as a Craft-PvP concept. The goal is to gather players with a variety of preferences in the game and make a high-quality and interesting server with alternative character development options. We are well aware that "grinding" is an integral part of the game, but we diluted the boring and the same type of farming with interesting solutions and non-standard mechanics!   We have prepared a new High Five x25 on Modern Client for you. This server will be another step in the development of the platform and the project as a whole! Your appeals to those. support was not ignored, which means the new server will be even better than the previous one!      ⭐ Promotions and Bonuses for new players!     ⭐ Events and Giveaways daily!   ⭐ Rewards for Voting!   ℹ️ Server Rates Learn more about server rates! Server rates are configured in such a way that farming is best rewarded. Adena, drops, quests, various rewards and prices in the game store are well balanced among themselves!   Basic Server Rates:  ⭐ Experience & Skill Points - x25  ⭐ Adena Drop - x15 & Fixed Chance 66%  ⭐ Drop Rates - x10  ⭐ Spoil Rates - x10   Crafting keys, recipes drop & spoil with fixed amount from 2 to 3 and increased chances on all locations and quests  related to farm them.  ⭐ Quest Rates - x5  ⭐ Fortresses & Sieges - x5  ⭐ Raid Bosses & Epic Bosses - x1  ⭐ Weight Limit - x10      Connect with Us:  Discord: https://discord.gg/l2kain  Facebook: https://www.facebook.com/KainLineage2  TikTok: https://www.tiktok.com/@l2kain.net  YouTube: https://www.youtube.com/@Lineage2Kain
  • Topics

×
×
  • Create New...