Jump to content
  • 0

Adapt: Community Board Interlude


Question

Posted

Hello beautiful :dance:
im new here :sad:

have some problems  with adapting Community Board (BlesseNtumble)

one of the many thing that making its very hard to adapt
somebody know what is it (_L0) 
Thank u 4 ur time :aproove-smile:

if(con == null) goto _L0; else goto _L0

10 answers to this question

Recommended Posts

  • 0
Posted

You have decompiled code.

Quote

GOTO _LO

 

it's jump to LABEL. Decompilers have no imagine for reproducing back the correct some breakers inside cycles. Possible the Java equivalent is:

if (conn == null)
	continue;

Ofc for FOR cycle inside.

  • 0
Posted
On 10/2/2020 at 5:11 PM, Dreamerdream said:

Acis 

Here is my gatekeeper on my pack, try this one. 

It was copy pasted and adapted from other pack it's not the best quality but it works, you can improve it.

package net.sf.l2j.gameserver.communitybbs.Manager;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
import net.sf.l2j.gameserver.data.xml.TeleportLocationData;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.location.TeleportLocation;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

/**
 * 
 * @author Designatix
 *
 */
public class GatekeeperBBSManager extends BaseBBSManager
{
	public void parsecmd(String command, Player activeChar)
	{
		if (command.startsWith("_bbsgatekeeper"))
		{
			String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/1.htm");
			content = content.replace("%CharName%", String.valueOf(activeChar.getName()));
			separateAndSend(content, activeChar);
			
			StringTokenizer st = new StringTokenizer(command, ";");
			st.nextToken();
			String secondCommand = st.nextToken();
			if (secondCommand.equals("giran")) 
			{
				showGiranTeleports(activeChar);
			}
			else if (secondCommand.equals("aden")) 
			{
				showAdenTeleports(activeChar);
			}
			else if (secondCommand.equals("dion")) 
			{
				showDionTeleports(activeChar);
			}
		    else if (secondCommand.equals("gludio")) 
		    {
		    	showGludioTeleports(activeChar);
		    }
		    else if (secondCommand.equals("heine")) 
		    {
		    	showHeineTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("oren")) 
		    {
		        showOrenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("rune")) 
		    {
		        showRuneTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("goddard")) 
		    {
		        showGoddardTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("schuttgart")) 
		    {
		        showSchuttgartTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("talkingisland")) 
		    {
		        showTalkingIslandTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("elvenvillage")) 
		    {
		        showElvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("darkelvenvillage")) 
		    {
		        showDarkElvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("dwarvenvillage")) 
		    {
		        showDwarvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("orcvillage")) 
		    {
		        showOrcTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("huntersvillage")) 
		    {
		        showHuntersTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("gludin")) 
		    {
		        showGludinTeleports(activeChar);		
		    }
		}
		
		else
		{
			super.parseCmd(command, activeChar);
		}
	}
      
	public static void doTeleport(Player player, int val)
	{
		TeleportLocation list = TeleportLocationData.getInstance().getTeleportLocation(val);
		if (list != null)
		{
			if (player.isAlikeDead())
				return;
			
			// Retrieve price list. Potentially cut it by 2 depending of current date.
			int price = list.getPrice();
			
			// Delete related items, and if successful teleport the player to the location.
			if (player.destroyItemByItemId("Teleport ", (list.isNoble()) ? 6651 : 57, price, player, true))
				player.teleToLocation(list, 20);
		}
		else
			_log.warning("No teleport destination with id:" + val);
		
		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
	
	private static void showGiranTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/giran.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showAdenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/aden.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDionTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/dion.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGludioTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/gludio.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showHeineTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/heine.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showOrenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/oren.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showRuneTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/rune.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGoddardTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/goddard.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showSchuttgartTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/schuttgart.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showTalkingIslandTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/talkingisland.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showElvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/elven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDarkElvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/darkelven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDwarvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/dwarven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showOrcTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/orc.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showHuntersTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/hunters.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGludinTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/gludin.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}
	
	@Override
	protected String getFolder()
	{
		return "stats/";
	}
	
	public static GatekeeperBBSManager getInstance()
	{
		return SingletonHolder.INSTANCE;
	}
      
	private static class SingletonHolder
	{
		protected static final GatekeeperBBSManager INSTANCE = new GatekeeperBBSManager();
	}
}

 

  • 0
Posted
On 10/3/2020 at 7:16 PM, Psyancy said:

