Kuroe 5 Posted March 16, 2019 Hello, I would like to request a plugin that delays the use of @die when being attacked / attacking. thank you in advance Quote Share this post Link to post Share on other sites
1 AnnieRuru 957 Posted March 17, 2019 almost similar to this #include "common/hercules.h" #include "map/pc.h" #include "map/atcommand.h" #include "common/timer.h" #include "common/memmgr.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "die_delay", SERVER_TYPE_MAP, "x_O", HPM_VERSION, }; ACMD(kill) { if ( DIFF_TICK( timer->gettick(), sd->canlog_tick ) < battle->bc->prevent_logout ) { char msg[CHAT_SIZE_MAX]; safesnprintf( msg, CHAT_SIZE_MAX, "There is a %d seconds delay of using this command to kill the character again", battle->bc->prevent_logout /1000 ); clif->message( fd, msg ); return false; } status_kill( &sd->bl ); clif->message( sd->fd, msg_fd( fd, 13 )); // A pity! You've died. if ( fd != sd->fd ) clif->message( fd, msg_fd( fd, 14 )); // Character killed. return true; } HPExport void plugin_init (void) { addAtcommand( "kill", kill ); } this assume your prevent_logout in your battle_config has default setting // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3) // Official servers prevent players from logging out after attacking, casting skills, and taking damage. // 0 = Players can always logout // 1 = Prevent logout on login // 2 = Prevent logout after attacking // 4 = Prevent logout after casting skill // 8 = Prevent logout after being hit prevent_logout_trigger: 14 prevent_logout_trigger have to at least has 2+8 2 MikZ and Kuroe reacted to this Quote Share this post Link to post Share on other sites
0 Kuroe 5 Posted March 17, 2019 40 minutes ago, AnnieRuru said: almost similar to this #include "common/hercules.h" #include "map/pc.h" #include "map/atcommand.h" #include "common/timer.h" #include "common/memmgr.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "die_delay", SERVER_TYPE_MAP, "x_O", HPM_VERSION, }; ACMD(kill) { if ( DIFF_TICK( timer->gettick(), sd->canlog_tick ) < battle->bc->prevent_logout ) { char msg[CHAT_SIZE_MAX]; safesnprintf( msg, CHAT_SIZE_MAX, "There is a %d seconds delay of using this command to kill the character again", battle->bc->prevent_logout /1000 ); clif->message( fd, msg ); return false; } status_kill( &sd->bl ); clif->message( sd->fd, msg_fd( fd, 13 )); // A pity! You've died. if ( fd != sd->fd ) clif->message( fd, msg_fd( fd, 14 )); // Character killed. return true; } HPExport void plugin_init (void) { addAtcommand( "kill", kill ); } this assume your prevent_logout in your battle_config has default setting // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3) // Official servers prevent players from logging out after attacking, casting skills, and taking damage. // 0 = Players can always logout // 1 = Prevent logout on login // 2 = Prevent logout after attacking // 4 = Prevent logout after casting skill // 8 = Prevent logout after being hit prevent_logout_trigger: 14 prevent_logout_trigger have to at least has 2+8 Thank you Quote Share this post Link to post Share on other sites
Hello, I would like to request a plugin that delays the use of @die when being attacked / attacking.
thank you in advance
Share this post
Link to post
Share on other sites