Page 1 of 3

no action at multisell

Posted: Fri Jun 22, 2012 8:44 pm
by djmouse
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 5172
L2JDP Revision Number: 8675

Hi guys, I need some help with multisell.
When I call my multisell from NPC it works ok and I can buy items, but I want to call it from my community board.
At CB I actually get menu with multisell items, but when I try to buy something nothing happens.

part of my code

Code: Select all

 StringTokenizer st = new StringTokenizer(command, ";");                    st.nextToken();                    TopBBSManager.getInstance().parsecmd("_bbstop;" + st.nextToken(), activeChar);                    int multisell = Integer.parseInt(st.nextToken());                    L2Multisell.getInstance().separateAndSend(multisell, activeChar, 0, false, 0); 

Re: no action at multisell

Posted: Sat Jun 23, 2012 8:57 am
by djmouse
Just found some validations for multisell at MultiSellChoose.java. Is there any "good" way to add CB check there instead of removing those lines?

Re: no action at multisell

Posted: Sun Sep 28, 2014 8:36 pm
by disorder35
Sorry for dig this post but I just don't want to open a new one for the same problem. I have been having the same problem with my community board Gm shop. Gm char can buy any item from CB GmShop but regular players can't, they are able to see the multisell but when they click on confirm nothing happen. The weird thing is sometimes it work and most of the times it doesn't. I use the same method on communityboard.java as the post above.
If anyone could help me I will greatly appreciate.

Re: no action at multisell

Posted: Sun Sep 28, 2014 8:49 pm
by Stalitsa
com.l2jserver.gameserver.network.clientpackets.MultiSellChoose;

Code: Select all

          L2Npc target = player.getLastFolkNPC();         if (!player.isGM() && ((target == null)          || !list.checkNpcObjectId(target.getObjectId())         || !target.canInteract(player)))         {               player.setMultiSell(null);               return;         } 
Change to: (temp fix)

Code: Select all

         L2Npc target = player.getLastFolkNPC();        // if (!player.isGM() && ((target == null)        // || !list.checkNpcObjectId(target.getObjectId())        // || !target.canInteract(player)))        // {        // player.setMultiSell(null);        // return;        // } 
it is said about 10 times in that forum do a search :)

Edit: djmouse share the code plz :)

Re: no action at multisell

Posted: Mon Sep 29, 2014 12:17 am
by UnAfraid
SouLakoS wrote:com.l2jserver.gameserver.network.clientpackets.MultiSellChoose;

Code: Select all

          L2Npc target = player.getLastFolkNPC();         if (!player.isGM() && ((target == null)          || !list.checkNpcObjectId(target.getObjectId())         || !target.canInteract(player)))         {               player.setMultiSell(null);               return;         } 
Change to: (temp fix)

Code: Select all

         L2Npc target = player.getLastFolkNPC();        // if (!player.isGM() && ((target == null)        // || !list.checkNpcObjectId(target.getObjectId())        // || !target.canInteract(player)))        // {        // player.setMultiSell(null);        // return;        // } 
it is said about 10 times in that forum do a search :)

Edit: djmouse share the code plz :)
Are you aware of what big hole you are going to open by commenting those lines out?
Basically you give the ability of opening every multisell by just knowing its id.

Re: no action at multisell

Posted: Mon Sep 29, 2014 2:51 am
by disorder35
so how can we fix this without commenting those lines?
commenting those lines fix the player problem but now gms can't use the community board GMSHOP.
it's the opposite way.

Re: no action at multisell

Posted: Mon Sep 29, 2014 8:17 pm
by UnAfraid
multisells that doesnt contains <npcs> element should be open-able from community board without problems.

Re: no action at multisell

Posted: Tue Sep 30, 2014 8:08 am
by disorder35
If a comment those lines player can buy from community board multisell, but Gm can't.
If I leave it regular Gm can buy from community board multisell but regular player can't.
There is no <npc> elements on the xml files.
Btw I'm using unstable trunk.

Please help me fix it without commenting those lines.

Thank you.

Re: no action at multisell

Posted: Tue Sep 30, 2014 10:44 pm
by Stalitsa
UnAfraid wrote: Are you aware of what big hole you are going to open by commenting those lines out?
Basically you give the ability of opening every multisell by just knowing its id.
I didn say its safe that code but i noticed that is a temp to see the multisell and that i asked djmouse for the code!!
i dont sugest anyone to use that on live server i just told him where is the code that is not alowwing to open multisel!!!

