From b35d6a3bf22f5d2e2e870e1c01c915494a41704d Mon Sep 17 00:00:00 2001 From: Joseph Botosh Date: Wed, 23 Sep 2015 21:01:14 +0300 Subject: add debugnpc function --- npc/functions/main.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'npc') diff --git a/npc/functions/main.txt b/npc/functions/main.txt index f0811632..b78c9433 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -95,3 +95,11 @@ function script speech { } return; } + + +// Show debug message if .debug variable of NPC is set to 1 +function script npcdebug { + if (getvariableofnpc(.debug, strnpcinfo(3))) + debugmes strnpcinfo(3) + ": " + getarg(0); + return; +} -- cgit v1.2.3-70-g09d2