Here is my gatekeeper on my pack, try this one. 

It was copy pasted and adapted from other pack it's not the best quality but it works, you can improve it.


package net.sf.l2j.gameserver.communitybbs.Manager;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
import net.sf.l2j.gameserver.data.xml.TeleportLocationData;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.location.TeleportLocation;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

/**
 * 
 * @author Designatix
 *
 */
public class GatekeeperBBSManager extends BaseBBSManager
{
	public void parsecmd(String command, Player activeChar)
	{
		if (command.startsWith("_bbsgatekeeper"))
		{
			String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/1.htm");
			content = content.replace("%CharName%", String.valueOf(activeChar.getName()));
			separateAndSend(content, activeChar);
			
			StringTokenizer st = new StringTokenizer(command, ";");
			st.nextToken();
			String secondCommand = st.nextToken();
			if (secondCommand.equals("giran")) 
			{
				showGiranTeleports(activeChar);
			}
			else if (secondCommand.equals("aden")) 
			{
				showAdenTeleports(activeChar);
			}
			else if (secondCommand.equals("dion")) 
			{
				showDionTeleports(activeChar);
			}
		    else if (secondCommand.equals("gludio")) 
		    {
		    	showGludioTeleports(activeChar);
		    }
		    else if (secondCommand.equals("heine")) 
		    {
		    	showHeineTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("oren")) 
		    {
		        showOrenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("rune")) 
		    {
		        showRuneTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("goddard")) 
		    {
		        showGoddardTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("schuttgart")) 
		    {
		        showSchuttgartTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("talkingisland")) 
		    {
		        showTalkingIslandTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("elvenvillage")) 
		    {
		        showElvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("darkelvenvillage")) 
		    {
		        showDarkElvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("dwarvenvillage")) 
		    {
		        showDwarvenTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("orcvillage")) 
		    {
		        showOrcTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("huntersvillage")) 
		    {
		        showHuntersTeleports(activeChar);		
		    }
		    else if (secondCommand.equals("gludin")) 
		    {
		        showGludinTeleports(activeChar);		
		    }
		}
		
		else
		{
			super.parseCmd(command, activeChar);
		}
	}
      
	public static void doTeleport(Player player, int val)
	{
		TeleportLocation list = TeleportLocationData.getInstance().getTeleportLocation(val);
		if (list != null)
		{
			if (player.isAlikeDead())
				return;
			
			// Retrieve price list. Potentially cut it by 2 depending of current date.
			int price = list.getPrice();
			
			// Delete related items, and if successful teleport the player to the location.
			if (player.destroyItemByItemId("Teleport ", (list.isNoble()) ? 6651 : 57, price, player, true))
				player.teleToLocation(list, 20);
		}
		else
			_log.warning("No teleport destination with id:" + val);
		
		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
	
	private static void showGiranTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/giran.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showAdenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/aden.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDionTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/dion.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGludioTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/gludio.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showHeineTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/heine.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showOrenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/oren.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showRuneTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/rune.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGoddardTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/goddard.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showSchuttgartTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/schuttgart.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showTalkingIslandTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/talkingisland.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showElvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/elven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDarkElvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/darkelven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showDwarvenTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/dwarven.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showOrcTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/orc.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showHuntersTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/hunters.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}

	private static void showGludinTeleports(Player activeChar)
	{
		String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/gatekeeper/gludin.htm");		
		
	    content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
	    content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
	    separateAndSend(content, activeChar);		
	}
	
	@Override
	protected String getFolder()
	{
		return "stats/";
	}
	
	public static GatekeeperBBSManager getInstance()
	{
		return SingletonHolder.INSTANCE;
	}
      
	private static class SingletonHolder
	{
		protected static final GatekeeperBBSManager INSTANCE = new GatekeeperBBSManager();
	}
}

 

Thank You m8 
 L2Teleportloction and TeleportLocationTable  changed the name right ? can you please tell me 
Thank 

private static void doTeleport(Player player, int val) {
        TeleportLocation list = TeleportLocationData.getInstance().getTemplate(val);
        if (list != null) {
            player.teleToLocation(list.getX(), list.getY(), list.getZ(), true);
        } else {
            System.out.println("No teleport destination with id:" + val);
        }

        player.sendPacket(ActionFailed.STATIC_PACKET);
    }

    public static TeleBBSManager getInstance() {
        return TeleBBSManager.SingletonHolder.INSTANCE;
    }

    private static class SingletonHolder {
        protected static final TeleBBSManager INSTANCE = new TeleBBSManager();

        private SingletonHolder() {
        }
    }
}
  • 0
