Jump to content

Recommended Posts

Posted (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 by Vision
Posted
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

Posted (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 by sacrifice
Posted (edited)

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
Posted

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;

 

 

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

 

Posted (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 by arm4729

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.

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

    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • 📜 • Mass PVP – Craft – Progressive Server (ITEMS, ARMOR, WEAPONS, ETC) 🕹️ • Chronicles: Lineage 2 - Interlude (C6) 🛠️ • Retail status 🕒 • Server Time: GMT -3 🏙️ • Main Town: Giran ✨ • Teleportation for all Towns, Gk Global 🛡️ • NPC BUFFER - GMSHOP B-GRADE - DONATION SHOP - AUCTION MANAGER 🐉 • Epic Bosses: Chaotic Zones 🔁 • Protection respawn: 15 seconds ⏰ • Restart Server: 05:00 AM Today 💸 • RTM allowed between players (ask Staff if in doubt) 📊 SERVER RATES: • EXP: x8 • SP: x10 • Adena: x3 • Seal Stone: x3 • Drop: x3 • Spoil: x5 • Raid EXP/SP/Drop: x3 • Premium Rates: x2 🌐 Website: https://www.l2roosters.com 💬 Discord: https://discord.gg/cUyYXrfy 🔥 Join us now and forge your legacy at Roosters Gaming!
    • Hello, lovely people, how are you? I just finished compiling the L2jFrozen project Rev: 1132 (very old). I don't mind it being too old, since the project is for me and my children. (LAN/Offline) it's not meant to be put online. I want to learn and give my children more comfort when playing. And for my part, I also experiment with the game. My problem is that I don't know much about the subject. I was able to make some basic configurations to my liking and that of my children, but it never compiles or anything like that... I would really need help from you, the community... I simply want to remove all subclass restrictions, remove the restriction on "Overlord, Warsmith, and Dark Elf subclasses with White Elves and vice versa." Thank you very much in advance! Greetings, community.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock