Jump to content
  • 0

Multisell Community Board For Acis


Question

Posted (edited)

Hello guys, I have allmost finished my community board for acis, and later I can share it with you.. I cannot fix only one thing, When I use multisell for CB the window opens but when I try to buy the items, its not possible.. If I do the same through NPC it works. I am not so familiar with java, I started 2 weeks ago to build my CB, the code inside java community board is:

 

   else if (command.startsWith("_bbsmultisell;"))
        {
            if(activeChar.isDead() || activeChar.isAlikeDead() || activeChar.isInSiege() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isInOlympiadMode() || activeChar.isInJail() || activeChar.isFlying() || activeChar.getKarma() > 0 || activeChar.isInDuel()){
                activeChar.sendMessage("U cant use shop");
                return;
            }
            StringTokenizer st = new StringTokenizer(command, ";");
                                st.nextToken();           
                                int multisell = Integer.parseInt(st.nextToken());
                                MultisellData.getInstance().separateAndSend(Integer.parseInt(st.nextToken()), activeChar, false, 0);
                            }

 

I found a similar code on internet and I adapt it like that.. I dont know what should I change or add or maybe import something else.. I appriciate any help, suggestion, code! ( my thought is that the error is in the last line of the code) Thanks

Edited by stormv

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

Remove 

 int multisell = Integer.parseInt(st.nextToken());

as it already processes the multisell id just after, meaning you would need 2 parameters on your command to make it currently work.

 

-----

 

StringTokenizer st = new StringTokenizer(command, ";"); => cut command using ; as delimiter
st.nextToken(); => bypass first part of command, which is _bbsmultisell
int multisell = Integer.parseInt(st.nextToken()); => next token is the id, save it on multisell integer
MultisellData.getInstance().separateAndSend(Integer.parseInt(st.nextToken()), activeChar, false, 0); => can't process because the id is already stored into multisell integer. Or would work for command;id;id the second parameter being useless as not used.

 

To finish with, latest aCis is using String not int.

Edited by Tryskell
  • 0
Posted (edited)

Tryskell thanks a lot for your help! I removed the line you suggest, and when I open the window still I cannot buy, or sometimes times I have fatal error and exit from the game.. This is the link for my error (image): https://postimg.org/image/kvds79i6t/

 

 StringTokenizer st = new StringTokenizer(command, ";");
                                st.nextToken();          
                                MultisellData.getInstance().separateAndSend(Integer.parseInt(st.nextToken()), activeChar, false, 0);

 

so the code should be like that? or should I change something else? because I think with your yellow comments you explain me the commands.

 

Also I have added the network.serverpackets...etc.. into the communityboard java file. Should I put the xmf file somewhere else instead of the default multisell file?

 

Update: Also when I use npc for multisell I get the same error in the console but I purchase the items (if that helps)

Edited by stormv
  • 0
Posted (edited)

I'm not sure how should be your bypass ; _bbsmultisell;id ? Also put logs here and there, notably to show how exactly your command is cutted (if even cutted ; maybe you simply forgot to register the bbs on CommunityBoard.java).

 

Which error in console ?

Edited by Tryskell
  • 0
Posted (edited)

I think the bypass is registered because the shop window opens through the CB but I cannot purchase any item.. On the other hand when I use multisell with npc it works.. All those errors in the image that I uploaded. There are the same errors when I use the CB or Npc but in case of npc I can make tha trade. Do I have to change something to MultiSellChoose java?. The code that I posted previous its the only code that I have added on communityboard.java, I havent done anything else for the multisell, I was wondering if its only 3 lines to be working, so ? If you need to uploade my whole code or some images let me know. Thanks

 

The code that I tried to adapt from internet is the next one:

I dont understand why they use topbbsmanager inside this code.

