Secrets Posted January 22, 2017 Share Posted January 22, 2017 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. Quote Command usage: sellitem "<shopname">,<type>,<param>{,<overcharge>}; 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; [email protected] |= 1 << IT_CARD; [email protected] |= 1 << IT_ARMOR; [email protected] |= 1 << IT_WEAPON; npcshopattach "CardShop"; sellitem "CardShop",SFT_TYPE,[email protected]; end; DOWNLOAD THE DIFF FILE 6 Quote Link to comment Share on other sites More sharing options...
Deleted User Posted January 22, 2017 Share Posted January 22, 2017 Hi, Secret thank you for porting this from rAthena this is very useful command. i have a question so im able to get support on this? since yours is working fine. my emulator is kinda old around June 2016. When i recompile my rAthena it gives me error. Severity Code Description Project File Line Suppression State Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19095 Warning C4047 'function': 'int' differs in levels of indirection from 'bool (__cdecl *)(item_data *,int,int)' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Warning C4047 'function': 'item *' differs in levels of indirection from 'int' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19103 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19114 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19117 Warning C4024 'itemdb_isrestricted': different types for formal and actual parameter 1 map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Warning C4024 'itemdb_isrestricted': different types for formal and actual parameter 3 map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2198 'itemdb_isrestricted': too few arguments for call map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2198 'itemdb_search': too few arguments for call map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19095 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19103 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19114 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19117 Thank you in advanced! i appreciate it. Quote Link to comment Share on other sites More sharing options...
Secrets Posted January 22, 2017 Author Share Posted January 22, 2017 1 hour ago, Kaze said: Hi, Secret thank you for porting this from rAthena this is very useful command. i have a question so im able to get support on this? since yours is working fine. my emulator is kinda old around June 2016. When i recompile my rAthena it gives me error. Severity Code Description Project File Line Suppression State Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19095 Warning C4047 'function': 'int' differs in levels of indirection from 'bool (__cdecl *)(item_data *,int,int)' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Warning C4047 'function': 'item *' differs in levels of indirection from 'int' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19103 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19114 Error C2039 'inventory': is not a member of 'map_session_data' map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19117 Warning C4024 'itemdb_isrestricted': different types for formal and actual parameter 1 map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Warning C4024 'itemdb_isrestricted': different types for formal and actual parameter 3 map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2198 'itemdb_isrestricted': too few arguments for call map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error C2198 'itemdb_search': too few arguments for call map-server C:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19095 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19099 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19103 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19111 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19114 Error (active) struct "map_session_data" has no field "inventory" map-server c:\Users\Administrator\Desktop\Test-Server\src\map\clif.c 19117 Thank you in advanced! i appreciate it. Replace all sd->inventory.u.items_inventory to sd->status.inventory Quote Link to comment Share on other sites More sharing options...
Deleted User Posted January 22, 2017 Share Posted January 22, 2017 @Secrets Thanks a lot i appreciate it. Quote Link to comment Share on other sites More sharing options...