thanna 11 Posted June 3, 2013 (edited) Hi! I converted this source mod to a plugin to avoid conflict with incoming updates, one of the most unique feature hercules have is HPM Note: The code of @dance isn't mine, credit goes to the owner , I just converted it to a plugin for Hercules Heres the code: #include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h" HPExport struct hplugin_info pinfo ={ "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1a", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)}; ACMD(dance){ if (!message || !*message) { clif->message(fd, "usage: @dance 1-9");return -1; } if ( atoi(message) == 1 ) {clif->specialeffect(&sd->bl, 413, ALL_CLIENT); } else if ( atoi(message) == 2 ) {clif->specialeffect(&sd->bl, 414, ALL_CLIENT); } else if ( atoi(message) == 3 ) {clif->specialeffect(&sd->bl, 415, ALL_CLIENT); } else if ( atoi(message) == 4 ) {clif->specialeffect(&sd->bl, 426, ALL_CLIENT); } else if ( atoi(message) == 5 ) {clif->specialeffect(&sd->bl, 458, ALL_CLIENT); } else if ( atoi(message) == 6 ) {clif->specialeffect(&sd->bl, 466, ALL_CLIENT); } else if ( atoi(message) == 7 ) {clif->specialeffect(&sd->bl, 501, ALL_CLIENT); } else if ( atoi(message) == 8 ) {clif->specialeffect(&sd->bl, 540, ALL_CLIENT); } else if ( atoi(message) == 9 ) {clif->specialeffect(&sd->bl, 550, ALL_CLIENT); } else { clif->message(fd, "usage: @dance 1-9"); } return true;} /* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); script = GET_SYMBOL("script"); skill = GET_SYMBOL("skill"); HPMi->addCommand("dance",ACMD_A(dance));}If you don't know to make/add a plugin follow this link http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC Edited June 4, 2013 by thanna 1 Neo-Mind reacted to this Quote Share this post Link to post Share on other sites
frenzmu06 5 Posted June 3, 2013 as Ind said: This guide is probably the worst I've ever written, if you can do better please hit the 'Edit' button, will be most welcome. - Ind pls do so, T_T Quote Share this post Link to post Share on other sites
thanna 11 Posted June 3, 2013 as Ind said: This guide is probably the worst I've ever written, if you can do better please hit the 'Edit' button, will be most welcome. - Ind pls do so, T_T As you requested, I added step by step images on adding Plugins, hope that it can help you Here's the link http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC#Notes Quote Share this post Link to post Share on other sites
penwilders 0 Posted November 26, 2013 can i ask what to do have an @dance command? i dont know what to do with the plugin thanks Quote Share this post Link to post Share on other sites
Namine 8 Posted April 25, 2015 have error in hercules 2015 1>------ Operación Generar iniciada: proyecto: plugin-dance, configuración: Release Win32 ------ 1>Compilación iniciada a las 24-04-2015 22:33:42. 1>InitializeBuildStatus: 1> Se creará "plugin-danceplugin-dance.unsuccessfulbuild" porque se especificó "AlwaysCreate". 1>ClCompile: 1> dance.c 1>..srcpluginsdance.c(56): warning C4013: 'ACMD_A' sin definir; se supone que extern devuelve como resultado int 1>..srcpluginsdance.c(56): error C2065: 'dance' : identificador no declarado 1>..srcpluginsdance.c(56): warning C4047: 'función' : 'bool (__cdecl *)(const int,map_session_data *,const char *,const char *,AtCommandInfo *)' es distinto en los niveles de direccionamiento indirecto de 'int' 1>..srcpluginsdance.c(56): warning C4024: 'función mediante puntero' : tipos distintos para el parámetro formal y el parámetro real 2 1> 1>ERROR al compilar. 1> 1>Tiempo transcurrido 00:00:00.54 ========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ========== Quote Share this post Link to post Share on other sites
loliserver 0 Posted June 30, 2015 dance.c: In function 'atcommand_dance':dance.c:23:4: warning: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]dance.c: In function 'plugin_init':dance.c:56:5: warning: implicit declaration of function 'ACMD_A' [-Wimplicit-function-declaration]dance.c:56:37: error: 'dance' undeclared (first use in this function)dance.c:56:37: note: each undeclared identifier is reported only once for each function it appears indance.c: At top level:dance.c:15:1: warning: 'atcommand_dance' defined but not used [-Wunused-function]make[1]: *** [../../plugins/dance.so] Error 1make[1]: Leaving directory `/home/roxx/Hercules/src/plugins'make: *** [plugins] Error 2 I have this error in linux Quote Share this post Link to post Share on other sites