modified @dance

java

New member
Messages
22
Points
0
Emulator
Hercules
hi i just try to modify @dance hehe

to install this plugin maybe u must read at wiki 1st ( if new to hercules )

for windows  go to : http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC

and for unix go to : http://herc.ws/wiki/Building_HPM_Plugin_for_gcc

and this is the source code for @dance 

#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.1b", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};//===modified by jetkappu==ACMD(dance){int msg;msg = rand()%9;if ( msg == 1 || msg == 0) { clif->specialeffect(&sd->bl, 400, ALL_CLIENT); clif->specialeffect(&sd->bl, 413, ALL_CLIENT);} else if ( msg == 2 ) { clif->specialeffect(&sd->bl, 300, ALL_CLIENT); clif->specialeffect(&sd->bl, 414, ALL_CLIENT);} else if ( msg == 3 ) { clif->specialeffect(&sd->bl, 400, ALL_CLIENT); clif->specialeffect(&sd->bl, 415, ALL_CLIENT);} else if ( msg == 4 ) { clif->specialeffect(&sd->bl, 300, ALL_CLIENT); clif->specialeffect(&sd->bl, 426, ALL_CLIENT);} else if ( msg == 5 ) { clif->specialeffect(&sd->bl, 400, ALL_CLIENT); clif->specialeffect(&sd->bl, 458, ALL_CLIENT);} else if ( msg == 6 ) { clif->specialeffect(&sd->bl, 300, ALL_CLIENT); clif->specialeffect(&sd->bl, 466, ALL_CLIENT);} else if ( msg == 7 ) { clif->specialeffect(&sd->bl, 400, ALL_CLIENT); clif->specialeffect(&sd->bl, 501, ALL_CLIENT);} else if ( msg == 8 ) { clif->specialeffect(&sd->bl, 300, ALL_CLIENT); clif->specialeffect(&sd->bl, 540, ALL_CLIENT);} else if ( msg == 9 ) { clif->specialeffect(&sd->bl, 400, ALL_CLIENT); clif->specialeffect(&sd->bl, 550, ALL_CLIENT);}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));}

that's just tiny modification, i make this just for fun, so ur player won't got bored when using @dance continously hehe

and then diff ur hexed, so u and ur player can spam typing to ex : 10 times

note: i just modify it, credit goes to owner.. ( i think this source made by onplay ) if im not wrong
default_tongue.png


 
Last edited by a moderator:
Hello,

Thanks for this mod and yes it's by OnPlay :3

 
Show your plugins.conf

 
//====================================================//= _ _ _ //= | | | | | | //= | |_| | ___ _ __ ___ _ _| | ___ ___ //= | _ |/ _ '__/ __| | | | |/ _ / __|//= | | | | __/ | | (__| |_| | | __/__ //= _| |_/___|_| ___|__,_|_|___||___///= //= http://herc.ws/board/ //====================================================//== Topic Discussion ================================//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager///====================================================//== Description =====================================//The plugin system allows you to create customized scripts //outside of the source. These scripts won't conflict with any //future source updates - think of it as a /conf/import/ for the source. //====================================================/* --------------- Format ---------------After you have listed your plugin(s) in "quotations", you need to put in a comma, to separate the plugins.-----------------------------------------plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", //"db2sql", //"sample", //"other", "dance", // loads dance plugin]-----------------------------------------Please note that your scripts need to be savedin the .c (source code) extension and placed in the /src/plugin/ folder.-----------------------------------------plugins_list: [ //"db2sql", //"sample", //"other"]
Here's my plugin.conf

 
^ Obviously you do it wrong... because in your file there are 2 plugins_list

try this one

