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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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