Re: no action at multisell

Posted: Wed Oct 01, 2014 12:32 am
by UnAfraid
SouLakoS wrote:
UnAfraid wrote: Are you aware of what big hole you are going to open by commenting those lines out?
Basically you give the ability of opening every multisell by just knowing its id.
I didn say its safe that code but i noticed that is a temp to see the multisell and that i asked djmouse for the code!!
i dont sugest anyone to use that on live server i just told him where is the code that is not alowwing to open multisel!!!
Removing codes from the core is easier then just not adding extra lines on the multisell?

Re: no action at multisell

Posted: Wed Oct 01, 2014 2:58 am
by Stalitsa
UnAfraid wrote:
SouLakoS wrote:
UnAfraid wrote: Are you aware of what big hole you are going to open by commenting those lines out?
Basically you give the ability of opening every multisell by just knowing its id.
I didn say its safe that code but i noticed that is a temp to see the multisell and that i asked djmouse for the code!!
i dont sugest anyone to use that on live server i just told him where is the code that is not alowwing to open multisel!!!
Removing codes from the core is easier then just not adding extra lines on the multisell?
i noticed that is a temp fix nect to my "chengeset"! but you are right i didnt notice that not use in live servers! and im not a java expert to know where exactly is the Cobe to allow multisells on comunity shop! (so is on multisell and not in code?) i just said what i did so far to check where the code comes from!

sry for my bad English!

And thnx for the information!!!

Re: no action at multisell

Posted: Wed Oct 01, 2014 4:27 am
by disorder35
UnAfraid wrote: Removing codes from the core is easier then just not adding extra lines on the multisell?
what are the extra lines? I have been looking at at my multisells for hours and found nothing. Regular player is able to buy from the same multisell if he go to a npc. Like the GmShop npc and the community board Gmshop uses the same multisell files and if the player go to npc he is able to buy.

Please UnAfraid if you know the answer share it over here. Because I'm not able to figure it out. I'm not a java expert, I'm able to adapt and fix some codes but I can't code yet.
Thank you.

Re: no action at multisell

Posted: Wed Oct 01, 2014 10:52 am
by Stalitsa
disorder35 wrote: Please UnAfraid if you know the answer share it over here. Because I'm not able to figure it out. I'm not a java expert, I'm able to adapt and fix some codes but I can't code yet.
Thank you.
+1
me too

Re: no action at multisell

Posted: Wed Oct 01, 2014 1:18 pm
by UnAfraid
better make your own multisells and do not add lines like:

Code: Select all

<list ...>    <npcs>        <npc>ID</npc>    </npc>   ...</list>
because that limits the multisell to these npcs only

Re: no action at multisell

Posted: Wed Oct 01, 2014 2:03 pm
by Stalitsa
UnAfraid wrote:better make your own multisells and do not add lines like:

Code: Select all

<list ...>    <npcs>        <npc>ID</npc>    </npc>   ...</list>
because that limits the multisell to these npcs only

I dont have any of these and my multisell is that one and i can buy items with a Non gm char

Code: Select all

<?xml version='1.0' encoding='utf-8'?><list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">   <!-- Brigandine Tunic -->  <item>    <ingredient id="57" count="500000"/>    <production id="352" count="1"/>    <production id="2378" count="1"/>    <production id="2411" count="1"/>    <production id="2425" count="1"/>    <production id="2449" count="1"/>    <production id="2493" count="1"/>  </item>   <!-- Manticore Skin Shirt -->  <item>    <ingredient id="57" count="500000"/>    <production id="395" count="1"/>    <production id="417" count="1"/>    <production id="2424" count="1"/>    <production id="2448" count="1"/>  </item>    <!-- Mithril Tunic -->  <item>    <ingredient id="57" count="500000"/>    <production id="437" count="1"/>    <production id="470" count="1"/>    <production id="2450" count="1"/>  </item></list>
EDIT: We can see the multisell list but we can not buy items from it!
1 more thing i just tested i have errors when i load multisells .... when i have then on Custom folder but when i put them with the rest of them on main folder it works ok!!

i will post the log with errors!