//====================================================//== Topic Discussion ================================//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager///====================================================//== Description =====================================//The plugin system allows you to create customized scripts //outside of the source. These scripts won't conflict with any //future source updates - think of it as a /conf/import/ for the source. //====================================================/* --------------- Format ---------------After you have listed your plugin(s) in "quotations", you need to put in a comma, to separate the plugins.-----------------------------------------plugins_list: [ "example", "other",]-----------------------------------------Please note that your scripts need to be savedin the .c (source code) extension and placed in the /src/plugin/ folder.-----------------------------------------*/plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "dance", //"db2sql", //"sample", //"other",]
Please be careful of this code /* */ for commenting purpose

 
Last edited by a moderator:
If you are using old Hercules, you should not have last ","

Also the plugin in the 1st post is outdated, heres a updated one

#include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/clif.h"#include "../map/atcommand.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h"HPExport struct hplugin_info pinfo ={ "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1b", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(dance){int msg;msg = rand()%9;switch(msg){ case 0: case 1: case 3: case 5: case 7: case 9: clif->specialeffect(&sd->bl, 400, ALL_CLIENT); if (msg==0 || msg==1) {clif->specialeffect(&sd->bl, 413, ALL_CLIENT);} else if(msg==3){clif->specialeffect(&sd->bl, 415, ALL_CLIENT);} else if(msg==5){clif->specialeffect(&sd->bl, 458, ALL_CLIENT);} else if(msg==7){clif->specialeffect(&sd->bl, 501, ALL_CLIENT);} else{clif->specialeffect(&sd->bl, 550, ALL_CLIENT);} break; case 2: case 4: case 6: case 8: clif->specialeffect(&sd->bl, 300, ALL_CLIENT); if (msg==2){clif->specialeffect(&sd->bl, 414, ALL_CLIENT);} else if (msg==4){ clif->specialeffect(&sd->bl, 426, ALL_CLIENT); } else if (msg==6){ clif->specialeffect(&sd->bl, 466, ALL_CLIENT); } else { clif->specialeffect(&sd->bl, 540, ALL_CLIENT); } }return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); atcommand = GET_SYMBOL("atcommand"); script = GET_SYMBOL("script"); skill = GET_SYMBOL("skill"); addAtcommand("dance",dance);}
If using old version of hercules.

//====================================================//== Topic Discussion ================================//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager///====================================================//== Description =====================================//The plugin system allows you to create customized scripts //outside of the source. These scripts won't conflict with any //future source updates - think of it as a /conf/import/ for the source. //==================================================== /* --------------- Format ---------------After you have listed your plugin(s) in "quotations", you need to put in a comma, to separate the plugins.-----------------------------------------plugins_list: [ "example", "other",]-----------------------------------------Please note that your scripts need to be savedin the .c (source code) extension and placed in the /src/plugin/ folder.-----------------------------------------*/plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "dance" //"db2sql", //"sample", //"other",]
Else the Mhalicot plugins.conf would work.

 
#include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/clif.h"#include "../map/atcommand.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h"HPExport struct hplugin_info pinfo ={ "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1b", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(dance){int msg;msg = rand()%9;switch(msg){ case 0: case 1: case 3: case 5: case 7: case 9: clif->specialeffect(&sd->bl, 400, ALL_CLIENT); if (msg==0 || msg==1) {clif->specialeffect(&sd->bl, 413, ALL_CLIENT);} else if(msg==3){clif->specialeffect(&sd->bl, 415, ALL_CLIENT);} else if(msg==5){clif->specialeffect(&sd->bl, 458, ALL_CLIENT);} else if(msg==7){clif->specialeffect(&sd->bl, 501, ALL_CLIENT);} else{clif->specialeffect(&sd->bl, 550, ALL_CLIENT);} break; case 2: case 4: case 6: case 8: clif->specialeffect(&sd->bl, 300, ALL_CLIENT); if (msg==2){clif->specialeffect(&sd->bl, 414, ALL_CLIENT);} else if (msg==4){ clif->specialeffect(&sd->bl, 426, ALL_CLIENT); } else if (msg==6){ clif->specialeffect(&sd->bl, 466, ALL_CLIENT); } else { clif->specialeffect(&sd->bl, 540, ALL_CLIENT); } }return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); atcommand = GET_SYMBOL("atcommand"); script = GET_SYMBOL("script"); skill = GET_SYMBOL("skill"); addAtcommand("dance",dance);}
I don't know where imma put this things..

