summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-10 04:04:36 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-10 04:04:36 +0000
commit14d2e0e61a8d2ca85f15eb0c8eb6238564edb375 (patch)
tree44b8aacfec5239f554fa2bfe4c2246e41778dc23 /src/map/atcommand.c
parentecbca44f124c5e379c9a1ef5433c2c3c0ed07c4f (diff)
downloadhercules-14d2e0e61a8d2ca85f15eb0c8eb6238564edb375.tar.gz
hercules-14d2e0e61a8d2ca85f15eb0c8eb6238564edb375.tar.bz2
hercules-14d2e0e61a8d2ca85f15eb0c8eb6238564edb375.tar.xz
hercules-14d2e0e61a8d2ca85f15eb0c8eb6238564edb375.zip
- Rewrote/cleaned up trade.c for a more clean trading implementation.
- Added @request commands, sends a request to all connected GMs of lowest_gm_level or above as a whisper message. Defaults to gm level 20 users. - Made SC_COMBO status start delay attackabletime and walkdelay by sc's duration regardless of skill used (previously it was only for TK kicks, now it's for both those and Monk combos) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6542 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 1e6f76516..0fd9a0d7f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -295,6 +295,7 @@ ACMD_FUNC(clone); // [Valaris]
ACMD_FUNC(tonpc); // LuzZza
ACMD_FUNC(commands); // [Skotlex]
ACMD_FUNC(noask); //LuzZza
+ACMD_FUNC(request); //LuzZza
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
@@ -611,6 +612,7 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_ToNPC, "@tonpc", 40, atcommand_tonpc }, // LuzZza
{ AtCommand_Commands, "@commands", 1, atcommand_commands }, // [Skotlex]
{ AtCommand_NoAsk, "@noask", 1, atcommand_noask }, // [LuzZza]
+ { AtCommand_Request, "@request", 20, atcommand_request }, // [LuzZza]
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
@@ -10273,6 +10275,27 @@ int atcommand_noask(
return 0;
}
+/*=====================================
+ * Send a @request message to all GMs of lowest_gm_level.
+ * Usage: @request <petition>
+ *-------------------------------------
+ */
+int atcommand_request(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,msg_txt(275));
+ return -1;
+ }
+
+ sprintf(atcmd_output, msg_txt(276), message);
+ intif_wis_message_to_gm(sd->status.name, lowest_gm_level, atcmd_output);
+ clif_disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
+ clif_displaymessage(sd->fd,msg_txt(277));
+ return 0;
+}
+
void do_init_atcommand() {
users_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
duel_count = 0;