From 64ae7b6bc0cd76457aad32f327b816ee6d4bf7a4 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Thu, 14 Feb 2008 20:54:25 +0000 Subject: - Some optimizations to @noks (now using a Status Change timer). - Added support to Self|Party|Guild options. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12205 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 956d32040..0faa040ef 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8140,9 +8140,24 @@ int atcommand_ksprotection(const int fd, struct map_session_data *sd, const char if( sd->state.noks ) { sd->state.noks = 0; sprintf(atcmd_output, "[ K.S Protection Inactive ]"); - } else { - sprintf(atcmd_output, "[ K.S Protection Active ]"); - sd->state.noks = 1; + } + else + { + if( !message || !*message || !strcmpi(message, "party") ) + { // Default is Party + sd->state.noks = 2; + sprintf(atcmd_output, "[ K.S Protection Active - Option: Party ]"); + } + else if( !strcmpi(message, "self") ) + { + sd->state.noks = 1; + sprintf(atcmd_output, "[ K.S Protection Active - Option: Self ]"); + } + else if( !strcmpi(message, "guild") ) + { + sd->state.noks = 3; + sprintf(atcmd_output, "[ K.S Protection Active - Option: Guild ]"); + } } clif_displaymessage(fd, atcmd_output); -- cgit v1.2.3-60-g2f50