From 617fdebfb1b25a4da72a71e018d68cc403fba620 Mon Sep 17 00:00:00 2001 From: Reid Date: Tue, 15 Nov 2016 11:06:10 +0100 Subject: Add a generic NPC template for NPCs with multiple random sentences. --- server/sample/npc_generic_random.txt | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 server/sample/npc_generic_random.txt diff --git a/server/sample/npc_generic_random.txt b/server/sample/npc_generic_random.txt new file mode 100644 index 0000000..5295190 --- /dev/null +++ b/server/sample/npc_generic_random.txt @@ -0,0 +1,42 @@ +// Evol scripts. +// Authors: +// Reid +// +// Description: +// Template for a generic non-important NPC. + +001-1,89,86,0 script NPC Name NPC_NO_SPRITE,{ // Set the NPC location and sprite ID. + + function esperia_city + { + speech + l("This text is displayed on the NPC dialog window."), + l("You can use multiple lines, it is clearer than using an infinite amount of mes, mesn, mesq, next functions."), + + return; + } + + function not_so_loud + { + npctalkonce l("This text is displayed over the NPC's head."); + + return; + } + + switch (rand(2)) + { + case 0: + dialog_npctalk(); + break; + case 1: + dialog_speech(); + break; + } + + close; + +OnInit: + .sex = G_OTHER; // Set the NPC gender here. + .distance = 2; // Set the NPC max distance here. + end; +} -- cgit v1.2.3-70-g09d2