summaryrefslogblamecommitdiff
path: root/npc/001-2/pauline.txt
blob: 992a371af77ea8240ec66c68b5b2befcb274c63d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                        
         





                                                                                    
         













                                                                                                                           
         









                                                                           
         







                                                                     
         













                                                                                                                                                                        
         
                                                                                                                              
                                                                                                                  





                                                                                                                                                         
                       




                          
         















                                                                     

                                                                                                                                                                           
         





                                                                        
                     
                                                     
                         
                                                  
        

                                  

        




                                                     
                              
 




                                                                                                                               

                 



                                                                                                                               





                              
                                                                        
         





                                                                        
                     
                                                     
                         
                                                  




                               




                                                  
                              
 





                                                                                                                                

                 



                                                                                                                                





                              
         




                                                                                                                                
         



                                                                                                 
         




                                                             
         















































                                                                                          
001-2,77,78,0	script	Pauline	NPC208,{

    @Pauline_MASK = NIBBLE_4_MASK;
    @Pauline_SHIFT = NIBBLE_4_SHIFT;

    @pauline_state = ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT);


    @pauline_REWARD = 10000;

    if (@pauline_state == 4)    goto L_MoreMagic;
    if (@pauline_state == 3)    goto L_KnowIngredientsPinkie;
    if (@pauline_state == 2)    goto L_Ingredients;
    if (@pauline_state == 1)    goto L_Back;

    if (getskilllv(SKILL_MAGIC_ASTRAL) > 0)
        goto L_Magic;
    mesn;
    mes "\"I've mastered several schools of magic and fought the Yeti in Kaizei.\"";
    next;
    mes "\"The path of magic is a long and difficult one.\"";
    goto L_close;

L_Magic:
    mesn;
    mes "\"Ah. I see you are skilled in the Art of Astral Magic.\"";
    mes "\"Who taught you?\"";
    menu
        "I learnt it myself!", L_Next,
        "Sagatha is my teacher.", L_Sagatha,
        "You must be mistaken.", L_close;

L_Next:
    mes "\"You did? Not bad. I guess then there is nothing I can teach you. Or are you interested in sharing knowledge?\"";
    menu
        "Yes, please.", L_Spells,
        "No, thanks.", L_close;

L_Sagatha:
    mesn;
    mes "\"Ah, that Witch!\"";
    mes "\"Very well.\"";
    next;
    mes "\"Do you want me to teach you things Sagatha doesn't know yet?\"";
    next;
    menu
        "Yes.", L_Spells,
        "No.", L_close;

L_Back:
    mesn;
    mes "\"So, you're back. Are you ready to share knowledge now?\"";
    menu
        "Yes.", L_Spells,
        "No.", L_close;

L_Spells:
    @pauline_state = 1;
    callsub S_Update_Mask;
    mesn;
    mes "\"Okay.\"";
    mes "\"Not long ago I discovered some new caves near Tulimshar. In an abandond chamber I found some paintings on the wall.\"";
    next;
    mes "\"They weren't typical for this region, so I examined them closely. I found some invocations I have never heard before.\"";
    mes "\"I thought that they would fit better into the Woodland area. I could only decipher two invocations so far. Those are two spells used to summon creatures.\"";
    next;
    mes "\"One was for summoning Mouboos and the other one was for summoning Pinkies.\"";
    mes "\"Have you ever heared about those?\"";
    next;
    menu
        "Yes. I thought you had something new to tell. [Walk Away]", L_close,
        "No, tell me more.", L_Next1;

L_Next1:
    mesn;
    mes "\"Well I could only read the invocations. So I don't exactly know what kind of ingredients you are going to need.\"";
    mesq l("\"The first one for the mouboo was %s and the one for the pinkie was %s.", b("Kalboo"), b("Kalgina"));
    next;
    mes "\"For the pinkie spell my suggestion is to try similar ingredients to the other Astral spells. Try a root and some item typical for pinkies.\"";
    mes "\"The mouboo spell might be more complicated. From what I could translate, one of the spell components is crafted by magic.\"";
    next;
    mes "\"When you find the right ingredients, come back and bring them to me to try those spells out.\"";
    next;
    mesq l("Goodbye.");
    @pauline_state = 2;
    callsub S_Update_Mask;
    goto L_close;

L_Ingredients:
    mesn;
    mes "\"Hello, have you found out what ingredients to use yet?\"";
    menu
        "Yes.", L_KnowIngredientsMouboo,
        "No.", L_Next2;

L_Next2:
    mes "\"Okay. Come back as soon as you know.\"";
    goto L_close;

L_KnowIngredientsMouboo:
    mes "\"Did you bring them?\"";
    menu
        "Yes." , L_Next3,
        "No.", L_ComeBackLater;

