This mod was ported from a Hercules plugin by @bio which can be found here. Thank you for the great idea.
This mod implements a new script command called `sellitem` which works just like `callshop`, but only for selling items.
This command has an ability to filter out unwanted items that you don't want to display in selling shop.
The <type> parameter is for specifying the filter type.
SFT_TYPE - Type filter
SFT_ID - ID filter
Item type filter hides every item that isn't of type specified in <param> parameter.
You can set nth bit of <param> to allow certain item type to be displayed. Where n is an item type's numerical value. See src/map/script_constants.h for more info.
Item ID filter hides every item whose ID isn't equal to <param>.
<Overcharge> parameter controls whether overcharge skill will affect item value display in the window.
Example usages:
mes "[ Jellopy Lover ]";
mes "I buy Jellopy for 50 Poring coins each.";
close2;
npcshopattach "JellopyShop";
sellitem "JellopyShop",SFT_ID,909;
end;
mes "[ Rare Items Collector ]";
mes "Sell me some rare items and cards";
close2;
.@filter |= 1 << IT_CARD;
.@filter |= 1 << IT_ARMOR;
.@filter |= 1 << IT_WEAPON;
npcshopattach "CardShop";
sellitem "CardShop",SFT_TYPE,.@filter;
end;
DOWNLOAD THE DIFF FILE