Jump to content
  • 0

L2Jfrozen Right Code For .pmoff/.pmon .tradeon/.tradeoff And .info


Question

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

I not ask to adapt my code, i ask "who have adapted code for l2jfrozen" ....

 

I use this code

 

http://www.maxcheate...p?topic=48161.0

http://www.maxcheate...p?topic=48004.0

 

change import and have errors

Edited by Selim
  • 0
Posted

I think i must add "admin_tradeoff" so i put

 

adminadmin.java this code:

			case admin_tradeoff:
			
			try
			{
				String mode = command.substring(15);
				if(mode.equalsIgnoreCase("on"))
				{
					activeChar.setTradeRefusal(true);
					activeChar.sendMessage("Trade refusal enabled.");
				}
				else if(mode.equalsIgnoreCase("off"))
				{
					activeChar.setTradeRefusal(false);
					activeChar.sendMessage("Trade refusal disabled.");
				}
			}
			catch(Exception ex)
			{
				if(activeChar.getTradeRefusal())
				{
					activeChar.setTradeRefusal(false);
					activeChar.sendMessage("Trade refusal disabled.");
				}
				else
				{
					activeChar.setTradeRefusal(true);
					activeChar.sendMessage("Trade refusal enabled.");
				}
			}

and to pcinstance.java this:

//Line 1202

	private boolean _tradeRefusal = false;

//Line 14245

	public void setTradeRefusal(boolean mode)
	{
		_tradeRefusal = mode;
	}

	public boolean getTradeRefusal()
	{
		return _tradeRefusal;
	}

Copile succes, admin comand in panel and custom tradeoff/tradeon whe i use it i see sysmsg "trade refusal enabled/disabled" but i still can give trade to player, i think i must add somethink else to activate it to work but i dont know what and where :/

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