#include "common/hercules.h" #include #include #include #include "map/pc.h" #include "map/clif.h" #include "map/atcommand.h" #include "common/timer.h" #include "common/nullpo.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "samuel", SERVER_TYPE_MAP, "^.^", HPM_VERSION, }; int timer_id = INVALID_TIMER; int countdown( int tid, int64 tick, int id, intptr data ) { TBL_PC *sd; sd = map->id2sd(id); if ( sd ) { clif->specialeffect( &sd->bl, 49, SELF ); clif->message( sd->fd, "BOOM !! just kidding." ); } return false; } ACMD(test) { timer_id = timer->add( timer->gettick() + 5000, countdown, sd->bl.id, 0 ); clif->message( sd->fd, "After 5 seconds, you'll die ..." ); return true; } HPExport void plugin_init (void) { addAtcommand( "test", test ); }