else if (command.startsWith("_bbsmultisell;"))
+				{
+					if(activeChar.isDead() || activeChar.isAlikeDead() || TvTEvent.isStarted() || activeChar.isInSiege() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isInOlympiadMode() || activeChar.isInJail() || activeChar.isFlying() || activeChar.getKarma() > 0 || activeChar.isInDuel()){
+		                activeChar.sendMessage("Â äàííûõ óñëîâèÿõ øîï çàïðåùåí");
+						return;
+		            } 
+					StringTokenizer st = new StringTokenizer(command, ";");
+		            st.nextToken();
+		            TopBBSManager.getInstance().parsecmd("_bbstop;" + st.nextToken(), activeChar);
+		            int multisell = Integer.parseInt(st.nextToken());
+		            MultiSell.getInstance().separateAndSend(multisell, activeChar, null, false);
Edited by stormv
  • 0
Posted

Tryskell thanks a lot for your help! I removed the line you suggest, and when I open the window still I cannot buy, or sometimes times I have fatal error and exit from the game.. This is the link for my error (image): https://postimg.org/image/kvds79i6t/

 

 StringTokenizer st = new StringTokenizer(command, ";");

                                st.nextToken();          

                                MultisellData.getInstance().separateAndSend(Integer.parseInt(st.nextToken()), activeChar, false, 0);

 

so the code should be like that? or should I change something else? because I think with your yellow comments you explain me the commands.

 

Also I have added the network.serverpackets...etc.. into the communityboard java file. Should I put the xmf file somewhere else instead of the default multisell file?

 

Update: Also when I use npc for multisell I get the same error in the console but I purchase the items (if that helps)

The code like this should work, that NPE you get is probably some error inside the XML, since you get it at both CB/NPC.

 

The fact that buy from multisell doesn't work, is probably because there would be some kind of NPC range check inside MultisellChoose.java (i'm not home i can't check the packet, but i'm 90% sure i'm right on this one).

  • 0
Posted (edited)

Versus you have right the code inside multisellchoose.java is:

L2Npc merchant = (player.getTarget() instanceof L2Npc) ? (L2Npc) player.getTarget() : null;
		if (merchant == null || !merchant.canInteract(player))
			return;
		
		ListContainer list = MultisellData.getInstance().getList(_listId);
		if (list == null)
			return;

I removed the line:

if (merchant == null || !merchant.canInteract(player))
			return;

Now I can buy through CB and multisell, but on the other hand IF I want to use any multisell shop through npc in the game I cant because obviously I delete those lines inside the code. So because I dont have so much knowledge from java I dont know how to rebuild this code and do it, to interact both though CB and npc. I dont think changing someting inside xmf files will help. Thanks

Edited by stormv
  • 0
Posted

Buying from NPC would work if you only removed these 2 lines, but there won't be any range check on any multisell on the server. A player could trigger multisell packet from npc, teleport and still buy items. If you don't like this behavior i'd suggest you to re-add the check, and make it being bypassed in case the multisell was triggered by CB command.

  • 0
Posted

I am not really sure If I understood what you said. Yea I can buy from any shop, I meant I am not able to buy from multisell shop through npc. What do you mean bypassed?

  • 0
Posted

If you only removed the 2 lines you showed us, you should be able to buy from NPC multisell too.

 

What i meant with bypass the check:
If multisell is triggered through NPC -> check for range/null merchant.

If multisell is triggered through CB -> don't check for range/null merchant.

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

    • ## [1.5.5] - 2026-02-02   ### ✨ New Features - **Discord Login**: You can now sign in with your Discord account. Admins enable and configure Discord login in **cpadmin → Users** (Discord auth settings: Client ID, Client Secret, Redirect URI). If you already have an account with the same email (e.g. forum, Google, or legacy), signing in with Discord links to that account so you keep one profile. Discord login is available on Add Server, My Servers, Vote page, and Premium Ads booking. - **Setup Links**: In **cpadmin → Users**, both Google and Discord login settings now include direct links to their official developer portals (Google Cloud Console and Discord Developer Portal) for easier OAuth app setup.   ### 🔒 Security - **Email Required for Registration**: New user registration via OAuth (Forum, Google, Discord) now requires a valid email address. If the OAuth provider doesn't provide an email (e.g. unverified Discord email), registration is rejected with a clear message. This prevents anonymous accounts and ensures all users can receive important notifications.   ### 🔄 Improvements - **User Auth Badges**: In **cpadmin → Users**, the Registered Members table now shows auth method badges: **Forum**, **Google**, **Discord**, or **Legacy**. Users can have multiple badges if they've linked multiple login methods. - **Server Info Labels**: Translated server info labels (Owner Name, Language, Server Location) are now properly localized in all 5 languages (English, Spanish, Portuguese, Greek, Russian).   ---   ## [1.5.4] - 2026-02-01   ### ✨ New Features - **Google Login**: You can now sign in with your Google account. Admins enable and configure Google login in **cpadmin → Users** (Google auth settings: Client ID, Client Secret, Redirect URI). If you already have an account with the same email (e.g. forum or legacy), signing in with Google links to that account so you keep one profile. The login menu (navbar and login prompts) offers **Login with Forum Account**, **Login with Google** (when enabled), and **Create Forum Account**. Google login is available on Add Server, My Servers, Profile Settings, Vote page, and Premium Ads booking. - **Ban/Unban Members**: In **cpadmin → Users**, admins can ban or unban registered members. Banned users see a full-page message: "Sorry, you are banned from using this site." When a user is banned, all their servers are set to inactive. - **Moderator Activity Log**: **cpadmin → Moderators** now records when a moderator or admin enters the CPAdmin panel (e.g. "Moderator X entered CPAdmin panel at <time>") and when they change any cpadmin settings (only write actions are logged; read-only use is not). - **Clear Moderator Logs**: Admins can clear all moderator activity log entries via a **Clear logs** button with confirmation. Logs are shown at 100 per page with pagination. - **Filter by Moderator**: In the Moderator Activity Log, a **Filter by moderator** dropdown lets you view activity for a specific moderator or "All moderators." - **cpadmin → Users Tab**: New **Users** tab in the admin panel with Registered Members list (paginated), Google auth settings card, and per-user Ban/Unban and server links.   ### 🔄 Improvements - **cpadmin → Servers**: Each server name in the servers table is now clickable and opens that server’s info page. - **cpadmin → Users – Servers column**: The servers count/list is clickable and opens a small modal listing that user’s servers; each server name in the modal links to the server info page. - **cpadmin → Users – Search**: A search bar above the Registered Members table lets you search by **username**, **email**, or **server name**. Results are filtered on the server (paginated); clearing the search resets the list. - **Moderator Activity Log**: Pagination shows "Showing X–Y of Z" and "Page N of M" with Previous/Next when there are more than 100 entries. - **Login UI**: Login options (Forum, Google, Create account) are shown in a consistent dropdown and in modals (Add Server, My Servers, Vote, Premium Ads) for a clearer sign-in experience. - **Vote Page – Unauthenticated**: When you must log in to vote, the page now shows "Vote for [Server Name]" as the main heading and presents login options in a compact section.   ---   ## [1.5.3] - 2026-01-30   ### ✨ New Features - **File Logs in Admin Panel**: Admins can now view CodeIgniter PHP logs (api/writable/logs) directly in **cpadmin → Logs**. Select a date to view the log file, refresh to reload, or delete all log files to free up space.   ### 🔄 Improvements - **Cache System**: Full cache audit and improvements — when you clear cache in cpadmin, both backend and frontend caches are cleared. Server listings, My Servers, pricing, ad config, and chronicles all refresh with fresh data. New paid servers now appear in listings and My Servers immediately. - **Admin Panel – Server Rates**: Server rates in the admin servers table now display in compact format (e.g. x10000 → x10k, x100000 → x100k, x1000000 → x1m) for easier scanning. Hover to see the full value.
    • WTB High Five source running on Salvation/Fafurion client
    • MoMoProxy has updated more static residential proxies for USA location, anyone interested in can view: https://momoproxy.com/static-residential-proxies
    • Hello, i am selling a project that was going to open but at the end i have not the time to do it Its a c4 server ( scripts) with all the c5 changes played from Interlude Client    the server is 1:1 copy of the legendary 2007 L2Revenge server with some bits like events and some more sync stuff There is a lot of retail fixes included  , extender is vanganth and has a lot of mods but mostly fixes on the retail stuff.   Test server is available through discord , i offer client/patch/server/sources The price is 300 Euro and for testing the server you have to pm me at discord banshee1019 , dont really wanna let anybody log because some people are "bad"   Once you buy you also have free support for 1 year , that doesnt mean i will code all your ideas but support you if something comes up , and guide you to do simple edits
  • 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..