summaryrefslogblamecommitdiff
path: root/localserver/npc/017-1_stranger_blackbox.txt
blob: bdd444d619c80cabe6a4df3ce428c84e7a7d3cdb (plain) (tree)







































                                                                                        
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  This is the “Stranger” black box.
//  It contains the answers to all the riddles.
//  This file is kept outside the main tree for translation purposes.
//  You thought you could cheat the answers, eh?

//  Syntax:
//  0171_Stranger_BlackBox( difficulty )
//  Where difficulty can be EASY, MEDIUM or HARD.
//  Returns 1 on success, 0 on failure.
function	script	0171_Stranger_BlackBox	{
    switch (getarg(0)) {
        case EASY:
            setarray .@q$, l("Are you cheating?"), l("Should we blame Saulc for bugs?");
            setarray .@r$, "no", "yes";
            setarray .@l$, l("no"), l("yes");
            break;
        case MEDIUM:
            setarray .@q$, l("Are you cheating?"), l("Should we blame Saulc for bugs?");
            setarray .@r$, "no", "yes";
            setarray .@l$, l("no"), l("yes");
            break;
        case HARD:
            setarray .@q$, l("Are you cheating?"), l("Should we blame Saulc for bugs?");
            setarray .@r$, "no", "yes";
            setarray .@l$, l("no"), l("yes");
            break;
        default: return 0;
    }

    .@e=rand(getarraysize(.@q$)-1);
    mesq .@q$[.@e];
    input .@ans$;

    return riddlevalidation(.@ans$, .@r$[.@e], .@l$[.@e]);
}