Added script command 'isbeginquest'.

Aegis has been using this command instead of 'checkquest(id,HASQUEST)' for years, so we will no longer be writing workarounds for it.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
This commit is contained in:
Euphy 2014-01-11 09:45:32 -05:00
parent fa25c01dd8
commit a3dbbe21ce
2 changed files with 24 additions and 1 deletions

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= rAthena Dev Team
//===== Last Updated: ========================================
//= 20131118
//= 20140111
//===== Description: =========================================
//= A reference manual for the rAthena scripting language.
//= Commands are sorted depending on their functionality.
@ -7532,6 +7532,15 @@ If parameter "HUNTING" is supplied:
---------------------------------------
*isbegin_quest(<ID>)
Return the state of the quest:
0 = Quest not started (not in quest log)
1 = Quest has been given (state is either "inactive" or "active")
2 = Quest completed
---------------------------------------
*showevent <state>, <color>;
Show a colored mark in the mini-map like "viewpoint" and an emotion on top of a NPC.

View File

@ -16373,6 +16373,19 @@ BUILDIN_FUNC(checkquest)
return SCRIPT_CMD_SUCCESS;
}
BUILDIN_FUNC(isbegin_quest)
{
struct map_session_data *sd = script_rid2sd(st);
int i;
nullpo_ret(sd);
i = quest_check(sd, script_getnum(st, 2), (quest_check_type) HAVEQUEST);
script_pushint(st, i + (i < 1));
return SCRIPT_CMD_SUCCESS;
}
BUILDIN_FUNC(showevent)
{
TBL_PC *sd = script_rid2sd(st);
@ -18759,6 +18772,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(erasequest, "i"),
BUILDIN_DEF(completequest, "i"),
BUILDIN_DEF(checkquest, "i?"),
BUILDIN_DEF(isbegin_quest,"i"),
BUILDIN_DEF(changequest, "ii"),
BUILDIN_DEF(showevent, "ii"),