L_Next3:
    mesq l("Then tell me the ingredients for the mouboo summoning spell and give them to me. Start with the first ingredient and then tell me the second one separately.");
    mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
    next;
    .@it1 = requestitem();
    mes l("Next ingredient.");
    mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
    .@it2 = requestitem();

    if (.@it1 < 1 || .@it2 < 1)
        goto L_Wrong;
    if (countitem(.@it1) < 1 || countitem(.@it2) < 1)
        goto L_NotEnough;
    mesq l("Do you want to give me these items?");
    menu
        l("No."), L_ComeBackLater,
        l("Yes."), L_Next4;

L_Next4:
    delitem .@it1, 1;
    delitem .@it2, 1;
    mesq l("Okay let me try this.");
    if ((.@it1 == Root && .@it2 == MoubooFigurine) ||
        (.@it1 == MoubooFigurine && .@it2 == Root))
        goto L_TrySpellMouboo;

    mesc l("The Witch takes %s and %s and put them togheter calling %s.", getitemlink(.@it1), getitemlink(.@it2), b("kalboo"));
    mesc l("Nothing happens.");
    mesn;
    mesq l("It seems you did not tell me the correct ingredients. Come back when you find the correct ones.");
    goto L_close;

L_TrySpellMouboo:
    mesc l("The Witch takes %s and %s and put them togheter calling %s.", getitemlink(.@it1), getitemlink(.@it2), b("kalboo"));
    monster "001-1", 55,68, "Good", Mouboo, 1;
    mesn;
    mesq l("It worked!");
    @pauline_state = 3;
    callsub S_Update_Mask;
    getexp @pauline_REWARD, 0;
    goto L_close;

L_KnowIngredientsPinkie:
    mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
    next;
    .@it1 = requestitem();
    mes l("Next ingredient.");
    mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
    .@it2 = requestitem();

    if (.@it1 < 1 || .@it2 < 1)
        goto L_Wrong;
    if (countitem(.@it1) < 1 || countitem(.@it2) < 1)
        goto L_NotEnough;
    mesq l("Do you want to give me these items?");
    menu
        "No.", L_ComeBackLater,
        "Yes.", L_Next5;

L_Next5:
    delitem .@it1, 1;
    delitem .@it2, 1;
    mesq l("Okay let me try this.");
    if ((.@it1 == Root && .@it2 == PinkAntenna) ||
        (.@it1 == PinkAntenna && .@it2 == Root))
        goto L_TrySpellPinkie;

    mesc l("The Witch takes %s and %s and put them togheter calling %s.", getitemlink(.@it1), getitemlink(.@it2), b("kalgina"));
    mesc l("Nothing happens.");
    mesn;
    mesq l("It seems you did not tell me the correct ingredients. Come back when you find the correct ones.");
    goto L_close;


L_TrySpellPinkie:
    mesc l("The Witch takes %s and %s and put them togheter calling %s.", getitemlink(.@it1), getitemlink(.@it2), b("kalgina"));
    monster "001-1", 54,68, "Good", Pinkie, 1;
    mesn;
    mesq l("It worked!");
    @pauline_state = 4;
    callsub S_Update_Mask;
    getexp @pauline_REWARD, 0;
    goto L_close;

L_MoreMagic:
    mesn;
    mes "\"Thanks for telling me the ingredients. As soon as I find out more about those wall paintings I will let you know.\"";
    goto L_close;

L_Wrong:
    mes "The Witch looks at you and snorts.";
    mesn;
    mes "\"You told me the wrong ingredients. Come back as soon as you know the correct ones.\"";
    goto L_close;

L_NotEnough:
    mesn;
    mes "\"Hey, you don't have this with you!\"";
    mes "\"Come back when you have the right ingredients.\"";
    goto L_close;

L_ComeBackLater:
    mesn;
    mes "\"Then come back later.\"";
    goto L_close;

L_close:
    @pauline_ingredient1$ = "";
    @pauline_ingredient2$ = "";
    cleararray @items$, "", getarraysize(@items$);
    cleararray @item_names$, "", getarraysize(@item_names$);
    @pauline_state = 0;
    @pauline_REWARD = 0;
    close;

S_Update_Mask:
    QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT);
    return;
}

001-2,79,74,0	script	PaulineDebug	NPC208,{
    @Pauline_MASK = NIBBLE_4_MASK;
    @Pauline_SHIFT = NIBBLE_4_SHIFT;

    @pauline_state = ((QUEST_MAGIC2 & @Pauline_MASK) >> @Pauline_SHIFT);

    mes "Reset Quest State";
    mes @pauline_state;
    menu
        "Yes.", L_Next,
        "No.", L_close;

L_Next:
    @pauline_state = 0;
    callsub S_Update_Mask;
    mes "Done";
    close;

L_close:
    @pauline_state = 0;
    close;

S_Update_Mask:
    QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT);
    return;

OnInit:
    if (!debug)
        disablenpc "PaulineDebug";
    end;
}