summaryrefslogtreecommitdiff
path: root/localserver/npc/017-1_stranger_blackbox.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 23:45:19 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 23:45:19 -0300
commitc2ccb14ffff0e45398365e19dfd2874307ddb943 (patch)
tree976eaea586fb8f1ee0ab8cae67c69071aed8b952 /localserver/npc/017-1_stranger_blackbox.txt
downloadtools-c2ccb14ffff0e45398365e19dfd2874307ddb943.tar.gz
tools-c2ccb14ffff0e45398365e19dfd2874307ddb943.tar.bz2
tools-c2ccb14ffff0e45398365e19dfd2874307ddb943.tar.xz
tools-c2ccb14ffff0e45398365e19dfd2874307ddb943.zip
Initial commit
Diffstat (limited to 'localserver/npc/017-1_stranger_blackbox.txt')
-rw-r--r--localserver/npc/017-1_stranger_blackbox.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/localserver/npc/017-1_stranger_blackbox.txt b/localserver/npc/017-1_stranger_blackbox.txt
new file mode 100644
index 0000000..bdd444d
--- /dev/null
+++ b/localserver/npc/017-1_stranger_blackbox.txt
@@ -0,0 +1,40 @@
+// 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]);
+}
+