From e6d90c3efce2a81f1e63b2cd16fb6e9dff63ec46 Mon Sep 17 00:00:00 2001 From: Reid Date: Sun, 17 Jan 2016 02:36:08 +0100 Subject: Add a lock to prevent NPC spamming on lucas. --- npc/001-1/lucas.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/npc/001-1/lucas.txt b/npc/001-1/lucas.txt index 8d8c2715..225b14d7 100644 --- a/npc/001-1/lucas.txt +++ b/npc/001-1/lucas.txt @@ -6,7 +6,16 @@ 001-1,59,44,0 script Lucas#001-1 NPC_LUCAS,{ - villagertalk; + function randomTalk { + if (Repeat_NPC_lock <= gettimetick(2)) + { + Repeat_NPC_lock = gettimetick(2) + 2; + debugmes "ACCEPTED"; + villagertalk; + } + } + + randomTalk; closedialog; close; -- cgit v1.2.3-70-g09d2