summaryrefslogblamecommitdiff
path: root/npc/020-7-1/peetu.txt
blob: 443fce299dda4295d361b3d9ca1047bb11a98157 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11





                




                                  

                                                              


















                                                                                            

                                                               


                      
                       


                            
 
                                    


                                      
                 
                                                    




































                                   
                                                                    








                                                                                  
































































                                                                                       

                            





                                                                                    


                                      








                                                                                                                                           


                                      















                                                                                                                                                                        







                
// TMW2 scripts.
// Authors:
//    Jesusalva
//    TMW Org.
// Description:
//    Peetu
//
// NivalisQuest_BlueSage STRUCTURE
//  FIELD 1:
//      INVESTIGATION
//      1 - STBY OUTSIDE
//      2 - ACCESS GRANTED - But Peetu is crying too much
//      3 - Peetu was calmed down, go talk to Oskari about him
//      4 - Oskari is OK with peetu, but wanna hear from others. He also sends you
//          to ask what Peetu happened
//      5 - Adultered ingredients seems the cause, report to Elias
//      6 - Elias is now worried about a visitor. Ask people about and report.
//      7 - If everyone found the visitor, confirm Elias the worries
//      8 - Elias sent you to Oskari to inform the issue. Blue Sage probably knew all along.
//      will not advance unless everyone thinks Peetu is good.
//      9 - Oskari accepts the cause. Tells to report Peetu that it probably was
//          a saboutage, to check if the Silk Cocoon really was there.
//      10 - Peetu confirmed the saboutage. Report to Blue Sage.
//      11 - Blue Sage accepted the evidence, and explains about other sages issues.
//          It's not known who or what is behind this. He excuses for making you waste
//          your time. He asks you to return to him later, as he needs to write letters.
//      12 - QUEST COMPLETE - You collected your reward
//          Also picked up a letter for Frostia Mayor, about the incident (Main Story).
//  FIELD 2:
//      Bitwise (BS_QVISITOR)
//  FIELD 3:
//      Bitwise (BS_QHELPER)

