multisell from voicecommand

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
fendor3
Posts: 18
Joined: Sat Feb 26, 2011 8:51 am

multisell from voicecommand

Post 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
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: multisell from voicecommand

Post by UnAfraid »

Multisell can be open but u may not be able to buy anything because client packet requires an npc.
Image
fendor3
Posts: 18
Joined: Sat Feb 26, 2011 8:51 am

Re: multisell from voicecommand

Post by fendor3 »

have you got any solution for me?
i thought to open npc's dialog but i dont succeed to manage it
xban1x
L2j Veteran
L2j Veteran
Posts: 1228
Joined: Thu Jan 17, 2013 9:46 am

Re: multisell from voicecommand

Post by xban1x »

What if he created a Map<L2Npc,multisellId> ?
fendor3
Posts: 18
Joined: Sat Feb 26, 2011 8:51 am

Re: multisell from voicecommand

Post by fendor3 »

nevermind thank you i fixed it :)
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: multisell from voicecommand

Post 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.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: multisell from voicecommand

Post 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;}
Image
Removed20180815
Posts: 93
Joined: Tue Jan 09, 2007 12:41 pm

Re: multisell from voicecommand

Post 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.
fendor3
Posts: 18
Joined: Sat Feb 26, 2011 8:51 am

Re: multisell from voicecommand

Post by fendor3 »

removing this check will get rid of this bug?
maybe better to return true always when the L2Object is instance of L2PcInstance?
Post Reply