Save custom variables (non quest)

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Save custom variables (non quest)

Post 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.
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Save custom variables (non quest)

Post by HorridoJoho »

There are AccountVariables and PlayerVariables. You can get them by calling L2PcInstance#getAccountVariables and L2PcInstance#getVariables.
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: Save custom variables (non quest)

Post by KGB1st »

Already finded. But thanks)
Post Reply