020-7-1,122,27,2	script	Peetu	NPC_BLUESAGEWORKER_MA,{
    function pWaiting;

    function pIntro;
    function pContinue;
    function pReflection;
    function pInvestigation;
    function pComplete;

    .@q=getq(NivalisQuest_BlueSage);
    .@q2=getq2(NivalisQuest_BlueSage);
    .@q3=getq3(NivalisQuest_BlueSage);

    if (.@q <= 4)
        npctalk3 any(l("*sob sob*"), l("*crying*"));

    switch (.@q) {
        case 2:
            pIntro();
            break;
        case 3:
            pWaiting("Oskari");
            break;
        case 4:
            pReflection();
            break;
        case 5:
        case 6:
        case 7:
        case 8:
            pWaiting("Oskari");
            break;
        case 9:
            pInvestigation();
            break;
        case 10:
        case 11:
            pWaiting("Blue Sage");
            break;
        case 12:
            pComplete();
            break;
        default:
            warp "Save", 0, 0;
            percentheal -100, -100;
            end;
            break;
    }
    close;

// Here we begin
function pWaiting {
    .@name$=getarg(0, "##1##BBUG, REPORT ME: THE FLYING COW##0##b");
    mesn;
    mesc l("*sniff sniff*");
    mesq l("I'm waiting for @@ feedback... Please go talk to them! %%S", .@name$);
    close;
}

// Peetu is too upset with failing (yeah, he is that kind of perfectionist here).
// We should find a way to calm him down.
function pIntro {
    .@q=getq(NivalisQuest_BlueSage);
    .@q2=getq2(NivalisQuest_BlueSage);
    .@q3=getq3(NivalisQuest_BlueSage);
    mesn;
    mesc l("*sniff sniff*");
    next;
    select
        l("Hello Peetu."),
        rif(.@q2 >= 1, l("[Give him some salty Sea Drops?]")),
        rif(.@q2 >= 2, l("[Give him some tasty Chocolate Bar?]")),
        rif(.@q2 >= 3, l("[Give him a Mouboo Figurine to play with?]")),
        rif(.@q2 >= 4, l("[Slap his hands to surprise him and get his attention?]")),
        rif(.@q2 >= 5, l("SHUT UP PEETU, I'M ALREADY TIRED OF LISTENING YOUR CRIES!")),
        rif(.@q2 >= 5, l("I give up. You're hopeless.")),
        rif(.@q2 >= 5, l("Have you cried enough?")),
        rif(.@q2 >= 5, l("[Pat his shoulder and say everything will be fine.]")),
        rif(.@q2, l("Hi Peetu, are you calmer now?"));
    mes "";
    switch (@menu) {
        case 1:
            if (.@q2 < 1)
                setq2 NivalisQuest_BlueSage, 1;
        case 2:
            if (!countitem(SeaDrops)) {
                mesc l("You don't have @@.", getitemlink(SeaDrops));
            }
            if (.@q2 < 2)
                setq2 NivalisQuest_BlueSage, 2;
            break;
        case 3:
            if (!countitem(ChocolateBar)) {
                mesc l("You don't have @@.", getitemlink(ChocolateBar));
            }
            if (.@q2 < 3)
                setq2 NivalisQuest_BlueSage, 3;
            break;
        case 4:
            if (!countitem(MoubooFigurine)) {
                mesc l("You don't have @@.", getitemlink(MoubooFigurine));
            }
            if (.@q2 < 4)
                setq2 NivalisQuest_BlueSage, 4;
            break;
        case 5:
            mesn;
            mesq l("AH!");
            next;
            mesc l("You seem to have gotten Peetu's attention for a while.");
            next;
            break;
        case 9:
            pContinue();
            break;
    }
    mesn;
    mes l("WAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHH");
    mesc l("@@ burst in tears.", .name$);
    next;
    mesn strcharinfo(0);
    mesc l("I probably should look in a way of calming him down.");
    close;
}

// He is calmer now
function pContinue {
    mesn;
    mesc l("*sniff sniff*");
    close;
}

// Report that Oskari is not planning to fire him (yet), and is trying to understand
// what went wrong so it do not repeat.
function pReflection {
    .@q=getq(NivalisQuest_BlueSage);
    .@q2=getq2(NivalisQuest_BlueSage);
    .@q3=getq3(NivalisQuest_BlueSage);
    mesn;
    mesc l("*sniff sniff*");
    mesq l("I'm waiting for ##1##BBUG, REPORT ME: PEETU IS WAITING THE FLYING COW##0##b feedback... Please go talk to them! %%S", .@name$);
    close;
}

// Peetu hurries back to check what happened. Wait 3 minutes in the library.
// He'll then say that in fact there was silk cocoon
function pInvestigation {
    .@q=getq(NivalisQuest_BlueSage);
    .@q2=getq2(NivalisQuest_BlueSage);
    .@q3=getq3(NivalisQuest_BlueSage);
    mesn;
    mesc l("*sniff sniff*");
    mesq l("I'm waiting for ##1##BBUG, REPORT ME: PEETU IS WAITING THE FLYING COW##0##b feedback... Please go talk to them! %%S", .@name$);
    close;
}

// The crime was "solved"
function pComplete {
    mesn;
    mesq l("Oh, hey, welcome back, @@! Many thanks for helping me!", strcharinfo(0));
    next;
    mesn;
    .@subject$=any(l("town finances"), l("house finances"), l("town damage by monsters"), l("library damage"), l("supply report"), l("magic book"), l("town overview"));
    mesq l("I'm currently going over some of the household paperwork. Right now I'm inspecting the @@. The work never stops!", .@subject$);
    close;
}

OnInit:
    .sex=G_MALE;
    .distance=5;
    npcsit;
    end;
}