summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2010-12-28 21:30:13 +0100
committerStefan Beller <stefanbeller@googlemail.com>2011-01-02 21:21:18 +0100
commitc26b3a95f257260a2147537f79b3ffdc342d5138 (patch)
tree991a12fbd13f7c5c1932204bc055f56265213566
parent3de6ef52cf7ba3bcfe8c908e38a69f4463bfc190 (diff)
downloadserverdata-c26b3a95f257260a2147537f79b3ffdc342d5138.tar.gz
serverdata-c26b3a95f257260a2147537f79b3ffdc342d5138.tar.bz2
serverdata-c26b3a95f257260a2147537f79b3ffdc342d5138.tar.xz
serverdata-c26b3a95f257260a2147537f79b3ffdc342d5138.zip
luca can focus and unfocus now
-rw-r--r--db/const.txt2
-rw-r--r--npc/001-1_Tulimshar/luca.txt80
2 files changed, 79 insertions, 3 deletions
diff --git a/db/const.txt b/db/const.txt
index ab080511..981031ed 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -247,6 +247,8 @@ MFLAG_KNOWS_OLD_WIZARD 8192 // Knows Bjorn's old wizard
MFLAG_MADE_CONC_POTION 16384 // Made a concentration potion with T15 and/or T16
MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement
+MFLAG_KNOWS_UNFOCUS_RECIPE 65536 // Luca told me about how to unfocus
+
DOCK_tulimshar 1
DOCK_hurnscald 2
DOCK_candor 3
diff --git a/npc/001-1_Tulimshar/luca.txt b/npc/001-1_Tulimshar/luca.txt
index 0a12545f..b37e2123 100644
--- a/npc/001-1_Tulimshar/luca.txt
+++ b/npc/001-1_Tulimshar/luca.txt
@@ -250,13 +250,87 @@ L_teachmore_explain:
goto L_teachmore2;
L_focus:
-//FIXME
+ getpoolskilllist;
+ set @skilllist_id[@skilllist_count], 0;
+ set @skilllist_name$[@skilllist_count], "Nevermind";
+ menu
+ @skilllist_name$[0], -,
+ @skilllist_name$[1], -,
+ @skilllist_name$[2], -,
+ @skilllist_name$[3], -,
+ @skilllist_name$[4], -,
+ @skilllist_name$[5], -,
+ @skilllist_name$[6], -,
+ @skilllist_name$[7], -;
+
+ set @menu, @menu - 1;
+ if (@skilllist_id[@menu] == 0)
+ goto L_teachmore2;
+
+ poolskill @skilllist_id[@menu];
+ goto L_teachmore2;
L_unfocus:
-//FIXME
+ if (countitem("DementiaPotion") > 0)
+ goto L_unfocus_menu;
+
+ if (MAGIG_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE)
+ goto L_nopotion;
+
+ set MAGIG_FLAGS, MAGIG_FLAGS | MFLAG_HEARD_OF_UNFOCUS_RECIPE;
+ mes "[Luca the Hunter]";
+ mes "\"Unfocussing is one of the harder parts though, because it is sunk in. You see?\"";
+ next;
+ mes "\"So to remove that mental focus we will need a special potion.\"";
+ next;
+ mes "\"Maybe you should consult some very skilled alchemists.\"";
+ next;
+ mes "\"Ah yes, of course you will need a recipe. Although the alchemist usually knows it.\"";
+ next;
+ mes "\"The potion is called grimace of dementia. So the alchemist will know for sure.\"";
+ set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_UNFOCUS_RECIPE;
+ menu
+ "Ok, I will get a grimace of dementia potion", -,
+ "Alright, be right back!", -;
+ close;
+
+L_nopotion:
+ mes "[Luca the Hunter]";
+ mes "\"Hey, You really need that dementia potion for unfocussing.\"";
+ next;
+ mes "\"Come back, when you found a suitable alchemist, who can mix such a potion.\"";
+ next;
+ goto L_teachmore2;
+
+L_unfocus_menu:
+ mes "[Luca the Hunter]";
+ mes "\"Ahh, I see you have a dementia potion.\"";
+ next;
+ mes "\"What focus would you like to unfocus?\"";
+
+ getactivatedpoolskilllist;
+
+ set @skilllist_id[@skilllist_count], 0;
+ set @skilllist_name$[@skilllist_count], "Nevermind";
+ menu
+ @skilllist_name$[0], -,
+ @skilllist_name$[1], -,
+ @skilllist_name$[2], -,
+ @skilllist_name$[3], -,
+ @skilllist_name$[4], -,
+ @skilllist_name$[5], -,
+ @skilllist_name$[6], -,
+ @skilllist_name$[7], -;
+
+ set @menu, @menu - 1;
+ if (@skilllist_id[@menu] == 0)
+ goto L_teachmore2;
+
+ unpoolskill @skilllist_id[@menu];
+ close;
L_teach_brawling:
-//FIXME
+//TODO
close;
}