- 0
-
Posts
-
By Lineage II Arvaz · Posted
Do you remember playing on any of these servers too?(L2Archon, L2Elite, L2RarceSupremacy, L2Core) -
🔥 All Premium Subscriptions Available: ChatGPT Plus, Claude Pro, Cursor AI, Canva Pro, CapCut Pro, and YouTube Premium. Instant delivery 24/7!
-
Aurelian is a free Lineage 2 website template for L2J and L2Off/PTS servers, with a medieval/gold design and three visual themes. You can use it as a completely standalone website, connect it to Forgeport for live server data, or have the website hosted directly by Forgeport. Forgeport is a hosted player portal, website and donation store platform for Lineage 2 servers. The important distinction here: you do not need Forgeport to use Aurelian. The static edition is a complete standalone website. What’s inside: Hero News Features Rates Store Vote Rankings Sieges Bosses Media Download FAQ Three themes are included: Royal Gold Crimson Frozen Two downloadable editions: Static — complete standalone site. Edit index.html and upload it to any static host. Zero build process, everything is bundled locally and there are no CDN dependencies. No Forgeport subscription required. Forgeport-integrated — same self-hosted website, but live sections such as players online, rankings, sieges, store, vote and news pull their data from your Forgeport portal’s public read-only API. This edition requires an active Forgeport subscription. Hosted version If you use Forgeport, you don’t have to host the website yourself. When you claim Aurelian, your account also gets an activation code / handoff link. Activate it on your Forgeport organization and the website is served directly by Forgeport with the live portal data connected. So there are three ways to use it: Static → standalone, self-hosted Integrated → self-hosted + Forgeport live data Hosted → served directly by Forgeport + live data How to get it Create a free account at https://shop.forgeport.net Open Aurelian (€0) and claim it. Download the edition you want, or use the activation code / handoff link for the hosted version. No card required. For clarity: the static edition is fully usable standalone and does not require a Forgeport account or subscription. You only need the free shop account to claim and download the files. Links Aurelian / download: https://shop.forgeport.net/ro/en/products/aurelian-lineage-2-website-template Forgeport: https://forgeport.net Documentation: https://docs.forgeport.net/docs There are also other Lineage 2 website templates available in the shop. Two images attached: cover + full-page preview. Please report issues in this thread
-
September update: Aurelian is now free AURELIAN, the medieval/gold Lineage 2 website template, is now free. It includes all three themes: Royal Gold, Crimson and Frozen. You can have it as: Hosted on Forgeport — activate it on your Forgeport organization. Forgeport serves the website and supplies the live data; nothing to host. Can be modified at your will. Static — complete standalone site. Edit index.html and upload it to any static host. Zero build process, everything bundled locally, no CDNs. Forgeport-integrated — same self-hosted site, but players online, rankings, sieges, store, vote and news use your portal’s public read-only API. This edition requires an active Forgeport subscription. There are also other Lineage 2 website templates available in the shop. Claim Aurelian for €0: https://shop.forgeport.net
-
-
Topics

Question
janiko
hi everyone i need help to call this script onLogout
but i dont know how to call this script on log out, can someone help me?
public void save(L2PcInstance owner) { if (isModified) { saveToDatabase(owner); } }this is my scheme buffer table
package com.l2jserver.gameserver.communitybbs.BB; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javolution.util.FastList; import javolution.util.FastMap; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import gnu.trove.map.hash.TIntIntHashMap; /** * @author BiggBoss Buffer database tables: - scheme_buffs: contains buffname, buffid and bufflevel to handle - scheme_buffer_profiles: contains each char id with his scheme profile - scheme_char_buffs: contains the player objectid, his profile and buff name, buff id and buff level for each profile */ public class SchemeBufferManager { /* FastMap to hold the avaliable buffs, FastList to properly iterate showing the buffs */ public static FastMap<String, Integer[]> _buffs = new FastMap<>(); public static TIntIntHashMap _skillLevels = new TIntIntHashMap(); /* Pages to show the buffs. Each page should have 15 buffs */ public static int _pages; public SchemeBufferManager() { loadData(); } /* * Load all buffs into a FastMap at server start up */ private void loadData() { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("SELECT * FROM scheme_buffs"); ResultSet rset = statement.executeQuery(); while (rset.next()) { Integer[] buffs = new Integer[2]; String name = rset.getString("buff_name"); buffs[0] = rset.getInt("buff_id"); buffs[1] = rset.getInt("buff_lvl"); _buffs.put(name, buffs); } statement.close(); } catch (SQLException e) { e.printStackTrace(); } _pages = Math.round(_buffs.size() /* / (CustomConfig.IS_X50_SERVER ? 22 : 15) */); for (Integer[] i : _buffs.values()) { _skillLevels.put(i[0], i[1]); } // All was correct, print out a message System.out.println("Loaded " + _buffs.size() + " buffs for the Scheme Buffer. " + _pages + " pages available."); } /* * Load all player profiles into a FastList */ public FastList<PlayerBuffProfile> loadPlayerProfiles(L2PcInstance player) { FastList<PlayerBuffProfile> profiles = new FastList<>(); try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("SELECT profile, buffs FROM scheme_buffer_profiles WHERE charId = ?"); statement.setInt(1, player.getObjectId()); ResultSet rset = statement.executeQuery(); if (rset == null) { return null; } while (rset.next()) { PlayerBuffProfile profile = SchemeBufferManager.getInstance().new PlayerBuffProfile(rset.getString("profile")); String[] buffs = rset.getString("buffs").split(";"); for (String buff : buffs) { profile.buffs.add(buff); } profiles.add(profile); } statement.close(); } catch (SQLException e) { e.printStackTrace(); } return profiles; } public void saveProfile(L2PcInstance player, String profile) { try(Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("INSERT INTO scheme_buffer_profiles VALUES ( ? , ? )"); statement.setInt(1, player.getObjectId()); statement.setString(2, profile); statement.execute(); con.close(); statement.close(); } catch(SQLException e) { e.printStackTrace(); } } public void deleteFromDatabase(L2PcInstance owner, String profile) { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("DELETE FROM scheme_buffer_profiles WHERE charId = ? AND profile = ?"); statement.setInt(1, owner.getObjectId()); statement.setString(2, profile); statement.execute(); statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { owner.removeProfile(profile); } } public class PlayerBuffProfile { public final String profileName; public final FastList<String> buffs; private boolean isModified = false; public PlayerBuffProfile(String $profileName) { profileName = $profileName; buffs = new FastList<>(); } public void addBuff(String buffName) { isModified = true; buffs.add(buffName); } public void removeBuff(String buffName) { isModified = true; buffs.remove(buffName); } public void save(L2PcInstance owner) { if (isModified) { saveToDatabase(owner); } } private void saveToDatabase(L2PcInstance owner) { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("REPLACE INTO scheme_buffer_profiles VALUES ( ? , ? , ? )"); statement.setInt(1, owner.getObjectId()); statement.setString(2, profileName); statement.setString(3, getBuffsAsString()); statement.execute(); statement.close(); } catch (SQLException e) { e.printStackTrace(); } finally { isModified = false; } } private String getBuffsAsString() { StringBuilder sb = new StringBuilder(); for (String buff : buffs) { sb.append(buff); sb.append(";"); } return sb.toString(); } } public static final SchemeBufferManager getInstance() { return SingletonHolder._instance; } private static class SingletonHolder { protected static final SchemeBufferManager _instance = new SchemeBufferManager(); } }1 answer 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