Jump to content
  • 0

[Help]Some java requests.


Question

Posted

Hi everyone. Well, I was wondering to the people that know java out there, I wanted to make an item that opens a gm shop. So far i made the item, it opens the HTML but when i click on the buy/sell, it doesnt do anything, the chat box just closes and nothing happens.

 

Thanks

LiquidIce

9 answers to this question

Recommended Posts

  • 0
Posted

Well you need to fix the baypasstoserve to and the comands.

 

Something like that at requestbypasstoserver;

 

+			else if (_command.startsWith("item_"))
+			{
+				String command = _command.split(" ")[0];
+
+				IBufferCommandHandler bch = BufferCommandHandler.getInstance().getBufferCommandHandler(command);
+				
+				if (bch == null)
+				{
+					if ( activeChar.isGM() )
+						activeChar.sendMessage("The command " + command.split("_")[0] + " does not exists!");
+
+					_log.warning("No handler registered for buffer command '" + command + "'");
+					return;
+				}
+
+				bch.useBufferCommand(_command, activeChar);
+			}

  • 0
Posted

thanks cobra. but im kind of a java noob. can you explain to me in where i have to add this. u said in requestbypasstoserver but in which lines...at the end..beginning..thanks alot.

  • 0
Posted

This is an example for item buffer you need to put your item name there also.. put it up of this line;

 

}
		catch (Exception e)
		{

 

 

something like that;

 

+			else if (_command.startsWith("item_"))
+			{
+				String command = _command.split(" ")[0];
+
+				IBufferCommandHandler bch = BufferCommandHandler.getInstance().getBufferCommandHandler(command);
+				
+				if (bch == null)
+				{
+					if ( activeChar.isGM() )
+						activeChar.sendMessage("The command " + command.split("_")[0] + " does not exists!");
+
+					_log.warning("No handler registered for buffer command '" + command + "'");
+					return;
+				}
+
+				bch.useBufferCommand(_command, activeChar);
+			}
		}
		catch (Exception e)
		{

  • 0
Posted

thanks alot man..well lets hope this can be done..

also u know if its also possible to make the item open the gatekeeper and teleport you?

sorry for so many questions but i just have many ideas that require java and i suck at it

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