diff options
author | Haru <haru@dotalux.com> | 2014-12-02 11:04:01 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-12-02 11:04:01 +0100 |
commit | 274aaebe2bad43a8196e3ff39ede344da8ce4d64 (patch) | |
tree | a373b85af062d8a83c5e195574755d21cd271e01 | |
parent | 14700f7e00e5593279599907f6cdf11fde1b67cd (diff) | |
download | hercules-274aaebe2bad43a8196e3ff39ede344da8ce4d64.tar.gz hercules-274aaebe2bad43a8196e3ff39ede344da8ce4d64.tar.bz2 hercules-274aaebe2bad43a8196e3ff39ede344da8ce4d64.tar.xz hercules-274aaebe2bad43a8196e3ff39ede344da8ce4d64.zip |
Removed checkquest command
- Follow-up to 3ad4a9d
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | doc/sample/npc_test_quest.txt | 8 | ||||
-rw-r--r-- | doc/script_commands.txt | 35 | ||||
-rw-r--r-- | src/map/script.c | 18 |
3 files changed, 5 insertions, 56 deletions
diff --git a/doc/sample/npc_test_quest.txt b/doc/sample/npc_test_quest.txt index fcf6b2a80..90659aa10 100644 --- a/doc/sample/npc_test_quest.txt +++ b/doc/sample/npc_test_quest.txt @@ -13,7 +13,7 @@ // 70000,0,1002,3,0,0,0,0,"3 Splats Please!" prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{ - if(checkquest(70000) == -1) { + if (!questprogress(70000)) { // Quest not yet started. mes "[Jelly]"; mes "Hey there! Would you help me?"; @@ -30,7 +30,7 @@ prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{ setquest 70000; // Adds the quest to your Quest Window. close; } - } else if(checkquest(70000,HUNTING) == 2) { + } else if (questprogress(70000,HUNTING) == 2) { // All monsters killed. mes "[Jelly]"; mes "Awesome! Thank you!"; @@ -38,12 +38,12 @@ prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{ dispbottom "You have been rewarded with 10,000 Base Exp."; completequest 70000; // Sets quest status to "complete". close; - } else if(checkquest(70000) == 1) { + } else if (questprogress(70000) == 1) { // Quest is active. mes "[Jelly]"; mes "Keep going, almost there!"; close; - } else if(checkquest(70000) == 2) { + } else if (questprogress(70000) == 2) { // Quest finished. mes "[Jelly]"; mes "Thanks again for doing that for me!"; diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 8a9629991..33e706004 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -8382,7 +8382,7 @@ that fails, the command returns an empty string instead. *questinfo <Quest ID>, <Icon> {, <Map Mark Color>{, <Job Class>}}; -This is esentially a combination of checkquest and showevent. Use this only +This is esentially a combination of questprogress and showevent. Use this only in an OnInit label. For the Quest ID, specify the quest ID that you want checked if it has been started yet. @@ -8458,39 +8458,6 @@ Add quest of the <ID2> to the the quest log, and the state is "active". --------------------------------------- -*checkquest(<ID>{,PLAYTIME|HUNTING}) - - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - @ /!\ This command is deprecated @ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -This command is deprecated and it should not be used in new scripts, as it -is scheduled to be removed on or after November 28th, 2014. Please consider -using questprogress() instead. Or, in special cases, questactive(). - -If no additional argument supplied, return the state of the quest: - -1 = Quest not started (not in quest log) - 0 = Quest has been given, but the state is "inactive" - 1 = Quest has been given, and the state is "active" - 2 = Quest completed - -If parameter "PLAYTIME" is supplied: - -1 = Quest not started (not in quest log) - 0 = the time limit has not yet been reached - 1 = the time limit has not been reached but the quest is marked as - complete - 2 = the time limit has been reached - -If parameter "HUNTING" is supplied: - -1 = Quest not started (not in quest log) - 0 = you haven't killed all of the target monsters and the time limit - has not been reached. - 1 = you haven't killed all of the target monsters but the time limit - has been reached. - 2 = you've killed all of the target monsters - ---------------------------------------- - *questprogress(<ID>{,PLAYTIME|HUNTING}) If no additional argument supplied, return the state of the quest: diff --git a/src/map/script.c b/src/map/script.c index 93c9865e5..6037c61fa 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16430,23 +16430,6 @@ BUILDIN(changequest) { return true; } -// Deprecated -// Please use questprogress instead. -BUILDIN(checkquest) { - struct map_session_data *sd = script->rid2sd(st); - enum quest_check_type type = HAVEQUEST; - - if( sd == NULL ) - return false; - - if( script_hasdata(st, 3) ) - type = (enum quest_check_type)script_getnum(st, 3); - - script_pushint(st, quest->check(sd, script_getnum(st, 2), type)); - - return true; -} - BUILDIN(questactive) { struct map_session_data *sd = script->rid2sd(st); int quest_progress = 0; @@ -19433,7 +19416,6 @@ void script_parse_builtin(void) { BUILDIN_DEF(setquest, "i"), BUILDIN_DEF(erasequest, "i?"), BUILDIN_DEF(completequest, "i?"), - BUILDIN_DEF_DEPRECATED(checkquest, "i?"), // Deprecated 2014-10-28 [Haru] BUILDIN_DEF(questprogress, "i?"), BUILDIN_DEF(questactive, "i"), BUILDIN_DEF(changequest, "ii"), |