From 620c55e87019a46ffffc6ffb69bea77df088b904 Mon Sep 17 00:00:00 2001 From: Asheraf Date: Mon, 25 Jun 2018 06:08:51 +0100 Subject: Convert questinfo data into a vector --- src/map/map.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index d6779ca91..b8956d72c 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -922,8 +922,7 @@ struct map_data { } cell_buf; /* ShowEvent Data Cache */ - struct questinfo *qi_data; - unsigned short qi_count; + VECTOR_DECL(struct questinfo) qi_data; /* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */ unsigned short hpmeter_visible; -- cgit v1.2.3-70-g09d2 From 7c43dd908622e083b0fecf7fc8ebab61501186fa Mon Sep 17 00:00:00 2001 From: Asheraf Date: Mon, 25 Jun 2018 21:00:42 +0100 Subject: Questinfo System overhaul --- doc/script_commands.txt | 29 +++-- src/common/mmo.h | 14 +++ src/map/clif.c | 11 +- src/map/homunculus.c | 5 +- src/map/instance.c | 3 +- src/map/map.c | 12 +- src/map/map.h | 19 +++- src/map/pc.c | 5 + src/map/quest.c | 291 +++++++++++++++++++++++++++++++++++++++++++++++- src/map/quest.h | 14 +++ src/map/script.c | 208 ++++++++++++++++++++++++++-------- 11 files changed, 532 insertions(+), 79 deletions(-) (limited to 'src/map/map.h') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2653f052a..44937a34d 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9337,12 +9337,10 @@ that fails, the command returns an empty string instead. //===================================== --------------------------------------- -*questinfo(, {, {, }}) - -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. +*questinfo( {, }) +This is esentially a showevent() that supports different conditions that can be set using setquestinfo(). +Use this only in an OnInit label. For Icon, use one of the following: No Icon : QTYPE_NONE @@ -9373,8 +9371,6 @@ the available color values are: When a user shows up on a map, each NPC is checked for questinfo that has been set. If questinfo is present, it will check if the quest has been started, if it has not, the bubble will appear. -Optionally, you can also specify a Job Class if the quest bubble should only appear for a certain class. - Example izlude,100,100,4 script Test 844,{ mes("[Test]"); @@ -9382,12 +9378,29 @@ Example close(); OnInit: - questinfo(1001, QTYPE_QUEST, 0, Job_Novice); + questinfo(QTYPE_QUEST); end; } --------------------------------------- +*setquestinfo( {, }) + +Use this command ONLY after a questinfo() +it allows you to set multiple required conditions for the quest bubble to show up. + +supported types: values + QINFO_JOB: job_id + QINFO_SEX: sex + QINFO_BASE_LEVEL: min, max + QINFO_JOB_LEVEL: min, max + QINFO_ITEM: item_id, amount // append to the items list on each use + QINFO_HOMUN_LEVEL: min + QINFO_HOMUN_TYPE: homunculus_type (0 - regular, 1 - evolved, 2 - S) + QINFO_QUEST: quest_id, state // append to the quests list on each use + +--------------------------------------- + *setquest({,