summaryrefslogblamecommitdiff
path: root/npc/029-0/amelia.txt
blob: 9158238eba683491c88b2abc6bd2e77730cc5cd6 (plain) (tree)



































                                                                                                                       
                                                 




































































                                                                                                                                                                                                             
// TMW2 Scripts
// Author:
//    Jesusalva
// Description:
//  The Mana Tree Quest (unlocks after Fires of Steam events)

029-0,30,129,0	script	Amelia	NPC_CHILD4,{
    .@q = getq(FortressQuest_ManaTree);
    .@q2 = getq2(FortressQuest_ManaTree);

    // Cycle
    if (.@q == 0) goto L_Start;
    if (.@q == 1) goto L_Cheerful;
    if (.@q == 2) goto L_Short;

    // Generic reply
    npctalk3 l("*sigh*");
    end;

L_Start:
    mesc l("The kid is not paying attention to you.");
    if ($FIRESOFSTEAM < 10) end;
    mesc l("She is staring at the empty sea and sighing. She seems to be really down after Andrei Sakar passed away.");
    next;
    mesc l("Maybe we can give her something, to cheer her up?");
    mes "##B" + l("Drag and drop an item from your inventory.") + "##b";

    .@id = requestitem();

    // No item supplied
    if (.@id < 1) {
        closeclientdialog;
        end;
    }

    if (array_find(.gifts, .@id) < 0) {
        mesc l("This doesn't looks like a toy.");
        mesc l("Maybe we could give her a %s instead.", getitemlink(any(Doll, PlushMouboo, LeatherBall, ReinbooWand, SantaGlobe, RubberDucky, CandorBola))); // Suggest only the most rare and expensive toys
    }
    mesc l("Really give the %s to %s?", getitemlink(.@id), .name$), 1;
    mesc b(l("The item will be lost forever!")), 1;
    next;
    if (askyesno() != ASK_YES) {
        closeclientdialog;
        end;
    }
    delitem .@id, 1;
    getexp 27000, 0; // 1% of Level 80 EXP
    setq FortressQuest_ManaTree, 1, .@id;
    mesn;
    mesq l("...Thanks, kind person.");
    next;
    mesn;
    mesq l("My name is Amelia, and I am Elora's daughter.");
    close;

L_Cheerful:
    mesc l("Amelia looks much more cheerful than the last time you've met her.");
    next;
    mesn;
    mesq l("Hey, %s! Welcome back!", strcharinfo(0));
    next;
    mesn;
    mesq l("Thanks for the %s you gave me the other day.", getitemlink(.@q2));
    if (getq(General_Narrator) < 20)
        close;
    next;
    mesn;
    mesq l("Here, lemme tell you something good: Do you know that fortress island which all the adventurers are talking about nowadays?");
    next;
    if (askyesno() == ASK_NO) {
        mesn;
        mesq lg("Uh, how come? I thought you were an adventurer too! That island which trusted adventurers can reach using Pihro & Pyndragon's personal airship is so popular... Anyway!");
        next;
    }
    mesn;
    mesq l("I visited it with my mother, the other day, and I found a tree in a cave!");
    next;
    mesn;
    mesq l("It was so lovely, and it had some very tasty fruits, too! But the cave was so dangerous...");
    next;
    mesn;
    mesq l("I saw some flower adorns, too. I hope it is not some traveler's grave. This war, it makes me so sad... I'm sure the tree was sad, too.");
    next;
    mesn;
    mesq l("If you ever go there, you should pay it a visit. It is most definitely alive! I'm sure it'll like you, too.");
    setq1 FortressQuest_ManaTree, 2;
    close;

L_Short:
    mesn;
    mesq l("Thanks for the %s you gave me the other day.", getitemlink(.@q2));
    if (getq(General_Narrator) < 20)
        close;
    next;
    mesn;
    mesq l("If you ever visit the fortress island, be sure to visit the friendly tree at the cave. I'm sure it'll like you.");
    close;

OnInit:
    setarray .gifts, BrokenDoll, Doll, PlushMouboo, LeatherBall, ReinbooWand, MoubooFigurine, ChocolateBunny, RedStocking, SantaGlobe, SnowmanGlobe, RubberDucky, CandorBola, KidBola;
    .sex = G_FEMALE;
    .distance = 4;
    end;
}