Jump to content
  • 0

How Can I Link A Button From Community Board To Open A Html From A Npc?


Question

3 answers to this question

Recommended Posts

  • 0
Posted


 

public class L2BoardMainInstance extends L2FolkInstance

{

 

public L2BoardMainInstance(int objectId, L2NpcTemplate template)

{

super(objectId, template);

}

 

@Override

public void onAction(L2PcInstance activeChar)

{

if (!(canTarget(activeChar)))

{

return;

}

 

if (this != activeChar.getTarget())

{

activeChar.setTarget(this);

 

activeChar.sendPacket(new MyTargetSelected(getObjectId(), 0));

 

activeChar.sendPacket(new ValidateLocation(this));

}

else if (!(canInteract(activeChar)))

{

activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);

}

else

{

showHtmlWindow(activeChar, toString());

}

 

activeChar.sendPacket(new ActionFailed());

}

 

 

private void showHtmlWindow(L2PcInstance activeChar, String command)

{

String text = HtmCache.getInstance().getHtm("data/html/CommunityBoard/index.htm"); <------ Change this

BaseBBSManager.separateAndSend(text, activeChar);

 

}

}

  • 0
Posted (edited)

I want like this

i open my community board

example open shop in community board, after click on one button from shop example "armor store" open a html from a npc example open html form npc id "300300"

 

like l2tales donator store in community board, click on vesper armor and open a separate html like htmls form normal npcs

Edited by Dan7E2

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
Answer this question...

×   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.



×
×
  • Create New...