summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme G. Menaldo <guilherme.menaldo@outlook.com>2018-06-10 12:27:10 -0300
committerGuilherme G. Menaldo <guilherme.menaldo@outlook.com>2018-06-10 12:27:10 -0300
commita69f1ef5d09b66abdc8e9fe20c197414175b6b27 (patch)
tree0d2303dbc780eb6b468b86d3b29aa712278b8735
parentfb16806ce0588414c5b808df535b72ef9e7ff6ba (diff)
downloadhercules-a69f1ef5d09b66abdc8e9fe20c197414175b6b27.tar.gz
hercules-a69f1ef5d09b66abdc8e9fe20c197414175b6b27.tar.bz2
hercules-a69f1ef5d09b66abdc8e9fe20c197414175b6b27.tar.xz
hercules-a69f1ef5d09b66abdc8e9fe20c197414175b6b27.zip
Fixed rodex_sendmail_acc script command and rodex examples
-rw-r--r--doc/sample/npc_rodex.txt4
-rw-r--r--src/map/script.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/sample/npc_rodex.txt b/doc/sample/npc_rodex.txt
index a808a1aa9..0975e609c 100644
--- a/doc/sample/npc_rodex.txt
+++ b/doc/sample/npc_rodex.txt
@@ -20,12 +20,12 @@ prontera,150,150,4 script Rodex Mail 1_M_01,{
// Sends a messsage to attached player "Account Box" from "Rodex Test", with title "Rodex Test3",
// with message "Hello World, How are You?", 1000 Zenies and 5 Red Potions attached
rodex_sendmail_acc(
- getcharid(CHAR_ID_CHAR), "Rodex Test", "Rodex Test3", "Hello World, How are You?",
+ getcharid(CHAR_ID_ACCOUNT), "Rodex Test", "Rodex Test3", "Hello World, How are You?",
1000,
Red_Potion, 5
);
- // Sends a messsage to attached player "Account Box" from "Rodex Test", with title "Rodex Test6",
+ // Sends a messsage to attached player from "Rodex Test", with title "Rodex Test6",
// with message "Hello World, How are You?", 1000 Zenies, 5 Red Potions and
// 1 +10 Knife[3] with 3 Poring Cards (Broken)
rodex_sendmail2(
diff --git a/src/map/script.c b/src/map/script.c
index d9350081a..ad73a4f1f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -23858,7 +23858,7 @@ bool rodex_sendmail_sub(struct script_state* st, struct rodex_message *msg)
{
const char *sender_name, *title, *body;
- if (!strcmp(script->getfuncname(st), "rodex_sendmail_acc2"))
+ if (strcmp(script->getfuncname(st), "rodex_sendmail_acc") == 0 || strcmp(script->getfuncname(st), "rodex_sendmail_acc2") == 0)
msg->receiver_accountid = script_getnum(st, 2);
else
msg->receiver_id = script_getnum(st, 2);