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.

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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

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