Page 1 of 1

When it was MasterHandler.java

Posted: Fri Oct 23, 2009 10:03 pm
by thor
When it was MasterHandler.java, I created a script for an event, and worked fine.

But now when MasterHandler is obsolete, I got a weird trouble remaking this script:
  • the static variable class is changed of value in one method but, in the other keep old value
How it looks? Let me show you:
From CustomVoicedCommand.java the player who wants to join to the event, types ".carrera"

Code: Select all

 		else if (command.equalsIgnoreCase("carrera"))		{			AdminStriderRace.addPJtoEvent(activeChar);		}		return false; 
it goes to AdminStriderRace.java where the first thing is checked is the variable's class eventoActivado:

Code: Select all

	public static void addPJtoEvent(L2PcInstance activeChar) {		int index = 0;		boolean borrado = false;		activeChar.sendMessage("1.-" + String.valueOf(AdminStriderRace.eventoActivado) );...... 
player get the value = false, that's weird because, the first thing done by GM is set it up to true, as we can see here:

Code: Select all

 public boolean useAdminCommand(String command, L2PcInstance activeChar) ......		} else if (command.equals("admin_sr_announce")) 		{			AdminStriderRace.eventoActivado = true;... 
The full script is here if you want check it out:http://pastebin.com/m3783764b

I was trying everything from tutorials and friends, other forums...
Is possible help? Thank you.

Re: When it was MasterHandler.java

Posted: Sat Oct 24, 2009 7:16 am
by janiii
MasterHandler is obsolete? or did you just not get an answer on l2jofficial forum? your question is not about this l2j project.

Re: When it was MasterHandler.java

Posted: Sun Oct 25, 2009 7:39 pm
by thor
I did not get an answer from there but I thought l2jofficial came from l2j just with some customs.
Oki then, thx.