summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt1
-rw-r--r--conf-tmpl/atcommand_athena.conf5
-rw-r--r--conf-tmpl/help.txt4
-rw-r--r--src/map/atcommand.c98
-rw-r--r--src/map/atcommand.h3
5 files changed, 111 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 0b0f8f9e3..a017711dc 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
12/8
+ * Added @marry, @divorce, and @rings [MouseJstr]
* fixed @revive [MouseJstr]
* Added option to turn off login server logging [celest]
* Moved char server starting logging to after we've read the configuration
diff --git a/conf-tmpl/atcommand_athena.conf b/conf-tmpl/atcommand_athena.conf
index f215d2db2..6cc60da24 100644
--- a/conf-tmpl/atcommand_athena.conf
+++ b/conf-tmpl/atcommand_athena.conf
@@ -287,6 +287,11 @@ useskill: 40
// What skills are required to get this skill
skilltree: 40
+// Marriage skills
+marry: 40
+divorce: 40
+rings: 40
+
// make another player killable
charkillable: 40
diff --git a/conf-tmpl/help.txt b/conf-tmpl/help.txt
index fa8de1f69..62c5f5b22 100644
--- a/conf-tmpl/help.txt
+++ b/conf-tmpl/help.txt
@@ -101,6 +101,10 @@
40: Archer 146 = Auto Berserk 151 = Take Stone 155 = Crazy Uproar/Loud Voice
40: 147 = Arrow Creation Acolyte 152 = Stone Throw Magician
40: 148 = Charge Arrows 156 = Holy Light 157 = Energy Coat
+ 40: @skilltree <
+ 40: @marry <player1> <player2> - marry two players
+ 40: @divorce <player> - divorces the two players
+ 40: @rings - gives you the two wedding rings
60: @addwarp <map name> <x coord> <y coord>
40:
40:--- MONSTERS CMD ---
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 5b4eafb6a..ddd1d60c4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -229,6 +229,10 @@ ATCOMMAND_FUNC(refreshonline); // [Valaris]
ATCOMMAND_FUNC(skilltree); // by MouseJstr
+ATCOMMAND_FUNC(marry); // by MouseJstr
+ATCOMMAND_FUNC(divorce); // by MouseJstr
+ATCOMMAND_FUNC(rings); // by MouseJstr
+
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
*------------------------------------------
@@ -475,6 +479,9 @@ static AtCommandInfo atcommand_info[] = {
#endif /* TXT_ONLY */
{ AtCommand_SkillTree, "@skilltree", 40, atcommand_skilltree }, // [MouseJstr]
+ { AtCommand_Marry, "@marry", 40, atcommand_marry }, // [MouseJstr]
+ { AtCommand_Divorce, "@divorce", 40, atcommand_divorce }, // [MouseJstr]
+ { AtCommand_Rings, "@rings", 40, atcommand_rings }, // [MouseJstr]
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
@@ -7399,6 +7406,97 @@ atcommand_skilltree(const int fd, struct map_session_data* sd,
}
/*==========================================
+ * @marry by [MouseJstr]
+ *
+ * Marry two players
+ *------------------------------------------
+ */
+int
+atcommand_marry(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd1 = NULL;
+ struct map_session_data *pl_sd2 = NULL;
+ char player1[255], player2[255];
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if (sscanf(message, "%[^,],%[^\r\n]", player1, player2) != 2) {
+ clif_displaymessage(fd, "usage: @marry <player1> <player2>.");
+ return -1;
+ }
+
+ if((pl_sd1=map_nick2sd((char *) player1)) == NULL) {
+ sprintf(player2, "Cannot find player %s online", player1);
+ clif_displaymessage(fd, player2);
+ return -1;
+ }
+
+ if((pl_sd2=map_nick2sd((char *) player2)) == NULL) {
+ sprintf(player1, "Cannot find player %s online", player2);
+ clif_displaymessage(fd, player1);
+ return -1;
+ }
+
+ return pc_marriage(pl_sd1, pl_sd2);
+}
+
+/*==========================================
+ * @divorce by [MouseJstr]
+ *
+ * divorce two players
+ *------------------------------------------
+ */
+int
+atcommand_divorce(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct map_session_data *pl_sd = NULL;
+
+ nullpo_retr(-1, sd);
+
+ if (!message || !*message)
+ return -1;
+
+ if((pl_sd=map_nick2sd((char *) message)) != NULL)
+ return pc_divorce(pl_sd);
+
+ return 0;
+}
+
+/*==========================================
+ * @rings by [MouseJstr]
+ *
+ * Give two players rings
+ *------------------------------------------
+ */
+int
+atcommand_rings(const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ struct item item_tmp;
+ int get_count, flag;
+
+ memset(&item_tmp, 0, sizeof(item_tmp));
+
+ item_tmp.nameid = 2634;
+ item_tmp.identify = 1;
+
+ if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, 1)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+
+ item_tmp.nameid = 2635;
+ item_tmp.identify = 1;
+ if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, get_count)))
+ clif_additem((struct map_session_data*)sd, 0, 0, flag);
+
+ return 0;
+}
+
+/*==========================================
* It is made to rain.
*------------------------------------------
*/
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index d4af0eae0..ce8fc2359 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -212,6 +212,9 @@ enum AtCommandType {
// SQL-only commands end
#endif
AtCommand_SkillTree, // by MouseJstr
+ AtCommand_Marry, // by MouseJstr
+ AtCommand_Divorce, // by MouseJstr
+ AtCommand_Rings, // by MouseJstr
// end
AtCommand_Unknown,