L2JMobius

Sell on Community

secaolol · 29 · 12397

Offline secaolol

  • Knight
  • ***
    • Posts: 61
after adding this:

What I wrote above is the solution to your issue.
Code: [Select]
<npcs>
<npc>-1</npc> <!-- CB -->
</npcs>

produces such an error in the server:

Code: [Select]
_bbssell;merchant/main
java.lang.NullPointerException
at org.l2jmobius.gameserver.network.serverpackets.BuyList.<init>(BuyList.java:37)
at handlers.communityboard.HomeBoard.parseCommunityBoardCommand(HomeBoard.java:173)
at org.l2jmobius.gameserver.handler.CommunityBoardHandler.handleParseCommand(CommunityBoardHandler.java:121)
at org.l2jmobius.gameserver.network.clientpackets.RequestBypassToServer.run(RequestBypassToServer.java:140)
at org.l2jmobius.gameserver.network.clientpackets.RequestBypassToServer.run(RequestBypassToServer.java:52)
at org.l2jmobius.gameserver.network.GameClient.channelRead0(GameClient.java:131)
at org.l2jmobius.gameserver.network.GameClient.channelRead0(GameClient.java:65)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:835)

since this store does not go like a multisell

Man thanks for u help, but on my GS dont show errors for try sell, and i think the CB use the customs multisells and all multisell/custom have -1 on configs, or maybe he use, i will find it.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114

Offline Edoo

  • Baron
  • *****
    • Posts: 224
CB only uses multisell, not buylist.

this is understandable, but the ability to sell things through CB is made as a buylist:

data\scripts\handlers\communityboard\HomeBoard.java
here is the command in the file
Code: [Select]
else if (command.startsWith("_bbssell"))
{
final String page = command.replace("_bbssell;", "");
returnHtml = HtmCache.getInstance().getHtm(player, "data/html/CommunityBoard/Custom/" + page + ".html");
player.sendPacket(new BuyList(BuyListData.getInstance().getBuyList(423), player, 0));
player.sendPacket(new ExBuySellList(player, false));
}

it indicates what is used buylist.
player.sendPacket(new BuyList(BuyListData.getInstance().getBuyList(423), player, 0));


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114

Offline Edoo

  • Baron
  • *****
    • Posts: 224
It is only used for selling stuff.

So the sale does not occur with ordinary players ... only a GM account can sell.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114
What are you talking about?
Selling works fine on all characters.


Offline Edoo

  • Baron
  • *****
    • Posts: 224
What are you talking about?
Selling works fine on all characters.

that's just the point that sale in СB works only for GM


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114

Offline Edoo

  • Baron
  • *****
    • Posts: 224
Your google translate is broken. :D

I say that the sale in the CB only works with the GM account


Offline Edoo

  • Baron
  • *****
    • Posts: 224

Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114

Offline secaolol

  • Knight
  • ***
    • Posts: 61
What are you talking about?
Selling works fine on all characters.

This is a problem, sorry idk speak EN


Online Liamxroy

  • Grand Duke
  • *****
    • Posts: 761
    • Adenaplease!
There's no support for buylist through community board, use multisell instead.


Offline secaolol

  • Knight
  • ***
    • Posts: 61
There's no support for buylist through community board, use multisell instead.

I use the CB that comes with the project, I only changed the items within the multisells