From 29e5e55df71dd3badd4036792fd43772c3cff005 Mon Sep 17 00:00:00 2001 From: mekolat Date: Sat, 7 May 2016 19:51:26 -0400 Subject: add @npctalk command --- world/map/npc/commands/npctalk.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 world/map/npc/commands/npctalk.txt (limited to 'world/map/npc/commands/npctalk.txt') diff --git a/world/map/npc/commands/npctalk.txt b/world/map/npc/commands/npctalk.txt new file mode 100644 index 00000000..215e91ca --- /dev/null +++ b/world/map/npc/commands/npctalk.txt @@ -0,0 +1,23 @@ +-|script|@npctalk|32767 +{ + callfunc "argv_splitter"; + if (GM < CMD_NPCTALK && GM < G_SYSOP) goto L_GM; + if (@argv$[0] == "" || @argv$[1] == "") goto L_Failed; + if (getnpcid(@argv$[0]) < 1) goto L_Failed; + + gmlog "@npctalk " + @args$; + npctalk @argv$[0], @argv$[1]; + end; + +L_Failed: + message strcharinfo(0), "npctalk : Impossible to attach to the target npc. Did you try putting the name in \"quotation marks\"?"; + end; + +L_GM: + message strcharinfo(0), "npctalk : GM command is level "+ CMD_NPCTALK +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "npctalk", strnpcinfo(0); + end; +} -- cgit v1.2.3-60-g2f50