summaryrefslogblamecommitdiff
path: root/npc/003-1/sarah.txt
blob: 0b205e31ae9e9ba5d9a6b9f501f7a02c7fe020a6 (plain) (tree)
1
2
3
4
5
6
7


           
                                            

                       
                               



















                                                                                                    
                                                         





                                                
                                   
                           
                                                                         


              
                             
















                                             

                                                       














                                  

                                              
                                               




                                                    
                    
                  


        
// Author:
//    Saulc

003-1,90,144,0	script	Sarah	NPC_FEMALE,{

    .cake = CherryCake;
    .reward = FancyHat; // TODO
    
    function quest_completed{
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("It was so tasty, I can't eat anything more... Thank you.");
            close;
    }

    function quest_open {
        if (countitem(.cake) > 0)
        {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("You brought me Cherry Cake! Here is your @@, as promised.",getitemlink(.reward));
            delitem .cake,1;
            getitem .reward,1;
            setq TulimsharQuest_Sarah, 1;
            close;
        }
        else 
        {
            speech S_FIRST_BLANK_LINE,
                l("Sorry, that is not the cake I love.");
            close;
        }
    }

    function quest_started {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Oh, Welcome then.");
        speech S_LAST_NEXT,
            l("Can you bring me a piece of Cherry Cake? Pretty please?");
        do
        {
        select
            l("Here is it!"),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                quest_open;
                break;
        }
    } while (@menu != 2);
    }
   
    do
    {
        .@chest = getq(TulimsharQuest_Sarah);
        if (.@chest == 1)
            goto quest_completed;
        select
            rif(.@chest == 0,
            l("Hello, I'm new here! Can I help you?")),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                quest_started;
                break;
        }
    } while (@menu != 2);

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(0, "Sarah");
    //setunitdata(.@npcId, UDT_HEADTOP, 2936);
    setunitdata(.@npcId, UDT_HEADMIDDLE, 1311);
    setunitdata(.@npcId, UDT_HEADBOTTOM, 2201);
    setunitdata(.@npcId, UDT_WEAPON, 1803); // Boots
    setunitdata(.@npcId, UDT_HAIRSTYLE, 19);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 16);

    .sex = G_FEMALE;
    .distance = 5;
    end;
}