Jump to content
  • 0

redsky just in town on little event.


Question

3 answers to this question

Recommended Posts

  • 0
Posted

You include a onEnter / onExit code in a given zone, or create a custom area.

 

Basically it could be :

 

protected void onEnter(L2Character character)
{
if (character instanceof L2PcInstance)
{
	//register yourself in a town zone
	character.setInsideZone(L2Character.ZONE_TOWN, true);

	// if event up, make the sky red for all people in this area
	if eventIsInProgress
		put redsky
}
}

protected void onExit(L2Character character)
{
if (character instanceof L2PcInstance)
{
	//register yourself in a town zone
	character.setInsideZone(L2Character.ZONE_TOWN, false);

	// if event up, make the sky red for all people in this area
	if eventIsInProgress
		remove redsky
}
}

 

Of course you have to code, as I take only exemple :

// if event up, make the sky red for all people in this area

if eventIsInProgress

remove redsky

  • 0
Posted

my code seens like this :

public boolean eventStart(L2PcInstance player)
{
	if (character instanceof L2PcInstance)
	{
	//register yourself in a town zone
	player.setInsideZone(L2Character.ZONE_TOWN, true);

	// if event up, make the sky red for all people in this area
	[color=red]if [/color] eventIsInProgress;
	// Make Sky Red For 2 mins.
	ExRedSky = new ExRedSky(120);
	}

 

just the second if is a problem :S need help

  • 0
Posted

public boolean eventStart(L2PcInstance player)

 

Lol ? Have you read the totality of my message ?

 

A boolean will have to return true/false, and why create a method about it ?

 

Just add custom code in an existing zone, or create your own custom zone from a clean template.

 

BTW if you want to add it on an exisiting event, give more infos, because adding it to an existing zone wouldn't be the best solution.

 

Solutions are multiple, and the best one depends of what you need. So explain your case in totality.

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