summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/map/help.txt2
-rw-r--r--conf/messages.conf5
-rw-r--r--doc/atcommands.txt6
-rw-r--r--doc/script_commands.txt10
-rw-r--r--src/map/atcommand.c10
-rw-r--r--src/map/script.c34
6 files changed, 66 insertions, 1 deletions
diff --git a/conf/map/help.txt b/conf/map/help.txt
index 846c16276..17dd829fd 100644
--- a/conf/map/help.txt
+++ b/conf/map/help.txt
@@ -305,3 +305,5 @@ autoloottype: "Manage a list of autolooting item types.\n"
" To remove an item type, use \"@autoloottype -<type name>\".\n"
" Type List: healing, usable, etc, weapon, armor, card, petegg, petarmor, ammo.\n"
" \"@autoloottype reset\" will clear your autoloottype list."
+feelreset: "Reset 'Feeling' maps."
+hatereset: "Reset 'Hatred' targets."
diff --git a/conf/messages.conf b/conf/messages.conf
index 42214167a..b91b03921 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -763,7 +763,10 @@
926: Zone not found. Keep in mind that the names are CaSe SenSitiVe.
927: Zone successfully changed from '%s' to '%s'.
-//928-979 FREE
+//928-978 FREE
+
+// @hatereset
+979: Reset 'Hatred' targets.
// @kami
980: Please enter a message (usage: @kami <message>).
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index 0b4dce579..419cb0acd 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -892,6 +892,12 @@ Resets a Star Gladiator's marked maps.
---------------------------------------
+@hatereset
+
+Resets a Star Gladiator's hatred targets.
+
+---------------------------------------
+
@jobchange <job name/ID>
Changes your job.
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index b55afb0f2..36702b6f1 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -6081,6 +6081,16 @@ Used in reset NPC's (duh!).
---------------------------------------
+*resetfeel({<account id>})
+*resethate({<account id>})
+
+The first resets a character's 'Feeling' maps.
+The second resets a character's 'Hatred' targets.
+
+If no RID is given, will run with the current attached player.
+
+---------------------------------------
+
*sc_start(<effect type>, <ticks>, <value 1>{, <rate>, <flag>{, <GID>}})
*sc_start2(<effect type>, <ticks>, <value 1>, <value 2>{, <rate>, <flag>{, <GID>}})
*sc_start4(<effect type>, <ticks>, <value 1>, <value 2>, <value 3>, <value 4>{, <rate>, <flag>{, <GID>}})
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3684c1d9f..b82224206 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8300,6 +8300,15 @@ ACMD(feelreset)
return true;
}
+// Reset hatred targets [Wolfie]
+ACMD(hatereset)
+{
+ pc->resethate(sd);
+ clif->message(fd, msg_fd(fd, 979)); // Reset 'Hatred' targets.
+
+ return true;
+}
+
/*==========================================
* AUCTION SYSTEM
*------------------------------------------*/
@@ -10201,6 +10210,7 @@ static void atcommand_basecommands(void)
ACMD_DEF(homshuffle),
ACMD_DEF(showmobs),
ACMD_DEF(feelreset),
+ ACMD_DEF(hatereset),
ACMD_DEF(auction),
ACMD_DEF(mail),
ACMD_DEF2("noks", ksprotection),
diff --git a/src/map/script.c b/src/map/script.c
index 396d084a3..ffccd3b59 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -25968,6 +25968,38 @@ static BUILDIN(openlapineddukddakboxui)
return true;
}
+// Reset 'Feeling' maps.
+BUILDIN(resetfeel)
+{
+ struct map_session_data *sd;
+
+ if (script_hasdata(st, 2))
+ sd = script->id2sd(st, script_getnum(st, 2));
+ else
+ sd = script->rid2sd(st);
+
+ if (sd != NULL)
+ pc->resetfeel(sd);
+
+ return true;
+}
+
+// Reset hatred target marks.
+BUILDIN(resethate)
+{
+ struct map_session_data *sd;
+
+ if (script_hasdata(st, 2))
+ sd = script->id2sd(st, script_getnum(st, 2));
+ else
+ sd = script->rid2sd(st);
+
+ if (sd != NULL)
+ pc->resethate(sd);
+
+ return true;
+}
+
/**
* Adds a built-in script function.
*
@@ -26349,6 +26381,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(resetlvl,"i"),
BUILDIN_DEF(resetstatus,""),
BUILDIN_DEF(resetskill,""),
+ BUILDIN_DEF(resetfeel, "?"),
+ BUILDIN_DEF(resethate, "?"),
BUILDIN_DEF(skillpointcount,""),
BUILDIN_DEF(changebase,"i?"),
BUILDIN_DEF(changesex,""),