Added: a brand-new default dashboard template.
You can now add multiple game/login server builds.
Full support for running both PTS & L2J servers simultaneously, with switching between them.
Payment systems: added OmegaPay and Pally (new PayPal-style API).
Account history now stores everything: donations, items delivered to characters, referrals, transfers between game accounts, and coin transfers to another master account.
Personal Promo Code System: you can create a promo code and assign it to a user or promoter. When donating, a player can enter this promo code to receive bonus coins, and the promo code owner also receives a bonus — all fully configurable in the admin panel.
Look demo site: demo
MoMoProxy has updated more static residential proxies for USA location, anyone interested in can view: https://momoproxy.com/static-residential-proxies
Question
janiko
Hope someone can help
I wrote script to restore buffs here is the function.
the problem is that it restores only first buff from sql record
Example of Sql Record
-- ---------------------------- -- Table structure for `community_skillsave` -- ---------------------------- DROP TABLE IF EXISTS `community_skillsave`; CREATE TABLE `community_skillsave` ( `charId` int(10) DEFAULT NULL, `skills` text, `pet` text ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of community_skillsave -- ---------------------------- INSERT INTO `community_skillsave` VALUES ('268480452', '1240;1048;', null);Restore Java Script
private void RESTOR(L2PcInstance activeChar) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement stat = con.prepareStatement("SELECT * FROM community_skillsave WHERE charId=?;"); stat.setInt(1, activeChar.getObjectId()); ResultSet rset = stat.executeQuery(); rset.next(); String allskills = rset.getString(2); StringTokenizer stBuff = new StringTokenizer(allskills, ";"); while (stBuff.hasMoreTokens()) { int skilltoresatore = Integer.parseInt(stBuff.nextToken()); int skilllevel = SkillTable.getInstance().getMaxLevel(skilltoresatore); L2Skill skill = SkillTable.getInstance().getInfo(skilltoresatore, skilllevel); PreparedStatement st = con.prepareStatement("SELECT COUNT(*) FROM community_skillsave WHERE skills=?;"); st.setInt(1, skilltoresatore); ResultSet rs = st.executeQuery(); rs.next(); if (rs.getInt(1) != 0) { skill.getEffects(activeChar, activeChar); } else { activeChar.sendMessage("Buff: " + skill.getName() + " (" + skill.getId() + "), can't be restored!"); } rs.close(); st.close(); } rset.close(); stat.close(); } catch (SQLException e) { } finally { L2DatabaseFactory.close(con); } }thanks to everyone
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now