...please guide me more

noob here..

 
that's what I DID bro... anyway i'll try this next time.. when someone give me a 2013 client that read data folder.... tired of those ERRORS... fail fail fail fail and fail and fail ...
default_sad.png
:(
default_sad.png


 
dance.c:23: warning: implicit declaration of function 'rand'

using uptodate hercules and dastgir updated src.

 
dance.c:23: warning: implicit declaration of function 'rand'

using uptodate hercules and dastgir updated src.
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "../common/HPMi.h"#include "../map/clif.h"#include "../map/atcommand.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h"HPExport struct hplugin_info pinfo ={ "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1b", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(dance){int msg;msg = rand()%9;switch(msg){ case 0: case 1: case 3: case 5: case 7: case 9: clif->specialeffect(&sd->bl, 400, ALL_CLIENT); if (msg==0 || msg==1) {clif->specialeffect(&sd->bl, 413, ALL_CLIENT);} else if(msg==3){clif->specialeffect(&sd->bl, 415, ALL_CLIENT);} else if(msg==5){clif->specialeffect(&sd->bl, 458, ALL_CLIENT);} else if(msg==7){clif->specialeffect(&sd->bl, 501, ALL_CLIENT);} else{clif->specialeffect(&sd->bl, 550, ALL_CLIENT);} break; case 2: case 4: case 6: case 8: clif->specialeffect(&sd->bl, 300, ALL_CLIENT); if (msg==2){clif->specialeffect(&sd->bl, 414, ALL_CLIENT);} else if (msg==4){ clif->specialeffect(&sd->bl, 426, ALL_CLIENT); } else if (msg==6){ clif->specialeffect(&sd->bl, 466, ALL_CLIENT); } else { clif->specialeffect(&sd->bl, 540, ALL_CLIENT); } }return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); atcommand = GET_SYMBOL("atcommand"); script = GET_SYMBOL("script"); skill = GET_SYMBOL("skill"); addAtcommand("dance",dance);}
Try it..

 
Last edited by a moderator:
dance.c:23: warning: implicit declaration of function 'rand'

using uptodate hercules and dastgir updated src.
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "../common/HPMi.h"#include "../map/clif.h"#include "../map/atcommand.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h"HPExport struct hplugin_info pinfo ={ "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1b", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(dance){int msg;msg = rand()%9;switch(msg){ case 0: case 1: case 3: case 5: case 7: case 9: clif->specialeffect(&sd->bl, 400, ALL_CLIENT); if (msg==0 || msg==1) {clif->specialeffect(&sd->bl, 413, ALL_CLIENT);} else if(msg==3){clif->specialeffect(&sd->bl, 415, ALL_CLIENT);} else if(msg==5){clif->specialeffect(&sd->bl, 458, ALL_CLIENT);} else if(msg==7){clif->specialeffect(&sd->bl, 501, ALL_CLIENT);} else{clif->specialeffect(&sd->bl, 550, ALL_CLIENT);} break; case 2: case 4: case 6: case 8: clif->specialeffect(&sd->bl, 300, ALL_CLIENT); if (msg==2){clif->specialeffect(&sd->bl, 414, ALL_CLIENT);} else if (msg==4){ clif->specialeffect(&sd->bl, 426, ALL_CLIENT); } else if (msg==6){ clif->specialeffect(&sd->bl, 466, ALL_CLIENT); } else { clif->specialeffect(&sd->bl, 540, ALL_CLIENT); } }return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); atcommand = GET_SYMBOL("atcommand"); script = GET_SYMBOL("script"); skill = GET_SYMBOL("skill"); addAtcommand("dance",dance);}
Try it..
working.

Thank you very much!

 
ALL_CLIENT may cause the client crash when user will spamming it.

 
Last edited by a moderator:
Back
Top