Posted
9 hours ago, Dreamerdream said:

Thank You m8 
 L2Teleportloction and TeleportLocationTable  changed the name right ? can you please tell me 
Thank 


private static void doTeleport(Player player, int val) {
        TeleportLocation list = TeleportLocationData.getInstance().getTemplate(val);
        if (list != null) {
            player.teleToLocation(list.getX(), list.getY(), list.getZ(), true);
        } else {
            System.out.println("No teleport destination with id:" + val);
        }

        player.sendPacket(ActionFailed.STATIC_PACKET);
    }

    public static TeleBBSManager getInstance() {
        return TeleBBSManager.SingletonHolder.INSTANCE;
    }

    private static class SingletonHolder {
        protected static final TeleBBSManager INSTANCE = new TeleBBSManager();

        private SingletonHolder() {
        }
    }
}

It depends on your source version mate, there are several changes all these years locations changed, names changed.

If you find it hard to find something you can search in acis updates for the word you're looking for, example L2TeleportLocation and you will see the new class that it's added or renamed so you will know where to look.

  • 0
Posted

****UPDATE****
completed all the mistakes 
but the CommunityBoard still don't work 
im feeling the its with the TopBBS manager 

if somebody know what wrong here please let me know

Thanks again 4 ur time 

 

public void parseCmd(String command, Player player) {
      String fileName = "";
      StringTokenizer st;
      String ip;
      String content;
      if (Config.ENABLE_COMMUNITY_BOARD) {
         if (command.equals("_bbstop") || command.equals("_bbshome")) {
            fileName = "data/html/CommunityBoard/Custom/CustomIndex.htm";
         }

         if (command.startsWith("_bbshome;")) {
            st = new StringTokenizer(command, ";");
            st.nextToken();
            ip = st.nextToken();
            fileName = "data/html/CommunityBoard/Custom" + ip + ".htm";
         }

         if (fileName.length() == 0) {
            return;
         }

         content = HtmCache.getInstance().getHtm(fileName);
         ip = "N/A";
         String account = "N/A";

         try {
            String clientInfo = player.getClient().toString();
            account = clientInfo.substring(clientInfo.indexOf("Account: ") + 9, clientInfo.indexOf(" - IP: "));
            ip = clientInfo.substring(clientInfo.indexOf(" - IP: ") + 7, clientInfo.lastIndexOf("]"));
         } catch (Exception var8) {
         }

         if (fileName.equals("data/html/CommunityBoard/Custom/toppvp.htm")) {
         }

         PlayerList pk = new PlayerList(1);
         content = content.replaceAll("%pvplist%", pk.loadPlayerList());
         if (fileName.equals("data/html/CommunityBoard/Custom/castle.htm")) {
         }

         CastleStatus status = new CastleStatus();
         content = content.replaceAll("%castle%", status.loadCastleList());
         if (fileName.equals("data/html/CommunityBoard/Custom/toppk.htm")) {
         }

         pk = new PlayerList(0);
         content = content.replaceAll("%pklist%", pk.loadPlayerList());
         if (fileName.equals("data/html/CommunityBoard/Custom/accinfo.htm")) {
         }

         content = content.replaceAll("%name%", player.getName());
         content = content.replaceAll("%level%", String.valueOf(player.getLevel()));
         content = content.replaceAll("%clan%", String.valueOf(ClanTable.getInstance().getClan(player.getClanId())));
         content = content.replaceAll("%xp%", String.valueOf(player.getExp()));
         content = content.replaceAll("%sp%", String.valueOf(player.getSp()));
         content = content.replaceAll("%class%", player.getTemplate().getClassName());
         content = content.replaceAll("%classid%", String.valueOf(player.getClassId()));
         content = content.replaceAll("%currenthp%", String.valueOf((int)player.getCurrentHp()));
         content = content.replaceAll("%maxhp%", String.valueOf(player.getMaxHp()));
         content = content.replaceAll("%currentmp%", String.valueOf((int)player.getCurrentMp()));
         content = content.replaceAll("%maxmp%", String.valueOf(player.getMaxMp()));
         content = content.replaceAll("%currentcp%", String.valueOf((int)player.getCurrentCp()));
         content = content.replaceAll("%maxcp%", String.valueOf(player.getMaxCp()));
         content = content.replaceAll("%currentload%", String.valueOf(player.getCurrentLoad()));
         content = content.replaceAll("%maxload%", String.valueOf(player.getMaxLoad()));
         content = content.replaceAll("%access%", String.valueOf(player.getAccessLevel().getLevel()));
         content = content.replaceAll("%account%", account);
         content = content.replaceAll("%ip%", ip);
         if (fileName.equals("data/html/CommunityBoard/Custom/topadena.htm")) {
         }

         TopAdena topAdena = new TopAdena();
         content = content.replaceAll("%topadena%", topAdena.loadPlayerList());
         if (fileName.equals("data/html/CommunityBoard/Custom/gms.htm")) {
         }


         content = content.replaceAll("%antharas%", bossStatus(29019));
         content = content.replaceAll("%valakas%", bossStatus(29028));
         content = content.replaceAll("%baium%", bossStatus(29001));
         content = content.replaceAll("%antqueen%", bossStatus(29020));
         content = content.replaceAll("%core%", bossStatus(29006));
         content = content.replaceAll("%zaken%", bossStatus(29022));
         content = content.replaceAll("%frintezza%", bossStatus(29045));
         if (fileName.equals("data/html/CommunityBoard/Custom/repair.htm")) {
         }

         content = content.replaceAll("%acc_chars%", getCharList(player));
         if (fileName.equals("data/html/CommunityBoard/Custom/stats.htm")) {
         }

      } else {
         if (command.equals("_bbstop") || command.equals("_bbshome")) {
            fileName = "data/html/CommunityBoard/Index.htm";
         }

         if (command.startsWith("_bbstop;")) {
            st = new StringTokenizer(command, ";");
            st.nextToken();
            ip = st.nextToken();
            fileName = "data/html/CommunityBoard/" + ip + ".htm";
         }

         if (fileName.length() == 0) {
            return;
         }

         content = HtmCache.getInstance().getHtm(fileName);
         if (content != null) {
            separateAndSend(content, player);
         }
      }

   }

   public void parseWrite(String ar1, String ar2, String ar3, String ar4, String ar5, Player player) {
   }


   private static String bossStatus(int bossId) {
      long delay = GrandBossManager.getInstance().getStatsSet(bossId).getLong("respawn_time");
      return delay <= System.currentTimeMillis() ? "<font color=\"9CC300\">Alive</font>" : "<font color=\"ff0000\">Dead</font>";
   }

   private static String getCharList(Player player) {
      String result = "";
      String repCharAcc = player.getAccountName();
      Connection con = null;

      String var5;
      try {
         con = L2DatabaseFactory.getInstance().getConnection();
         PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters WHERE account_name=?");
         statement.setString(1, repCharAcc);
         ResultSet rset = statement.executeQuery();

         while(rset.next()) {
            if (player.getName().compareTo(rset.getString(1)) != 0) {
               result = result + rset.getString(1) + ";";
            }
         }

         rset.close();
         statement.close();
         return result;
      } catch (SQLException var9) {
         var9.printStackTrace();
         var5 = result;
      } finally {
         CloseUtil.close(con);
      }

      return var5;
   }

   public static TopBBSManager getInstance() {
      return SingletonHolder.INSTANCE;
   }

   private static class SingletonHolder {
      protected static final TopBBSManager INSTANCE = new TopBBSManager();

      private SingletonHolder() {
      }
   }
}

 

  • 0
