@storeitem

Ind

Development Administrator
Staff member
Messages
1,655
Points
113
thumb-765184c6d09b54bfb5a2be28f7066a50-plugin-storeitem.jpg


File Name: @storeitem

File Submitter: Ind

File Submitted: 10 Oct 2013

File Category: Plugins

HPM Plugin. Implements the @storeitem command

Code:
@storeitem <item name or ID> <quantity> <refine> <char name>
Designed by Beowulf/Nightroad

How to Install

Check the wiki page on 'Building a Plugin' http://herc.ws/wiki/HPM#Building_a_plugin

Contribute / Customize

Its available at our Staff Plugins Repo, pull requests are more than welcome.

Click here to download this file

 
Nice one!
default_smile.png


Just few questions

Do HPM @commands when added shows in the @command list?

And does the HPM @commands can be added in the groups.conf?

storeitem: true

Thanks!

 
Nice one!
default_smile.png


Just few questions

Do HPM @commands when added shows in the @command list?

And does the HPM @commands can be added in the groups.conf?

storeitem: true

Thanks!
as far i know yes

you can add  HPM Plugins in the groups.conf because all Plugins are Loaded BEFORE the groups conf.

 
not working on latest git version:

missing declaration:

1>------ Rebuild All started: Project: @storeitem, Configuration: Debug Win32 ------
1>  @storeitem.c
1>c:[email protected](39): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:program filesmicrosoft visual studio 10.0vcincludestdio.h(325) : see declaration of 'sscanf'
1>c:[email protected](46): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:program filesmicrosoft visual studio 10.0vcincludestdio.h(371) : see declaration of 'sprintf'
1>c:[email protected](74): error C2039: 'get_group_level' : is not a member of 'pc_interface'
1>          c:usersdelldesktopherc_localsrcmappc.h(736) : see declaration of 'pc_interface'
1>c:[email protected](74): error C2039: 'get_group_level' : is not a member of 'pc_interface'
1>          c:usersdelldesktopherc_localsrcmappc.h(736) : see declaration of 'pc_interface'
1>c:[email protected](79): error C2065: 'mob' : undeclared identifier
1>c:[email protected](79): error C2223: left of '->db' must point to struct/union
1>c:[email protected](114): warning C4013: 'ACMD_A' undefined; assuming extern returning int
1>c:[email protected](114): error C2065: 'storeitem' : undeclared identifier
1>c:[email protected](114): warning C4047: 'function' : 'bool (__cdecl *)(const int,map_session_data *,const char *,const char *,AtCommandInfo *)' differs in levels of indirection from 'int'
1>c:[email protected](114): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
 
not working on latest git version:

missing declaration:

1>------ Rebuild All started: Project: @storeitem, Configuration: Debug Win32 ------
1>  @storeitem.c
1>c:[email protected](39): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:program filesmicrosoft visual studio 10.0vcincludestdio.h(325) : see declaration of 'sscanf'
1>c:[email protected](46): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>          c:program filesmicrosoft visual studio 10.0vcincludestdio.h(371) : see declaration of 'sprintf'
1>c:[email protected](74): error C2039: 'get_group_level' : is not a member of 'pc_interface'
1>          c:usersdelldesktopherc_localsrcmappc.h(736) : see declaration of 'pc_interface'
1>c:[email protected](74): error C2039: 'get_group_level' : is not a member of 'pc_interface'
1>          c:usersdelldesktopherc_localsrcmappc.h(736) : see declaration of 'pc_interface'
1>c:[email protected](79): error C2065: 'mob' : undeclared identifier
1>c:[email protected](79): error C2223: left of '->db' must point to struct/union
1>c:[email protected](114): warning C4013: 'ACMD_A' undefined; assuming extern returning int
1>c:[email protected](114): error C2065: 'storeitem' : undeclared identifier
1>c:[email protected](114): warning C4047: 'function' : 'bool (__cdecl *)(const int,map_session_data *,const char *,const char *,AtCommandInfo *)' differs in levels of indirection from 'int'
1>c:[email protected](114): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I can confirm the same problem, replacing the functions as per suggested by Visual Express cause additional problem. ? Will confirm if having problem in *nix later.

 
wew! Beat me to it. I am supposed to also update the plugin. Btw, the old plugin is not yet configured to stack stackable items.

Find:

if( ( item_data->type != 4 && item_data->type != 5 ) || item_data->flag.no_refine ) ref = 0; get_count = number;
Add after:

if (!itemdb->isstackable2(item_data)) { get_count = 1; }
For now, create_pet() seems to be attached to player only. So, putting it to storage fails.

 
Why am I having this error on my CentOS? in works on windows.

I already added in to makefile.in, make plugins output:

*** No rule to make target `@storeitem', needed by `all'. Stop.make: *** [plugins] Error 2
Thanks!

 
Hello! What should I replace to make characters who are logged out still able to store in their storage?

Code:
 if ((pl_sd = map->nick2sd(character)) != NULL) { ... }
 
Back
Top