summaryrefslogtreecommitdiff
path: root/localserver
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-29 01:43:23 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-29 01:43:23 -0200
commit46d5eca1ce544fb904460cb18cadd7053878d1e5 (patch)
treec92dcb4c948d5d3f77cbdc8c8b3510ba3e9e4447 /localserver
parent27bb73c645b15d52957b1da8c19eec9a084b5850 (diff)
downloadtools-46d5eca1ce544fb904460cb18cadd7053878d1e5.tar.gz
tools-46d5eca1ce544fb904460cb18cadd7053878d1e5.tar.bz2
tools-46d5eca1ce544fb904460cb18cadd7053878d1e5.tar.xz
tools-46d5eca1ce544fb904460cb18cadd7053878d1e5.zip
Stranger Blackbox infrastructure.
Want answers? Go google or DuckDuckGo.
Diffstat (limited to 'localserver')
-rw-r--r--localserver/npc/017-1_stranger_blackbox.txt32
1 files changed, 29 insertions, 3 deletions
diff --git a/localserver/npc/017-1_stranger_blackbox.txt b/localserver/npc/017-1_stranger_blackbox.txt
index 16f9f23..ba324fd 100644
--- a/localserver/npc/017-1_stranger_blackbox.txt
+++ b/localserver/npc/017-1_stranger_blackbox.txt
@@ -7,8 +7,34 @@
// 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 {
- mesc l("Check if black boxes won't bust language system!");
- mesc l("Translators: No need to translate this string. It'll be removed.");
- return;
+ switch (getarg(0)) {
+ case EASY:
+ setarray .@q$, l("Are you cheating?");
+ setarray .@r$, "no";
+ setarray .@l$, l("no");
+ break;
+ case MEDIUM:
+ setarray .@q$, l("Are you cheating?");
+ setarray .@r$, "no";
+ setarray .@l$, l("no");
+ break;
+ case HARD:
+ setarray .@q$, l("Are you cheating?");
+ setarray .@r$, "no";
+ setarray .@l$, l("no");
+ break;
+ default: return 0;
+ }
+
+ .@e=rand(getarraysize(.@q$));
+ mesq .@q$[.@e];
+ input .@ans$;
+
+ return riddlevalidation(.@ans$, .@r$[.@e], .@l$[.@e]);
}
+