diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-05-01 21:42:14 +0800 |
---|---|---|
committer | Emistry Haoyan <equinox1991@gmail.com> | 2019-05-14 23:28:23 +0800 |
commit | b4435701a2142f43348156535d6c8c314e99899e (patch) | |
tree | fe040b5c35aa5afa2a2a29ec730e5bdb73c008a2 /src | |
parent | f272422f2dbd015691ecba06a14a18d48e7362da (diff) | |
download | hercules-b4435701a2142f43348156535d6c8c314e99899e.tar.gz hercules-b4435701a2142f43348156535d6c8c314e99899e.tar.bz2 hercules-b4435701a2142f43348156535d6c8c314e99899e.tar.xz hercules-b4435701a2142f43348156535d6c8c314e99899e.zip |
Added *mesclear script command.
- `*mesclear()` script command will clear the NPC dialog text and continue
the script without player interaction. example: `next();`.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index a11bc0c75..9c6c943d8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5961,6 +5961,19 @@ static BUILDIN(next) return true; } +/// Clears the NPC dialog and continues the script without press next button. +/// +/// mesclear(); +static BUILDIN(mesclear) +{ + struct map_session_data *sd = script->rid2sd(st); + + if (sd != NULL) + clif->scriptclear(sd, st->oid); + + return true; +} + /// Ends the script and displays the button 'close' on the npc dialog. /// The dialog is closed when the button is pressed. /// @@ -25369,6 +25382,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(mes, "?"), BUILDIN_DEF(mesf, "s*"), BUILDIN_DEF(next,""), + BUILDIN_DEF(mesclear,""), BUILDIN_DEF(close,""), BUILDIN_DEF(close2,""), BUILDIN_DEF(menu,"sl*"), |