We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

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: 222
Joined: Sat Jul 26, 2014 5:58 pm
Location: ИРК, РФ, СИБИРЬ!
Contact:

Save custom variables (non quest)

Post by KGB1st » Thu Jul 21, 2016 12:27 pm

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 » Thu Jul 21, 2016 3:11 pm

There are AccountVariables and PlayerVariables. You can get them by calling L2PcInstance#getAccountVariables and L2PcInstance#getVariables.

User avatar
KGB1st
Posts: 222
Joined: Sat Jul 26, 2014 5:58 pm
Location: ИРК, РФ, СИБИРЬ!
Contact:

Re: Save custom variables (non quest)

Post by KGB1st » Sat Jul 23, 2016 4:44 am

Already finded. But thanks)

Post Reply