summaryrefslogblamecommitdiff
path: root/npc/functions/random-talk.txt
blob: 5ebb5a2fb2b8272497c41c56bacba25df9ef04af (plain) (tree)













































































































































































                                                                                                                                                 
// TMW2 Script
// Author:
//    Jesusalva
// Description:
//    Random dialog for various random NPCs.

// Functions:
//  hello
//  moubootalk
//  villagertalk
//  sailortalk
//  legiontalk

// Evol authors (some strings and code):
//  Reid
//  Akko Teru
//  Qwerty Dragon

function	script	hello	{

    switch (rand(3)) {
        case 0:
            npctalkonce(l("Heya!"));
            break;
        case 1:
            npctalkonce(l("Hi."));
            break;
        case 2:
            npctalkonce(l("Nice day to you."));
            break;
    }

    return;
}

function	script	moubootalk	{
    switch (rand(4)) {
        case 0:
            npctalkonce(l("Moooooo!"));
            break;
        case 1:
            npctalkonce(l("Moo!"));
            break;
        case 2:
            npctalkonce(l("Moooooooooooo!"));
            break;
        case 3:
            npctalkonce(l("Moooo!"));
            break;
    }
    return;
}

function	script	sailortalk	{

    .@rand = rand(8);
    if (.@rand == 0) goodbye;
    if (.@rand == 1) npctalkonce(l("Ah, this is boring."));
    if (.@rand == 2) npctalkonce(l("Good to hear from you!"));
    if (.@rand == 3) npctalkonce(l("So finally someone has came to visit me?"));
    if (.@rand == 4) {
        speech(
            l("A sunny and hot day,"),
            l("a quiet place,"),
            l("a ground!"),
            l("What else do you need?"));
        close;
    }
    if (.@rand == 5) npctalkonce(l("A-hoy matey!"));
    if (.@rand == 6) npctalkonce(l("Arr!"));
    if (.@rand == 7) npctalkonce(l("Howdy?"));

    // just to be sure
    closedialog;
    close;
    end;
}

function	script	villagertalk	{

    function darn_or_smile {
        .@darn = rand(42);

        if (.@darn < 26) {
            emotion E_JOY;
            hello;
        } else if (.@darn > 26) {
            emotion E_LOOKAWAY;
            goodbye;
        } else {
            npctalkonce(l("Stop it!"));
        }
        return;
    }

    switch (rand(4)) {
        case 0:
            darn_or_smile();
            break;
        case 1:
            npctalkonce(l("It is a sunny day, don't you think?"));
            break;
        case 2:
            npctalkonce(l("Go fly a kite."));
            break;
        case 3:
            npctalkonce(l("I just want to live my life in peace."));
            break;
        default:
            emotion E_HAPPY;
            break;
    }

    return;
}

function	script	legiontalk	{
    switch (rand(15)) {
        case 0:
            npctalkonce(l("Do I look like a tree? I feel like one."));
            //speech(
            //    l("Do you feel too weak even to do damage to this areas wishy-washy wildlife?"),
            //    l("Then concentrate your anger upon the trees hereabouts, you will gain experience whilst leveling your sword skill on them."),
            //    l("Oh, and a fruit may even fall for you if you are lucky! But stay alert to pick up your drops."));
            //close;
            break;
        case 1:
            npctalkonce(l("I'm a little busy right now."));
            break;
        case 2:
            npctalkonce(l("Not in the mood to chat."));
            break;
        case 3:
            npctalkonce(l("My breath smells bad."));
            break;
        case 4:
            npctalkonce(l("Don't distract me, I have to stay alert."));
            break;
        case 5:
            npctalkonce(l("Give me some space."));
            break;
        case 6:
            npctalkonce(l("Can you please go away?"));
            break;
        case 7:
            npctalkonce(l("Can't talk right now, I'm on patrol duty."));
            break;
        case 8:
            npctalkonce(l("What're you looking at?!"));
            break;
        case 9:
            npctalkonce(l("I can't stay here and talk all day. I have a job to do."));
            break;
        case 10:
            npctalkonce(lg("Keep moving girl.", "Keep moving boy."));
            break;
        case 11:
            npctalkonce(lg("So you think you're tough? A warrior must also be loyal and patient."));
            break;
        case 12:
            emotion E_LOOKAWAY;
            break;
        case 13:
            npctalkonce(l("Practice! There are no secrets to becoming a warrior."));
            break;
        case 14:
            npctalkonce(l("There is no honor in fighting a weak opponent."));
            break;
    }

    return;
}