Posted

UPDATE
No error but when i trying to open the community Board noting happening 
When i delete The CustomIndex.htm an try to open the CB its giving me and error 
i tried to change the CustomIndex code to the regular code and still nothing happen 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Dear clients, we strongly advise against holding funds in USDT due to an increase in mass freezes by the issuer. Any wallet can be locked without explanation if your coins happen to be in the wrong place at the wrong time. If you hold savings in USDT, swap them for something safer, such as XMR, BTC, ETH, or similar. When working with crypto, opt for decentralized coins that are technically impossible to freeze. Alternatively, after handling USDT, move your funds into safe assets. To protect your funds, we recommend using XMR, BTC, ETH.
    • Hello everyone, I am looking for a C4 Scions of Destiny (P656) Retail x1 L2OFF Server Pack + Source. My goal is not to launch a server immediately. I want to learn L2OFF server development in C++, understand the original C4 architecture, and eventually build my own project in the future. I have already tried to reach an agreement with a few members who offer C4 projects, but communication has been quite slow, so I decided to ask the community here as well. I'm specifically looking for a Retail x1 version, not a heavily customized x45 or PvP pack. Ideally, the package should include: Complete LoginServer Complete GameServer Source code SQL database AI / NPC scripts Geodata Visual Studio solution/project Everything required to compile, study, and run the server If anyone knows a trusted seller or can recommend a reliable P656 Retail x1 package, I would really appreciate your advice. I would also appreciate hearing from anyone who has purchased a Retail x1 package before and can share their experience. Thank you very much!
    • NEW SEASON OPENING - TODAY ! GRAND OPENING FROM - 10/07/2026, FRIDAY, 20:00 +3 GMT !
    • Elite Lineage II Development | Websites • Master Accounts • Custom Systems • Server Solutions Turn Your Lineage II Project Into a Professional Experience Hello everyone, My name is Frank, and for years I've been developing custom solutions for Lineage II private servers. My focus isn't simply creating attractive websites—it's building complete ecosystems that improve both the player experience and server management. Unlike generic web designers, I understand how Lineage II servers actually work. Every page and system is designed with real gameplay, server administration, and player retention in mind. Whether you're launching your first project or upgrading an established server, I can help you create something that looks and feels like a premium MMORPG. What I Can Build Modern Landing Pages Your landing page is the first impression players have of your server. I create high-end landing pages featuring: • Cinematic hero sections • Animated backgrounds • Countdown timers • Feature showcases • Grand Opening events • Server roadmap • Responsive mobile design • Fast loading and SEO-friendly structure No generic templates. Every landing page is built specifically for your project. Complete Master Account Systems One of my specialties is developing advanced account management panels that integrate naturally with your Lineage II server. Examples include: • Account Dashboard • Character Selection • Character Information • Character Statistics • Combat Power System • Achievement System • Character Mastery • Collections • Daily Rewards • Vote Rewards • Referral Systems • Lucky Wheel • Premium Account Management • Donation Store • Coin Wallet • VIP Services • PIN Protection • Password Management • Inventory Viewer • Warehouse Viewer • Rankings • Online Players • Server Statistics • Event Pages Everything is designed with both usability and visual quality in mind. Custom Web Systems Need something unique? I also develop completely custom features tailored to your server. Examples: • World Boss Event Pages • Raid Boss Tracker • Olympiad Rankings • Castle Siege Overview • Grand Boss Status • Event Management Panels • Daily Hunt Interfaces • Progression Systems • Collection Systems • Custom Shops • Clan Pages • Marketplace • Admin Panels If you have an idea, we can build it. Full Website Development I can create your complete server website, including: • Home • Downloads • News • Patch Notes • Server Information • Wiki • Rankings • Community Pages • Support Center • Knowledge Base • FAQ • Voting Pages • Donation Pages Designed to match your server's identity. Forum Integration Professional integration with community platforms. Examples: • XenForo • phpBB • Discord Integration • Custom Forum Themes • User Synchronization Server Experience Because I actively work with Lineage II servers, I understand much more than web development. Experience includes designing and implementing systems around: • Character progression • Achievement tracking • Collection systems • Daily Hunt mechanics • Lucky Wheel events • Premium services • Server economy • Custom reward systems • World Boss events • Event scheduling • Player dashboards • Administrative tools This allows me to design websites and panels that feel like a natural extension of your server instead of just another website. Technologies • PHP 8 • MySQL / MariaDB • HTML5 • CSS3 • JavaScript • AJAX • Responsive Design • API Integration • Linux Server Environment Why Choose Me? ✔ Years of Lineage II development experience ✔ I understand both the website and the game server ✔ Custom development—not copy-paste templates ✔ Modern UI & UX ✔ Mobile responsive ✔ Clean and optimized code ✔ Long-term support ✔ Fast communication ✔ Flexible solutions for every budget Portfolio Below you'll find examples of projects I've created, including custom landing pages, master account systems, dashboards, progression systems, and unique interfaces developed for real Lineage II servers.     Need Something Unique? Some of the most successful servers stand out because they offer features players haven't seen before. If you have an idea—even if it's only a rough concept—I can help transform it into a polished, fully functional system.     Contact Interested in working together? Feel free to send me a private message with your project details. I'll be happy to discuss your ideas and provide a free estimate. Let's build something your players will remember.     Discord:  https://discord.gg/qnmNkY6D3n
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..