Jump to content
  • 0

[Resolved]help with bypass community board


Question

Posted

Hola comunidad, necesito ayuda ya que no puedo conseguir un bypass para trabajar en el tablero comunitario que estoy creando para teletransportarme.

Estoy usando la misma función que goto bypass,
lo que quiero hacer es poner _bbsgk; Tabla de teletransporte de identificación

 





	
	
		
			
	
			
			
	
	

 

15 answers to this question

Recommended Posts

  • 0
Posted (edited)

3 hours ago, djsocux said:

if (true)

xD

Nevermind, i don't see any possible reason why it shouldn't work. Is there any console/eclipse error?

Edited by Zake
  • 0
Posted
24 minutes ago, LexaKAZAN said:

)))

 

"_bbsgk;:rage:

 

final StringTokenizer st = new StringTokenizer(command, ";");:thumbs-up:

 

"_bbsgk":troll:

 

????????? :dunno:

 

 

What is the matter with you? there is nothing wrong there

  • 0
Posted (edited)

CommunityBoard.java

/*
 * This file is part of the L2J Mobius project.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.l2jmobius.gameserver.communitybbs;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.l2jmobius.Config;
import org.l2jmobius.gameserver.ai.CtrlIntention;
import org.l2jmobius.gameserver.cache.HtmCache;
import org.l2jmobius.gameserver.communitybbs.Manager.BaseBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.ClanBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.FavoriteBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.FriendsBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.GkBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.MailBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.PostBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.RegionBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.TopBBSManager;
import org.l2jmobius.gameserver.communitybbs.Manager.TopicBBSManager;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ShowBoard;
import org.l2jmobius.gameserver.util.BuilderUtil;

public class CommunityBoard
{
	/** The bypasses used by the players. */
	private final Map<Integer, String> _bypasses = new ConcurrentHashMap<>();
	protected static final String CB_PATH = "data/html/CommunityBoard/";
	
	protected CommunityBoard()
	{
	}
	
	public static CommunityBoard getInstance()
	{
		return SingletonHolder.INSTANCE;
	}
	
	@SuppressWarnings("static-access")
	public void handleCommands(GameClient client, String command)
	{
		final PlayerInstance player = client.getPlayer();
		if (player == null)
		{
			return;
		}
		
		if (!Config.ENABLE_COMMUNITY_BOARD)
		{
			player.sendPacket(SystemMessageId.THE_COMMUNITY_SERVER_IS_CURRENTLY_OFFLINE);
			return;
		}
		
		if (command.startsWith("_bbshome"))
		{
			TopBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsloc"))
		{
			RegionBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsclan"))
		{
			ClanBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsmemo"))
		{
			TopicBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsmail") || command.equals("_maillist_0_1_0_"))
		{
			MailBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_friend") || command.startsWith("_block"))
		{
			FriendsBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbstopics"))
		{
			TopicBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsposts"))
		{
			PostBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbsgetfav") || command.startsWith("bbs_add_fav") || command.startsWith("_bbsdelfav_"))
		{
			// player.sendPacket(new BuyList(TradeController.getInstance().getBuyList(1), 6393));
			// player.sendPacket(new BuyList(Multisell.getInstance().SeparateAndSend(1, player, 0, false, 0)));
			FavoriteBBSManager.getInstance().parseCmd(command, player);
		}
		else if (command.startsWith("_bbgk"))
		{
			GkBBSManager.getInstance().parseCmd(command, player);
		}
		else
		{
			BaseBBSManager.separateAndSend("<html><body><br><br><center>The command: " + command + " isn't implemented.</center></body></html>", player);
		}
	}
	
	public void handleWriteCommands(GameClient client, String url, String arg1, String arg2, String arg3, String arg4, String arg5)
	{
		final PlayerInstance player = client.getPlayer();
		if (player == null)
		{
			return;
		}
		
		if (!Config.ENABLE_COMMUNITY_BOARD)
		{
			player.sendPacket(SystemMessageId.THE_COMMUNITY_SERVER_IS_CURRENTLY_OFFLINE);
			return;
		}
		
		if (url.equals("Topic"))
		{
			TopicBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else if (url.equals("Post"))
		{
			PostBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else if (url.equals("_bbsloc"))
		{
			RegionBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else if (url.equals("_bbsclan"))
		{
			ClanBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else if (url.equals("Mail"))
		{
			MailBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else if (url.equals("_friend"))
		{
			FriendsBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, player);
		}
		else
		{
			BaseBBSManager.separateAndSend("<html><body><br><br><center>The command: " + url + " isn't implemented.</center></body></html>", player);
		}
	}
	protected void loadStaticHtm(String file, PlayerInstance player)
	{
		separateAndSend(HtmCache.getInstance().getHtm(CB_PATH + getFolder() + file), player);
	}
	
	public static void separateAndSend(String html, PlayerInstance acha)
	{
		if ((html == null) || (acha == null))
		{
			return;
		}
		
		if (html.length() < 4090)
		{
			acha.sendPacket(new ShowBoard(html, "101"));
			acha.sendPacket(ShowBoard.STATIC_SHOWBOARD_102);
			acha.sendPacket(ShowBoard.STATIC_SHOWBOARD_103);
		}
		else if (html.length() < 8180)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, html.length()), "102"));
			acha.sendPacket(ShowBoard.STATIC_SHOWBOARD_103);
		}
		else if (html.length() < 12270)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, 8180), "102"));
			acha.sendPacket(new ShowBoard(html.substring(8180, html.length()), "103"));
		}
	}
	
	/**
	 * Sets the last bypass used by the player.
	 * @param player the player
	 * @param title the title
	 * @param bypass the bypass
	 */
	public void addBypass(PlayerInstance player, String title, String bypass)
	{
		_bypasses.put(player.getObjectId(), title + "&" + bypass);
	}
	
	protected String getFolder()
	{
		return "";
	}
	
	/**
	 * Removes the last bypass used by the player.
	 * @param player the player
	 * @return the last bypass used
	 */
	public String removeBypass(PlayerInstance player)
	{
		return _bypasses.remove(player.getObjectId());
	}
	
	private static class SingletonHolder
	{
		protected static final CommunityBoard INSTANCE = new CommunityBoard();
	}
}

 

GkBBSManager.java

/*
* This file is part of the L2J Mobius project.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.l2jmobius.gameserver.communitybbs.Manager;

import java.util.StringTokenizer;

import org.l2jmobius.Config;
import org.l2jmobius.gameserver.datatables.sql.TeleportLocationTable;
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
import org.l2jmobius.gameserver.model.TeleportLocation;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.zone.type.TownZone;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
import org.l2jmobius.gameserver.network.serverpackets.ShowBoard;

public class GkBBSManager extends BaseBBSManager
{
	protected GkBBSManager()
	{
	}
	
	public static GkBBSManager getInstance()
	{
		return SingletonHolder.INSTANCE;
	}
	
	@Override
	public void parseCmd(String command, PlayerInstance player)
	{
		
		if (command.equals("_bbsgk"))
		{
			loadStaticHtm("gk/index.htm", player);
		}
		
		else if (command.startsWith("_bbsgk;"))
		{
			final StringTokenizer st = new StringTokenizer(command, ";");
			st.nextToken();
			if (st.countTokens() <= 0)
			{
				return;
			}
			final int whereTo = Integer.parseInt(st.nextToken());
			if (true)
			{
				player.sendPacket(new ShowBoard());
				doTeleport(player, whereTo);
				return;
			}
			
		}
		else
		{
			super.parseCmd(command, player);
		}
	}
	

	private void doTeleport(PlayerInstance player, int value)
	{
		final TeleportLocation list = TeleportLocationTable.getInstance().getTemplate(value);
		if (list != null)
		{
			// you cannot teleport to village that is in siege
			if (!SiegeManager.getInstance().isTeleportToSiegeAllowed() && (SiegeManager.getInstance().getSiege(list.getX(), list.getY(), list.getZ()) != null) && !player.isNoble())
			{
				player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
				return;
			}
			else if (!SiegeManager.getInstance().isTeleportToSiegeTownAllowed() && (ZoneData.getInstance().getZone(list.getX(), list.getY(), list.getZ(), TownZone.class) != null) && CastleManager.getInstance().findNearestCastle(list.getX(), list.getY()).getSiege().isInProgress() && !player.isNoble())
			{
				player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
				return;
			}
			else if (!player.isGM() && !Config.FLAGED_PLAYER_CAN_USE_GK && (player.getPvpFlag() > 0))
			{
				player.sendMessage("Don't run from PvP! You will be able to use the teleporter only after your flag is gone.");
				return;
			}
			else if (player.isAio() && !Config.ALLOW_AIO_USE_GK)
			{
				player.sendMessage("Aio Buffers are not allowed to use GateKeepers.");
				return;
			}
			else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && (player.getKarma() > 0)) // karma
			{
				player.sendMessage("Go away, you're not welcome here.");
				return;
			}
			
			else if (player.isAlikeDead())
			{
				player.sendMessage("You can't use teleport when you are dead.");
				return;
			}
			else if (player.isSitting())
			{
				player.sendMessage("You can't use teleport when you are sitting.");
				return;
			}
			
			else if (!list.isForNoble() && ((player.getLevel() < 30) || player.destroyItem("Adena", 57, list.getPrice(), null, true)))
			{
				player.teleToLocation(list.getX(), list.getY(), list.getZ(), true);
			}
		}
		else
		{
			LOGGER.warning("No teleport destination with id:" + value);
		}
		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
	
	@Override
	protected String getFolder()
	{
		return "top/";
	}
	
	private static class SingletonHolder
	{
		protected static final GkBBSManager INSTANCE = new GkBBSManager();
	}
}

that's the files I have everything registered
what I do not understand why I do not get the id of the teleport table

 

225b821761e6c8598cd6da364e19008eo.png

Edited by djsocux
  • 0
Posted

Come on you can't be that blind xD

else if (command.startsWith("_bbgk"))
		{
			GkBBSManager.getInstance().parseCmd(command, player);
		}

change _bbgk to _bbsgk

  • 0
Posted
4 hours ago, djsocux said:

it works but when I am above lvl 31 it gives me inconrect item count

else if (!list.isForNoble() && ((player.getLevel() < 30) || player.destroyItem("Adena", 57, list.getPrice(), null, true)))
			{
				player.teleToLocation(list.getX(), list.getY(), list.getZ(), true);
			}

player.destroyItem("Adena", 57, list.getPrice(), null, true)

this statement returns false for some reason, check the declaration of this method 

Guest
This topic is now closed to further replies.


  • Posts

    • This is complete dogshit.  It's missing the most basic things. There are duped cells everywhere, and cells where there shouldn't be any, places that are completely unreachable by the player. (like below all sorts of stairs) DO NOT EVEN CONSIDER BUYING THIS, THIS IS CHATGPT SLOP AND A SCAM  
    • A modern game panel rebuilt from scratch for Lineage 2 private servers What is L2jWeb V3? L2jWeb V3 is the new version of the panel, fully refactored from scratch. This is not a small update on top of the old V2 code. The whole structure has been redesigned with cleaner logic, better separation between the web panel and the game database, improved security, and a much better way to support different L2J sources. The goal is simple. Server owners should be able to manage their project, users, donations, shops, game accounts, characters, and multiple servers from one panel without having to fight with hardcoded database logic every time they use a different source. Refactored From Scratch The new implementation was built again from the ground up. The old approach worked, but over time it became harder to maintain because every L2J source has its own database structure, table names, columns, and custom changes. V3 solves this in a cleaner way. Instead of mixing source specific queries all over the panel, the system now uses a proper mapping layer for the game database. Correct L2J Source Database Mapping One of the biggest improvements in L2jWeb V3 is the new database mapping system for different L2J sources. Every important game object is bound to an interface contract. Accounts, characters, items, services, rewards, and other source related actions are not hardcoded directly into the panel anymore. The panel works with contracts, and each L2J source has its own implementation behind those contracts. In simple words, the panel knows what it wants to do, and the selected source knows how to do it in its own database. This makes the project much easier to maintain, easier to extend, and much safer when adding support for more L2J sources in the future. Multi Server Support L2jWeb V3 supports multiple game servers from the same installation. You can add and manage different servers from the admin panel. Each server can have its own database connection, source type, settings, shop products, and services. This is useful if you run more than one realm, different chronicles, seasonal servers, test servers, or multiple projects from the same community. x402 Wallet Crypto Payments L2jWeb V3 also adds support for the x402 protocol. This is a very important feature for modern payments because it allows wallet to wallet payments without a traditional middleman holding the money. With normal payment gateways, the payment usually goes through a company that controls the flow, keeps custody for part of the process, applies rules, and may block or delay things. With x402, the user pays directly from their wallet and the server owner receives the payment directly to their wallet. The facilitator helps the application verify the payment. It checks the payment proof and confirms that the request has been paid correctly, so the panel can safely continue with the donation or balance update. The important part is that the facilitator is not the same as a classic payment processor. It helps with verification and coordination, but the funds move wallet to wallet. For server owners, this gives a more direct payment option and reduces dependency on traditional third party platforms. In order to learn more for x402 protocol click here Donation System L2jWeb V3 includes a complete donation system. Supported payment options can include: Stripe PayPal x402 wallet to wallet crypto payments Donations can be stored in the user's master account balance and then used inside the panel for shop purchases, services, or other features depending on your setup. Master Account System Players use one master account to manage their game accounts and characters. This makes things easier for the player because they do not need to remember every detail separately. From the user panel, they can create game accounts, manage existing accounts, recover details, and access available services. Game Account Control Players can manage their game accounts directly from the panel. Available features can include: Create game accounts Manage existing game accounts Reset or recover credentials View linked characters Use account related services Receive game account details by email if enabled Character Menu And Services The character menu gives players quick access to useful character actions from the web panel. For example, if a character gets stuck, the player can use the unstuck option and send the character back to town without waiting for staff support. More services can be configured depending on the server setup. Shop And Services The shop is fully manageable from the admin panel. You can add products, edit prices, enable or disable products, and choose which server each product is available for. This makes it easier to monetize your server while keeping control over what each server can sell. For example, one server can have different products or prices than another server. Fully Customizable Theme The panel is fully customizable through theme settings. You can change logos, icons, and all main colors directly from the panel, so the website can match your server's branding without editing the code manually. Admin Panel L2jWeb V3 includes a powerful admin panel for managing your project. Admin features include: Server management User management Donation logs Shop management Panel settings Theme settings for logos, icons, and colors Social login settings Security options Game source configuration Most important settings are configurable directly from the panel, so you do not need to edit files manually for every small change. Security Features Security was also improved in the new implementation. Available security features include: Two factor authentication Email verification Cloudflare Turnstile protection against bots Rate limiting per guest IP or authenticated user CSRF protection XSS protection Security headers HTTPS only protection Password confirmation for sensitive actions Social login support Social Login The panel can support social login providers such as Google and Discord. This gives players a faster way to register and log in, while still keeping the account system controlled from the panel. Other Features Database cache system Server status Multi source support Optional email verification Optional account details email after registration Cloudflare Turnstile bot protection Modern user dashboard Modern admin dashboard Clean Laravel based implementation Demo demo.l2jweb.com Some features may be disabled in the demo version or may not work exactly like a live installation. Contact Discord: Contact me Pricing Price is 150 euro flat, the same as Version 2. Existing customers get a 50 euro discount. Custom Work If you need custom features, source adaptations, special services, design changes, or extra integrations, you can contact me and we can discuss your request. Extra custom work is not included by default and must be paid separately. Test And Payment Files are not delivered before payment. If you want to test the panel first, a demo link can be provided.
    • Well, it turns out 100 characters really wasn’t enough for a proper test. Here’s a simulation of 1,500 players in a single location — each one is randomly equipped, running around randomly, and casting skills.    
  • 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..