Jump to content
  • 0

How to make simple Event join


Question

Posted

Hi i saw that on some servers:

 

On TvT or DM event is a little announcement.

On this stands type .event for more info and .join to join that event (without going to the npc, simply type that for joinin)

 

How can i do that?

 

I use l2umbrella ct1.5

Thanks!

3 answers to this question

Recommended Posts

  • 0
Posted

It Has Been A Guide How To Put Your Own Commands

 

Simple You Have To Put Your Own Command That Joins The Event

That Command Must Be HTML Of The Join Button From The Npc (Something Like That ...)

Ok Search A Little For This Guide :)

And You Will Find Your Solution ;)

  • 0
Posted

here an example...

 

package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.GameServer;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;

/**
* @author zunix
*
*/
public class Join implements IVoicedCommandHandler
{
private static String[]	VOICED_COMMANDS	=
										{ "join" };

/* (non-Javadoc)
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
 */
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	String htmFile = "Here the Path to the TvT Manger htm";
	String htmContent = HtmCache.getInstance().getHtm(htmFile);
	if (htmContent != null)
	{
		NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
		infoHtml.setHtml(htmContent);
		activeChar.sendPacket(infoHtml);
	}
	else
	{
		activeChar.sendMessage("omg u fking n00b the " + htmFile + " is missing! Go back to your Mommy");
	}
	return true;
}

public String[] getVoicedCommandList()
{
	return VOICED_COMMANDS;
}
}

 

@ Here the Path to the TvT Manger htm u have to write the path to the TvT manger htm like:

String htmFile = "data/html/custom/TvT.htm";

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