So here is the plugin which has been requested here.
Thank you for requesting it, i was just thinking about stuff i can implement
The problem with this is, that the "next" buttons are still in the bottom of the window of that npc and they are not going to disappear, because the next is made by the server and not by the user. Just like XKore from openkore ^^
Anyways, here is the script for anyone who wants to use it.
#include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"HPExport struct hplugin_info pinfo = { "autonext", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "1.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};BUILDIN(autonext) { TBL_PC* sd; int timeout; sd = script->rid2sd(st); if( sd == NULL ) return true;#ifdef SECURE_NPCTIMEOUT sd->npc_idle_type = NPCT_WAIT;#endif timeout=script_getnum(st,2); if(st->sleep.tick == 0) { st->state = RERUNLINE; st->sleep.tick = timeout; } else {// sleep time is over st->state = RUN; st->sleep.tick = 0; } clif->scriptnext(sd, st->oid); return true;}/* Server Startup */HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); script = GET_SYMBOL("script"); if( HPMi->addScript != NULL ) { HPMi->addScript("autonext","i",BUILDIN_A(autonext)); }}
The Script command is used like this:
autonext 1000;
This means, the script is waiting for 1000 milliseconds and then it's using next!
If the user is pressing "next" on it's own, it is just ignored! Don't forget that!
If you encounter any bugs, just ping me!
~Shikazu
Thank you for requesting it, i was just thinking about stuff i can implement
The problem with this is, that the "next" buttons are still in the bottom of the window of that npc and they are not going to disappear, because the next is made by the server and not by the user. Just like XKore from openkore ^^
Anyways, here is the script for anyone who wants to use it.
#include <stdio.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"HPExport struct hplugin_info pinfo = { "autonext", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "1.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};BUILDIN(autonext) { TBL_PC* sd; int timeout; sd = script->rid2sd(st); if( sd == NULL ) return true;#ifdef SECURE_NPCTIMEOUT sd->npc_idle_type = NPCT_WAIT;#endif timeout=script_getnum(st,2); if(st->sleep.tick == 0) { st->state = RERUNLINE; st->sleep.tick = timeout; } else {// sleep time is over st->state = RUN; st->sleep.tick = 0; } clif->scriptnext(sd, st->oid); return true;}/* Server Startup */HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); script = GET_SYMBOL("script"); if( HPMi->addScript != NULL ) { HPMi->addScript("autonext","i",BUILDIN_A(autonext)); }}
The Script command is used like this:
autonext 1000;
This means, the script is waiting for 1000 milliseconds and then it's using next!
If the user is pressing "next" on it's own, it is just ignored! Don't forget that!
If you encounter any bugs, just ping me!
~Shikazu
Last edited by a moderator: