diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 3ac3a26be9..3bd2f16138 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -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() + +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 , ; Show a colored mark in the mini-map like "viewpoint" and an emotion on top of a NPC. diff --git a/src/map/script.c b/src/map/script.c index ba04fcff8f..e343bf3754 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -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"),