From ec77ba63547aaa399c2feedd3b506371515afcd0 Mon Sep 17 00:00:00 2001 From: Reid Date: Mon, 20 Jun 2016 03:21:22 +0200 Subject: Add a hello script function. --- npc/functions/hello.txt | 23 +++++++++++++++++++++++ npc/scripts.conf | 1 + 2 files changed, 24 insertions(+) create mode 100644 npc/functions/hello.txt diff --git a/npc/functions/hello.txt b/npc/functions/hello.txt new file mode 100644 index 00000000..162a953e --- /dev/null +++ b/npc/functions/hello.txt @@ -0,0 +1,23 @@ +// Evol functions. +// Authors: +// Reid +// Description: +// Tell a random greeting sentence. + +function script hello { + + switch (rand(2)) + { + case 0: + npctalk3 l("Heya!"); + break; + case 1: + npctalk3 l("Hi."); + break; + case 2: + npctalk3 l("Nice day to you."); + break; + } + + return; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index cee9409d..08e851d3 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -14,6 +14,7 @@ npc: npc/functions/doors.txt npc: npc/functions/goodbye.txt npc: npc/functions/hammocks.txt npc: npc/functions/harbours.txt +npc: npc/functions/hello.txt npc: npc/functions/inventoryplace.txt npc: npc/functions/marriage.txt npc: npc/functions/npcmove.txt -- cgit v1.2.3-70-g09d2