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

but the thing is, i kinda want it to open multisells...i click on the item, the main html pops up but when i click to buy(accessing a multisell) nothing happens.

  • 0
Posted

sucks that i cant open multisells...so every shop has to be by trade sql's?.

do you know if that voice command when u do .market it can open multisells too?¿

  • 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

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

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