Skip to content
Permalink
Browse files
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>
  • Loading branch information
euphyy committed Jan 11, 2014
1 parent fa25c01 commit a3dbbe21ceb3b9fe63bf7959f088110340837e60
Showing with 24 additions and 1 deletion.
  1. +10 −1 doc/script_commands.txt
  2. +14 −0 src/map/script.c
@@ -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.
@@ -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"),

1 comment on commit a3dbbe2

@Nevercome
Copy link

@Nevercome Nevercome commented on a3dbbe2 Jan 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like it :DDD THK !

Please sign in to comment.