diff options
-rw-r--r-- | npc/008-2-2/kfahr.txt | 271 | ||||
-rw-r--r-- | npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt | 4 |
2 files changed, 233 insertions, 42 deletions
diff --git a/npc/008-2-2/kfahr.txt b/npc/008-2-2/kfahr.txt index 49a81828..da594512 100644 --- a/npc/008-2-2/kfahr.txt +++ b/npc/008-2-2/kfahr.txt @@ -8,9 +8,10 @@ // Variables: // HurnscaldQuests_Kfahr // Values: -// 0 Default. -// 1 Bone knife quest started. -// 2 Bone knife quest finished, golden stinger quest started +// 0 Didn't speak with Kfahr yet. +// 1 Already met Kfahr, No quests started +// 2 Bone knife quest started. +// 3 Bone knife quest finished 008-2-2,44,36,0 script Kfahr#008-2-2 NPC_YOUNG_MAN_KFAHR,{ @@ -20,36 +21,6 @@ @last_story = 0; @has_beer = 0; -function tale_desert_worm_final{ - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Nothing much else happened on that trip. When we arrived in Tulimshar, people at first didn't believe the story, of course, until we showed them the treasures and the bones. Ah, those were wonderful days..."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - "He sighs and leans back, a nostalgic look on his face."; -} - -function desert_worm_see_bones{ -//TODO: add boneknife quest here - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Of course!"); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He pulls out a strangely curved knife with a yellow-whiteish blade that is almost transparent at the edge."); - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("When hardened properly, this bone knife can last a lifetime! One of the best knives you will find, too."); - - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("He puts the knife back into his pocket."); - - mes l(" > \"That knife looks sharp!\""); - mes ""; - mes l(" > \"But, what happened next?\""); - tale_desert_worm_final; -} - - function tale_sub{ @story_abort = 0; @@ -82,6 +53,209 @@ function tale_sub{ @last_story = @current_story; } +function bone_quest_items{ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Bring me " + .BLACK_STINGERS_NR + " @@ and " + .MUSHROOMS_NR + " @@ to prove that you are a competent warrior, and I'll see if I have something for you.", getitemlink("BlackScorpionStinger"), getitemlink("SmallMushroom")); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He grins."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l( "But while you are here... perhaps you would like to listen to another story?"); +} + +function bone_quest_final_check{ + + if (countitem("BlackScorpionStinger") < .BLACK_STINGERS_NR){ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("No, no... I said " + .BLACK_STINGERS_NR + " black scorpion stingers."); + if (countitem("BlackScorpionStinger") > 0) + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You will need " + (.BLACK_STINGERS_NR - (countitem ("BlackScorpionStinger"))) + " more of those."); + else + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You didn't bring even a single one!"); + close; + } + + if (countitem("SmallMushroom") < .MUSHROOMS_NR){ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("No, no... I said " + .MUSHROOMS_NR + " small mushrooms."); + if (countitem("SmallMushroom") > 0) + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You will need " + (.MUSHROOMS_NR - (countitem ("SmallMushroom"))) + " more of those."); + else + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You didn't bring me even a single little mushroom!"); + close; + } + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Kfahr is delighted."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Well done, well done! Now that's what I call Warrior spirit!"); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He laughs, then suddenly stops, turning to you with suspicion in his eyes."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You DID get those yourself, didn't you? Not buy them or somesuch...?"); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Before you can answer, he laughs and slaps you on the back again."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Ah, what am I thinking! Too many years in the desert make you a little suspicious of everyone and everything! Naah, I believe you."); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He pulls a strangely curved knife out of a side pocket and holds it up to the light. The blade is partly transparent, and looks quite sharp."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("It's a bone knife, carved out of the umplex bone of a desert worm... you can probably guess which one."); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He grins broadly again, weighing the weapon."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("It's a little heavy, but one of the best knives you can get. Certainly beats a short sword any time of day."), + l("I had the nomads make me a few of them, and I hardly use them nowadays, so I think I can part with this one."); + + if (countitem("BlackScorpionStinger") < .BLACK_STINGERS_NR){ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You just had " + .BLACK_STINGERS_NR + " black scorpion stingers. What happened to them?"); + if (countitem("BlackScorpionStinger") > 0) + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You will need " + (.BLACK_STINGERS_NR - (countitem ("BlackScorpionStinger"))) + " more of those."); + else + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You didn't bring even a single one!"); + close; + } + + if (countitem("SmallMushroom") < .MUSHROOMS_NR){ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You just had " + @MUSHROOMS_NR + " small mushrooms. What happened to them?"); + if (countitem("SmallMushroom") > 0) + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You will need " + (.MUSHROOMS_NR - (countitem ("SmallMushroom"))) + " more of those."); + else + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You didn't bring me even a single little mushroom!"); + close; + } + + getinventorylist; + if (@inventorylist_count == 100){ + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You don't have room for this. Come back when you do."); + close; + } + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He hands you the knife."), + l("Oh, and I think I'll keep those in return; I know someone who will trade them for antidote potions."); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He pockets the stingers and mushrooms."); + + setq HurnscaldQuests_Kfahr, 3; + delitem "BlackScorpionStinger", .BLACK_STINGERS_NR; + delitem "SmallMushroom", .MUSHROOMS_NR; + getexp .KNIFE_QUEST_XP, 0; + getitem "BoneKnife", 1; + next; +} + +function bone_quest_check_items{ + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Kfahr eyes you with unconcealed amusement."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Welcome back! Did you bring me the things I asked for?"); + next; + select + l("Yes, here they are!"), + l("Er, what were those things again?"), + l("No, sorry, I didn't have the time. I'm more interested in hearing your stories."), + l("I forgot! Let me get them right now."); + switch (@menu){ + case 1: bone_quest_final_check; + return; + case 2: bone_quest_items; + return; + case 3: return; + case 4: close; + } +} + +function bone_quest_finished{ + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("I really don't have anything else I'd want to give away to make you stronger. Look around a bit yourself! You won't become a hero if you keep begging for help!"); +} + +function bone_quest_tooweak{ + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You know, little one, if you keep practicing a little and come back once you're a bit stronger, I might have something for you..."); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He winks."); +} + +function bone_quest{ + + if (getq(HurnscaldQuests_Kfahr) == 2){ + bone_quest_items; + return; + } + + if (getq(HurnscaldQuests_Kfahr) > 2){ + bone_quest_finished; + return; + } + + if (BaseLevel < 40){ + bone_quest_tooweak; + return; + } + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Kfahr stares at you for a moment, then nods."); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You seem reasonably skilled. I think I may have something that I no longer need, but I don't want to give it to just anyone..."); + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He hesitates, obviously trying to make up his mind about something, then continues."); + + setq HurnscaldQuests_Kfahr, 2; + bone_quest_items; +} + +function tale_desert_worm_final{ + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Nothing much else happened on that trip. When we arrived in Tulimshar, people at first didn't believe the story, of course, until we showed them the treasures and the bones. Ah, those were wonderful days..."); + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + "He sighs and leans back, a nostalgic look on his face."; +} + + +function desert_worm_see_bones{ + + if (BaseLevel >= 40) + bone_quest; + return; + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Of course!"); + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He pulls out a strangely curved knife with a yellow-whiteish blade that is almost transparent at the edge."); + + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("When hardened properly, this bone knife can last a lifetime! One of the best knives you will find, too."); + + narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("He puts the knife back into his pocket."); + + mes l(" > \"That knife looks sharp!\""); + mes ""; + mes l(" > \"But, what happened next?\""); + tale_desert_worm_final; +} + function tale_desert_worm{ @current_story = 1; @@ -89,7 +263,7 @@ function tale_desert_worm{ if (@story_abort) return; - narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, +narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Kfahr smiles and leans back."); speech S_FIRST_BLANK_LINE | S_LAST_NEXT, @@ -164,6 +338,7 @@ function tale_desert_worm{ l("I never told Arvek that it was his brew that killed it; he'd never have forgiven me."), l("One of the nomads that had been travelling with the other caravan then told me that you could make special kinds of knives and swords and armor out of desert worm bones."); + select l("Hang on... bones in a... worm?"), l("That's neat! Do you have any that I could see?"), @@ -493,8 +668,8 @@ function kfahr_first_met { } -if (getq(HurnscaldQuests_Kfahr) == 0) - { +switch (getq(HurnscaldQuests_Kfahr)){ + case 0: narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You stand before a battle-scarred, darkly tanned warrior, brimming with muscles."), l("Just looking at him you smell danger, adventure, excitement..."), @@ -522,19 +697,33 @@ if (getq(HurnscaldQuests_Kfahr) == 0) case 2: close; } - } - else - { + break; + case 1: narrator S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Kfahr nods and grins as you greet him."); speech S_LAST_NEXT, - l("Came back for more stories about Desert Worms, Sesert Temples and the Hero of Tulimshar? Have a seat!"); + l("Came back for more stories about Desert Worms, Desert Temples and the Hero of Tulimshar? Have a seat!"); kfahr_main_dialog; - } + break; + case 2: + bone_quest_check_items; + kfahr_main_dialog; + break; + default: + kfahr_main_dialog; + break; +} close; OnInit: + + .BLACK_STINGERS_NR = 10; + .MUSHROOMS_NR = 10; + .SNAKE_SKINS_NR = 10; + .KNIFE_QUEST_XP = 50000; + .STINGER_QUEST_XP = 80000; + .sex = G_MALE; .distance = 2; end; diff --git a/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt b/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt index 192f1fd7..4ee0b36e 100644 --- a/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt +++ b/npc/functions/quest-debug/057-HurnscaldQuests_Kfahr.txt @@ -18,7 +18,9 @@ function script QuestDebug57 { GenericQuestDebug HurnscaldQuests_Kfahr, menuimage("actions/manage", l("Debug Kfahr")), -1, l("Didn't speak with Kfahr yet"), 0, - l("Did speak with Kfar"), 1; + l("Already met Kfahr, No quests started"), 1, + l("Bone knife quest started"), 2, + l("Bone knife quest finished"), 3; if (@menuret < 0) { |