Page 1 of 1

Save custom variables (non quest)

Posted: Thu Jul 21, 2016 12:27 pm
by KGB1st
For example I use this code. But it works only when Quest state.

Code: Select all

if ((qs.get("somevar") == null) || (qs.get("somevar") == "off"))
{
	qs.set("somevar", "on");
}
What about non quests? How I can save custom variable and use it everywhere and everytime before character will be switch in offline state.

Thanks.

Re: Save custom variables (non quest)

Posted: Thu Jul 21, 2016 3:11 pm
by HorridoJoho
There are AccountVariables and PlayerVariables. You can get them by calling L2PcInstance#getAccountVariables and L2PcInstance#getVariables.

Re: Save custom variables (non quest)

Posted: Sat Jul 23, 2016 4:44 am
by KGB1st
Already finded. But thanks)