summaryrefslogblamecommitdiff
path: root/world/map/npc/020-1/well.txt
blob: 5c9c9d75fb86ddcabc6a9e79ea4f6d8bc6219bc3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                              
                                                           



                                               
                              
 
                                     

                                                                                                                                                             
 


                                               
                                   

       

                                     



                                       

                                  
            















                                         
                                 





                                             


                                               
 
             








                                                                                               
                   
          

          

                                                                     

           

                          

        
          

 
                               
 

                     

                           
            
                              
                                              
                 
 
       

                                  


                                                   


                                 
                   
          
 

          
 
//############################################
//#    NPC Well & Miler
//# Authors: Lien, PjotrOrial
//# Review:
//#
//# There is someone in the well. This can be found out by throwing some stuff
//# in there.
//#
//# When the npc in the well is detected they can be rescued by asking Miler
//# for help.
//#
//# The experience reward given by Miler is 111 * BaseLevel
//#
//# used variables: QUEST_Nivalis_state Nibble4
//############################################

020-1,99,83,0|script|#Well|400
{
    if(QL_WELL == 2) goto L_Finished;
    set @item_ID, 0;
    setarray @quote_item$, "Yuck! Who has thrown that on me?","Ouch! Who hurts me?","White powder!? What's going on up there?","Ahw! It's raining ","","","";

    mes "...";
    menu
        "Throw something in the well.", L_trew,
        "Leave it alone.", L_Close;

L_trew:
    mes "What do you want to throw?";
    menu
        "Maggot slime", L_MenuItems,
        "A raw log", L_MenuItems,
        "Pile of ash", L_MenuItems,
        "Bottle of water", L_MenuItems,
        "Leave it alone", L_Close;

L_MenuItems:
    set @menu, @menu - 1;

    // little IF to do @quote$ & @Item_ID
    set @quote$, @quote_item$[@menu];
    if(@menu == 0)
        set @item_ID, 505;
    if(@menu == 1)
        set @item_ID, 569;
    if(@menu == 2)
        set @item_ID, 701;
    if(@menu == 3)
        set @item_ID, 541;

    if(countitem(@item_ID) < 1)
        goto L_NO_ITEM;
    if(@menu == 3)
        getitem "EmptyBottle", 1;
    delitem @item_ID, 1;

    mes "[Mysterious voice inside the well]";
    mes "\" "+ @quote$ +"\"";
    next;
    menu
        "Who are you?", L_MenuItems1,
        "How did you get there?", L_MenuItems1,
        "Do you need help?", L_MenuItems1;

L_MenuItems1:
    set @menu, @menu - 1;
        if (@menu == 0)
            set @quote$, "I'll talk about who I am after leaving the well.";
        if (@menu == 1)
            set @quote$, "Well, someone has pushed me in the well, I don't know who did that.";
        if (@menu == 2)
            set @quote$, "";
    mes "[Mysterious voice inside the well]";
    mes "\" "+ @quote$ +". So if you can call help for me... please do so!\"";
    set QL_WELL, 1;
    close;

L_NO_ITEM:
    mes "You don't have such an item... Come back when you have it.";
    close;

L_Finished:
    mes "This is a well.";
    close;

L_Close:
    close;
}

020-2,100,28,0|script|Miler|100
{
    mes "[Miler]";
    mes "\"Hello!\"";
    if(QL_WELL == 2) close;
    if(QL_WELL == 1)
        menu
            "Hello.", L_Close,
            "Hello, Can you help me?", L_HELP;
    goto L_Close;

L_HELP:
    mes "[Miler]";
    mes "\"What's the problem?\"";
    menu "Someone has fallen in the well.", L_Next;

L_Next:
    mes "[Miler]";
    mes "\"Ho! I'll help him!\"";
    getexp (BaseLevel * 111), 0;
    set QL_WELL, 2;
    close;

L_Close:
    close;
}