summaryrefslogblamecommitdiff
path: root/npc/013-2/wizard.txt
blob: 85704b5eff4df2281e11217e5e77f723b77bd488 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                      
         




                                                                 
         







                                                                                            
         



                                                                   
         



                                                                      
         











                                                               
         



                             
         













                                                                                                                                                                                                     
         

                                                                                                                                                           
         

                                                                                                                                                                                                                
         

                                                                                                                   
         



                                                                                                                                                                       
         



                                                                                                                           
         












                                                                                                                                                                                                                                 
         


















                                                                                                                      
         





                                                            
         








                                                                                                                                                                                                          
013-2,66,39,0	script	Old Wizard#_W	NPC116,{
    @has_magic = getskilllv(SKILL_MAGIC);
    MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD;

    @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT);
    if ((@run == 2) && (QL_KYLIAN == 13))
        goto L_Deliver;
    goto L_Start;

L_Deliver:
    menu
        "I have a delivery for you", L_Delivery;

L_Delivery:
    mesn;
    mes "\"Good now I can get to work on some stronger brew..\"";
    QL_KYLIAN = 14;
    goto L_close;

L_Start:
    mesn;
    mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\"";
    next;
    menu
        "Thanks, that's very kind of you!", L_Thanks,
        "Can you teach me magic?", L_TeachRude,
        "Oh, shut up!", L_ShutUp;

L_TeachRude:
    mesn;
    mes "\"I certainly could, but I already have an apprentice.\"";
    goto L_close;

L_ShutUp:
    mesn;
    mes "\"That attitude isn't going to get you very far, my dear.\"";
    goto L_close;

L_Thanks:
    mesn;
    mes "\"Behind this door, my apprentice will serve you.\"";
    next;
    if (@has_magic)
        menu
            "Alright.", L_Agree,
            "I am studying magic, can you help?", L_NewStudent,
            "Your apprentice? ... No thanks.", L_Decline;
    menu
        "Alright.", L_Agree,
        "Your apprentice? ... No thanks.", L_Decline;

L_Decline:
    mesn;
    mes "\"Goodbye, then!\"";
    goto L_close;

L_NewStudent:
    mesn;
    mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\"";
    next;

    // check if the player has the knowledge of any skill
    if (getskilllv(SKILL_POOL) && (getskilllv(SKILL_MAGIC_ASTRAL) < 1) || (getskilllv(SKILL_ASTRAL_SOUL) == 0))
        menu
            "That would be very kind of you!", L_TeachSpell,
            "Actually I am looking for someone teaching me some more magic skills.", L_AstralSoul,
            "No, but thank you!", L_Decline;
    menu
        "That would be very kind of you!", L_TeachSpell,
        "No, but thank you!", L_Decline;

L_TeachSpell:
    mesn;
    mes "\"This one may not seem too powerful, but it can be quite handy; it's the 'hide' spell. It will shield you from some forms of detection magic.\"";
    next;
    mesn;
    mes "\"Put a piece of cotton cloth on your head, and speak out '" + get(.invocation$, "spell-hide") + "', loudly and clearly. The protection lasts quite long, but you may have to renew it on occasion.\"";
    next;
    mesn;
    mes "\"You can also cast it on others, of course. Just speak their name after you pronounce the invocation.\"";
    next;
    mesn;
    mes "\"You may find it useful for getting a little peace and quiet at times, but it can also get in the way of friends trying to find you, so use it with care.\"";
    next;
    if (getskilllv(SKILL_MAGIC_ASTRAL) >= 2)
        goto L_close;
    mesn;
    mes "\"I'm not sure if you are experienced enough to cast it yet, though. You may need to first learn astral magic.\"";
    goto L_close;

L_AstralSoul:
    mesn;
    mes "\"Oh yes, there are lots of ways to improve your magic. Skills -some people say mental focus for that- are another way to improve your magic. Of course learning more and more spells is also a need for good mages.\"";
    next;
    mes "\"I can teach you the ability to focus on magical stuff.\"";
    next;
    mes "\"To do so, I am in need of a pearl and about 100 acorns.\"";
    menu
        "Here we go.", L_Next,
        "Ok be right back. I'll get them", L_Decline;

L_Next:
    if (countitem("Pearl") < 1 || countitem("Acorn") < 100) goto L_NotEnough;
    delitem "Pearl", 1;
    delitem "Acorn", 100;
    mesn;
    mes "\"Okay, listen:\"";
    next;
    mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\"";
    next;
    mes "\"To do so, think of a magic spell!\"";
    next;
    mes "The old wizard mumbles some invocations";
    next;
    @SUP_lvl = 1;
    @SUP_id = SKILL_ASTRAL_SOUL;
    @SUP_name$ = "Astral Soul";
    @SUP_xp = 2500;
    callfunc "SkillUp";
    mes "\"Now go and try to find someone who can actually activate that focus.\"";
    next;
    mes "\"You have the powers to focus on magic, but you need to get magic focused now.\"";
    goto L_close;

L_NotEnough:
    mesn;
    mes "\"Please learn to count.\"";
    next;
    mes "\"When you are done with that, come back again.\"";
    goto L_close;

L_Agree:
    mesn;
    mes "\"Beware the flying notes though, some of them are really dangerous. I haven't been able to persuade them to get back into their book. And avoid the mirror, it's been acting strange lately.\"";
    next;
    mes "\"Oh, and please don't take my apprentice too seriously. He still has a lot to learn.\"";
    goto L_close;

L_close:
    @has_magic = 0;
    close;
}