Sell (Shops/Adena)

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
t102030
Posts: 24
Joined: Sun Jun 23, 2013 2:32 am

Sell (Shops/Adena)

Post by t102030 »

L2J Revision Number: 6039
L2JDP Revision Number: 9837

Where i can edit to shops dont give adena for any item sold?
I thought I'd set the price of all items to 0, but that would take too long.

Another way?
Last edited by t102030 on Wed Jun 26, 2013 6:32 pm, edited 1 time in total.
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Sell (Shops/Adena)

Post by BiggBoss »

Buylist is fast, it just 3 queries to set the sell and buy price to 0 (UPDATE).

For multisell, you would have to go to Multisell.java, search for parseEntry function and comment ( /* */ ) the code that parses ingredients. However, for this last one, i dunno if there is any check for ingredient-less items that could be triggered when shopping.
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Sell (Shops/Adena)

Post by UnAfraid »

t102030 wrote:L2J Revision Number: latest
L2JDP Revision Number: latest
latest is not valid revision number!
BiggBoss wrote:Buylist is fast, it just 3 queries to set the sell and buy price to 0 (UPDATE).

For multisell, you would have to go to Multisell.java, search for parseEntry function and comment ( /* */ ) the code that parses ingredients. However, for this last one, i dunno if there is any check for ingredient-less items that could be triggered when shopping.
Buylist is on xml since Changeset 6039
Image
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Sell (Shops/Adena)

Post by BiggBoss »

UnAfraid wrote:
BiggBoss wrote:Buylist is fast, it just 3 queries to set the sell and buy price to 0 (UPDATE).

For multisell, you would have to go to Multisell.java, search for parseEntry function and comment ( /* */ ) the code that parses ingredients. However, for this last one, i dunno if there is any check for ingredient-less items that could be triggered when shopping.
Buylist is on xml since Changeset 6039
oh lol
Image
t102030
Posts: 24
Joined: Sun Jun 23, 2013 2:32 am

Re: Sell (Shops/Adena)

Post by t102030 »

I guess I did not explain right.

What I want is that when the player is selling items (Retail shops, etc.) he did not receive adena.


@ UnAfraid

Editing topic with this informations. Sorry!

EDIT: Topic updated.

Please Help me!
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Sell (Shops/Adena)

Post by BiggBoss »

RequestSellItem.java

Replace this

Code: Select all

 for (ItemHolder i : _items)        {            L2ItemInstance item = player.checkItemManipulation(i.getObjectId(), i.getCount(), "sell");            if ((item == null) || (!item.isSellable()))            {                continue;            }                        long price = item.getReferencePrice() / 2;            totalPrice += price * i.getCount();            if (((MAX_ADENA / i.getCount()) < price) || (totalPrice > MAX_ADENA))            {                Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + MAX_ADENA + " adena worth of goods.", Config.DEFAULT_PUNISH);                return;            }                        if (Config.ALLOW_REFUND)            {                item = player.getInventory().transferItem("Sell", i.getObjectId(), i.getCount(), player.getRefund(), player, merchant);            }            else            {                item = player.getInventory().destroyItem("Sell", i.getObjectId(), i.getCount(), player, merchant);            }        }        player.addAdena("Sell", totalPrice, merchant, false); 
To this

Code: Select all

 for (ItemHolder i : _items){    L2ItemInstance item = player.checkItemManipulation(i.getObjectId(), i.getCount(), "sell");    if ((item == null) || (!item.isSellable()))    {        continue;    }    item = player.getInventory().destroyItem("Sell", i.getObjectId(), i.getCount(), player, merchant);} 
Image
xban1x
L2j Veteran
L2j Veteran
Posts: 1228
Joined: Thu Jan 17, 2013 9:46 am

Re: Sell (Shops/Adena)

Post by xban1x »

BiggBoss making a come back? :P
User avatar
BiggBoss
L2j Veteran
L2j Veteran
Posts: 1104
Joined: Wed Apr 15, 2009 3:11 pm
Location: Spain

Re: Sell (Shops/Adena)

Post by BiggBoss »

finals comming :evil:
Image
t102030
Posts: 24
Joined: Sun Jun 23, 2013 2:32 am

Re: Sell (Shops/Adena)

Post by t102030 »

Thanks BigBoss!!

I love you ♥♥♥♥ :3
Post Reply