Page 1 of 1

multisell from voicecommand

Posted: Fri Aug 02, 2013 8:07 pm
by fendor3
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Last:
L2JDP Revision Last:
im trying to figure out how to call npc's html dialog
im making my own gm shop with voiced command and i cant call a multisell without his npc so what i did is:

Code: Select all

int Npc_Id = 900104L2Npc npc = new L2Npc(5, NpcTable.getInstance().getTemplate(Npc_Id);npc.showChatWindow(activeChar);
this one gives me html dialog with quest button only
and when i try this one:

Code: Select all

 int multisellId= Integer.parseInt(st.nextToken());int Npc_Id = 900104L2Npc npc = new L2Npc(5, NpcTable.getInstance().getTemplate(Npc_Id);MultisellData.getInstance().seperateAndSend(multisellId,activeChar,npc,true);
it fails in server console like iilegal move
all of this codes is part in voiced command handler

Re: multisell from voicecommand

Posted: Sat Aug 03, 2013 10:44 am
by UnAfraid
Multisell can be open but u may not be able to buy anything because client packet requires an npc.

Re: multisell from voicecommand

Posted: Sat Aug 03, 2013 12:27 pm
by fendor3
have you got any solution for me?
i thought to open npc's dialog but i dont succeed to manage it

Re: multisell from voicecommand

Posted: Sat Aug 03, 2013 11:40 pm
by xban1x
What if he created a Map<L2Npc,multisellId> ?

Re: multisell from voicecommand

Posted: Sun Aug 04, 2013 6:02 pm
by fendor3
nevermind thank you i fixed it :)

Re: multisell from voicecommand

Posted: Thu Aug 29, 2013 10:54 pm
by Removed20180815
Since i am trying to do the same thing, i won't create a new topic, i will post here.

I did almost the same, I added this in my handler (i am using an aioitem and i want to add the gmshop):

Code: Select all

 int Npc_Id = 10002;L2Npc npc = new L2Npc(5, NpcTable.getInstance().getTemplate(Npc_Id));player.setIsUsingAIOItemMultisell(true);MultisellData.getInstance().separateAndSend(multisellVal, player, npc, false); // false = multisell, true = exc_multisell
The multisell xml has npc declared (10002), the multisell shows up, but the player can't buy. Nothing happens.

Any ideeas how to make it work ?
Thanks a lot.

Re: multisell from voicecommand

Posted: Fri Aug 30, 2013 7:50 am
by UnAfraid
com.l2jserver.gameserver.network.clientpackets.MultiSellChoose.runImpl()

Code: Select all

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

Re: multisell from voicecommand

Posted: Fri Aug 30, 2013 9:35 am
by Removed20180815
Yea, i already thought about removing that check, if i can't manage to make it "safer".
I guess that is the only way ...

Thanks.

Re: multisell from voicecommand

Posted: Fri Sep 13, 2013 7:23 am
by fendor3
removing this check will get rid of this bug?
maybe better to return true always when the L2Object is instance of L2PcInstance?