From 150bff5ebcf8118bbcc48d0db9fab73f01cedc7d Mon Sep 17 00:00:00 2001 From: Reid Date: Sun, 17 Jan 2016 02:34:58 +0100 Subject: Add else if instead of many if on asleep function. --- npc/functions/asleep.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'npc/functions/asleep.txt') diff --git a/npc/functions/asleep.txt b/npc/functions/asleep.txt index 35a6f5c4..0f981148 100644 --- a/npc/functions/asleep.txt +++ b/npc/functions/asleep.txt @@ -8,12 +8,14 @@ // .@rand = Random number between the number of "sleeping" choice. function script asleep { + closedialog; - .@rand = rand(3); + .@rand = rand(5); if (.@rand == 0) npctalk3 l("Zzzzzzzzz..."); - if (.@rand == 1) npctalk3 l("Rrrr... Pchhhh..."); - if (.@rand == 2) npctalk3 l("Ggrmm... Grmmmm..."); - if (.@rand == 3) npctalk3 l("Hm..."); + else if (.@rand == 1) npctalk3 l("Rrrr... Pchhhh..."); + else if (.@rand == 2) npctalk3 l("Ggrmm... Grmmmm..."); + else if (.@rand == 3) npctalk3 l("Hm..."); + else emotion 105; // Sleepy close; } -- cgit v1.2.3-60-g2f50