summaryrefslogtreecommitdiff
path: root/localserver/npc/026-5_blackbox.txt
blob: 226821e67dec55eab615b2ebbd74fa02782f6d51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//   The Impregnable Fortress Control Files - Riddle Blackbox
// Quest: General_Fortress
//  (MaxFloor+2, internal, internal)

//  Syntax:
//  0235_Riddle_BlackBox( {riddle_id} )
//  Returns true on success, false on failure.
function	script	0235_Riddle_BlackBox	{
    setarray .@q$, "I have no questions for now";
    setarray .@r$, "";
    setarray .@l$, l("");
    .@id = miller_rand(getarg(0), getcharid(0), getarraysize(.@q$)-1);

    // Question, then answer is input, and returns
    mesq l(.@q$);
    next;
    mes "";
    input .@ans$;

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