Jump to content

Recommended Posts

Posted

Got nothing with revision, the string parsing failed somehow. Either the buffer doesn't check what is going to be parsed, either the user failed to write correct values to be parsed (and I will agree than a core check isn't needed if user got a brain).

 

Probably user wrote 1 value instead of 2 (I would guess, you need 2 for skill id and skill level ?) or your core buffer uses a different template somehow (sometimes only 1 parameter ?) and the nextToken shouldn't occur.

Well, i have only made a buffer for acis 214 rev, so thought to test it on newer revs, for errors. Unfortunately, source of acis 270 wont build cause of 1.7 java error and the strange things is, i have the java selected in preferences, java home, but nothing works :(

Posted

You opened "Installed JREs" window numerous times, but you didn't figure than you needed to uncheck JRE 1.6 and check instead JRE 1.7 ? :P

 

You will have same problem for L2J, L2JFrozen, etc (to name only those). Just use the good JRE when you compile.

Posted

Yeah, right. This aint working for me. erza8drbe94ef6x.jpg

 

You see, the thing that i wanted to show, was, the JRE table, when you run build.xml, cause it was messed up.

Posted

Well you clearly messed something on installation, delete all and install only latest JDK 7 (not JRE). Or just use your trick, as it looks to work... If you make a clean install someday, just rem about first sentence.

Posted

Any Idea guys?

 

C:\Server 3\gameserver\.\data\scripts\custom\Buffer\Buffer.java
null
java.util.NoSuchElementException
        at java.util.StringTokenizer.nextToken(Unknown Source)
        at custom.Buffer.Buffer.onAdvEvent(Buffer.java:1551)
        at net.sf.l2j.gameserver.model.quest.Quest.notifyEvent(Quest.java:1140)
        at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.processQuestE
vent(L2PcInstance.java:1305)
        at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.run
Impl(RequestBypassToServer.java:143)
        at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2
GameClientPacket.java:64)
        at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:772)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

 

Okay, so the thing is, that Mr. Tryskell edited the RequestBypassToServer.java "_command.startsWith("Quest ") " thingy, so it wont accept, i guess, more than 2 Strings.

As my buffer uses 3 for a command : bypass -h Quest Buffer create $schemename . So it only reads the word create.

aCis 214 rev bypass:

			else if (_command.startsWith("Quest "))
		{
			if (!activeChar.validateBypass(_command))
				return;

			L2PcInstance player = getClient().getActiveChar();
			if (player == null)
				return;

			String p = _command.substring(6).trim();
			int idx = p.indexOf(' ');
			if (idx < 0)
				player.processQuestEvent(p, "");
			else
				player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
		}

aCis 270 rev bypass:

			else if (_command.startsWith("Quest "))
		{
			if (!activeChar.validateBypass(_command))
				return;

			String[] str = _command.substring(6).trim().split(" ");
			if (str.length == 1)
				activeChar.processQuestEvent(str[0], "");
			else
				activeChar.processQuestEvent(str[0], str[1]);
		}

 

You can see the difference :). I have pasted quest bypass from rev 214 to rev 270,  to test. Buffer worked as it did on rev 214.

I still dont know if there will be bugs cause of that, Tryskell should now. But here's a l2jserver.jar for rev 270, with the old quest bypass code, it's place is gameserver/libs. http://www72.zippyshare.com/v/59227982/file.html

 

And the buffer's code i used was from here (Thx to IKnowWtf):

http://pastebin.com/1PLQ5YGZ

Posted

It's not meeee, It's Hasha the Villain ! Edited in rev 267, yup.

 

And you're right good sir, only the second parameter is taken in consideration.

 

In order it works, the str[1] has to be command - str[0].

 

Edit : try that and say ty to him :

 

			else if (_command.startsWith("Quest "))
		{
			if (!activeChar.validateBypass(_command))
				return;

			String[] str = _command.substring(6).trim().split(" ", 1);
			if (str.length == 1)
				activeChar.processQuestEvent(str[0], "");
			else
				activeChar.processQuestEvent(str[0], str[1]);
		}

  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...
  • 2 weeks later...

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
Reply to this topic...

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