Page 1 of 1

Help making merchant

Posted: Wed Jul 14, 2010 11:18 pm
by Raikkon35
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number: 4374
L2JDP Revision Number: 7618

Hello!

I need help for making a new GM-Shop.

I want to apply the taxes. But I've seen that the merchants need to be registered in 'merchants' table for it.

Its ok for local merchants. I want to make a GM-Shop, and the original idea was make it and spawn around the world.

I see that this will not be so easy. Then, I need to make a x number of NPCs Merchants and register all in 'merchants' table according with her area id? Or is there something faster?

Thank you very much!

Re: Help making merchant

Posted: Thu Jul 15, 2010 1:42 am
by dinor
As you know taxes are going to the Castle lords.
If you register only 1 merchant in 1 town, even if it spawns in another town the taxes will go to the lord of the registered town. (I haven't tested but that's how should work).

Maybe if you make a multisell will be easier.
http://www.l2jserver.com/wiki/Multisell
isTaxIngredient="true"
Applied only after ingredient id.
If absent, items are not taxed.
If applyTaxes (see above) is not defined, does not apply.
If true and item is Adena, taxes are fully applied.
If true and item is Ancient Adena, taxes are applied in form of Adena based on formula (aa count/6*5)*tax.

All examples are with a tax rate of 10%.
Example 1:

<item id="1">
<ingredient id="57" count="1000" />
<production id="22" count="1" />
</item>

No taxes are applied even if applyTaxes="true".
Example 2:

<item id="1">
<ingredient id="57" count="1200" isTaxIngredient="true" />
<production id="22" count="1" />
</item>

Amount of adena is increased by taxes, resulting price=1320 adena (1200*1.1).
Example 3:

<item id="1">
<ingredient id="6673" count="1200" isTaxIngredient="true" />
<production id="22" count="1" />
</item>

Adena is absent, but Ancient Adena is a tax ingredient, so adena is added using formula (aa count/6*5)*tax,
resulting in a price of 1000AA+1100 adena.

Re: Help making merchant

Posted: Tue Jul 20, 2010 6:15 am
by Raikkon35
Thank you very much for your respond, Dinor!

I'm sorry for not answer you before, but was waiting for more answers.

Before, my shop was multisell, but I want to change it to have more the system more clean, edition of prices more fast with db (copying for price of items directly), and the sell/refund added.

As I have no choice but to do a lot of NPCs.

Thank you :D .
Regards.

Re: Help making merchant

Posted: Tue Jul 20, 2010 6:21 am
by janiii
hm, i thought only the merchantPriceConfig.xml is used. somehow i never see those tables for merchant location, wau.
did you try to add the merchant only to merchant buylist and merchant shopids what it does? if it takes/gives also taxes?

edit: the merchant_areas_list and merchants table are not used in core at all!

Re: Help making merchant

Posted: Tue Jul 20, 2010 10:58 am
by Raikkon35
Ok, I just try this in my test server.

I spawned weapon trader Jackson in different places (using default merchant_buylists, not multisell). In Elven, Aden and Talking Island, the price is different, with taxes applied correctly.

The option to see the taxes and lord of manor shows different data according to zone :) .

Also, I take Aden Castle and taxes are received in warehouse.

So it works perfectly. The xml runs good, and these db tables were useless :mrgreen: . Thank goodness that l2j detect place of merchant, if not... :evil:

Thank you very much for your advice Janiii! The forum would not be the same without you :D .