//===== Hercules Plugin ====================================== //= Roulette Test //============================================================ #include "common/hercules.h" #include #include #include #include #include "common/HPMi.h" #include "common/utils.h" #include "common/socket.h" #include "common/memmgr.h" #include "common/timer.h" #include "common/ers.h" #include "common/nullpo.h" #include "common/strlib.h" #include "map/clif.h" #include "map/npc.h" #include "map/script.h" #include "map/pc.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */ HPExport struct hplugin_info pinfo = { "Roulette Test", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; void clif_parse_RouletteOpen_pre(int *fd, struct map_session_data** sd ){ nullpo_retv(sd); if((*sd)->st && (*sd)->st->state == END){ struct npc_data* nd = npc->name2id("TestNPC"); script->run_npc(nd->u.scr.script, 0, *sd->bl.id, nd->bl.id); } hookStop(); } /* run when server starts */ HPExport void plugin_init (void){ addHookPre(clif, pRouletteOpen, clif_parse_RouletteOpen_pre); }