Jump to content
  • 0

Variables don;t save my option


Question

Posted

Hello, i put my ".menu" with trade option. Disabled/Enables. And method work, block trade request or allow. Depends on state.
And i want to save this choice of player on character_variables. I put as fallow on
.manu
 

case "trade":
				if (!activeChar.getVariables().getBoolean("trade_off", false))
				{
					activeChar.setTradeRefusal(true);
					activeChar.getVariables().set("trade_off", true);
					activeChar.sendMessage("[Blocked Trade]: Enabled !");
				}
				else
				{
					activeChar.setTradeRefusal(false);
					activeChar.getVariables().set("trade_off", false);
					activeChar.sendMessage("[Blocked Trade]: Disabled !");
				}
				break;


TradeRequest.Java

 

if (player.getVariables().getBoolean("trade_off", false))
		{
			player.sendMessage("[Trade Refuse]: Player in refusal trade.");
			return;
		}


EnterWorld.java

		if (player.getVariables().getBoolean("trade_off", false))
		{
			player.setTradeRefusal(true);
			player.sendMessage("[Blocked Trade]: Enabled !");
		}

 

With this settings. if i put enable, after restart, it's still disabled. I use L2j-Mobius. Maybe someone can help.  Greeings & Thank you!

6 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, 0flee said:

It is false, i should to true?

No work...:/😒

try to debug this one, see if returns false and why. If this is a static false then just remove it

Guest
This topic is now closed to further replies.


  • Posts

    • Tool that allows you to download the Lineage 2 game client directly from the official publisher CDNs. It fetches the CDN's file list and downloads every patch file, decompresses it (LZMA / Zip) and writes the finished client to disk — and can resume or repair an existing installation instead of starting over. It runs several client downloads at once through a batch queue, so you can prepare multiple regions or versions in a single session.   Supported: NCSoft CDNs (TW / KR / JP / NA) and  4game CDNs(RU / EU)   Download: https://drive.google.com/file/d/11SDcNASqO2GKOBT79LFu7mqvSRSJZvBS
    • https://l2avokado.com/ Hello everyone,   After some time of development, we've decided to open L2Avokado to the public in its current development stage. We're looking for players who enjoy Interlude and would like to help shape the project before its official release.   This isn't a "launch" announcement. Instead, we're inviting the community to log in, explore the server, test the systems we've built, and provide honest feedback. Whether it's bug reports, balance suggestions, progression ideas, or quality-of-life improvements, we'd love to hear them.   Our goal has always been to create an Interlude server that feels familiar while offering a fresh progression experience. We've intentionally avoided custom weapons, armor, and client modifications. Instead, we've focused on redesigning progression through reworked hunting grounds, quests, crafting, and gameplay systems while remaining compatible with a clean Interlude client.   At this stage, the core progression path has been implemented, including the main hunting grounds, quests, custom systems, and events. However, as the project is still under active development, there will inevitably be bugs, balance issues, and areas that require further polishing.   This is exactly why we'd like your help.   We're looking for players who are willing to: Test gameplay and progression. Report bugs and exploits. Suggest balance improvements. Share ideas for new features or quality-of-life changes. Help us build a server that the community genuinely enjoys playing.   The Client and System downloads are already available on our website, so you can jump straight into the game. We're also working on a dedicated launcher that will simplify installation and future updates.   If you're interested in helping develop a unique Interlude project and want your feedback to genuinely influence the direction of the server, we'd love to have you with us.   We look forward to seeing you in-game and hearing your thoughts on Discord. https://l2avokado.com/
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..