summaryrefslogtreecommitdiff
path: root/npc/functions/asleep.txt
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-08-20 12:25:41 -0400
committergumi <mekolat@users.noreply.github.com>2017-08-22 11:45:09 -0400
commit2c87bb38c881639bed963e7933a1e9d9c2e8e6a3 (patch)
treed9e26c7592316293f333a7384c6f9a92b2afe8bd /npc/functions/asleep.txt
parente9c90337a6057b66faad6759ff418e8a5f162cfe (diff)
downloadserverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.gz
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.bz2
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.tar.xz
serverdata-2c87bb38c881639bed963e7933a1e9d9c2e8e6a3.zip
fix the npc talk lock mechanism, make some other npcs use it
Diffstat (limited to 'npc/functions/asleep.txt')
-rw-r--r--npc/functions/asleep.txt18
1 files changed, 8 insertions, 10 deletions
diff --git a/npc/functions/asleep.txt b/npc/functions/asleep.txt
index 4905f329..aa5abd63 100644
--- a/npc/functions/asleep.txt
+++ b/npc/functions/asleep.txt
@@ -8,14 +8,12 @@
// .@rand = Random number between the number of "sleeping" choice.
function script asleep {
- closedialog;
-
- .@rand = rand(5);
- if (.@rand == 0) npctalk3 l("Zzzzzzzzz...");
- else if (.@rand == 1) npctalk3 l("Rrrr... Pchhhh...");
- else if (.@rand == 2) npctalk3 l("Ggrmm... Grmmmm...");
- else if (.@rand == 3) npctalk3 l("Hm... Shhhh...");
- else emotion E_SLEEPY;
-
- close;
+ switch(rand(5)) {
+ case 0: npctalkonce(l("Zzzzzzzzz...")); break;
+ case 1: npctalkonce(l("Rrrr... Pchhhh...")); break;
+ case 2: npctalkonce(l("Ggrmm... Grmmmm...")); break;
+ case 3: npctalkonce(l("Hm... Shhhh...")); break;
+ default: emotion(E_SLEEPY);
+ }
+ end;
}