From a32d82edf79e293b09874e4cd2bdcebbc5daf9e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 5 May 2015 01:06:21 +0300 Subject: Into npc move program add command "speed" --- npc/functions/npcmove.txt | 5 +++++ npc/test/npc4.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/npc/functions/npcmove.txt b/npc/functions/npcmove.txt index 346549fc..907c2098 100644 --- a/npc/functions/npcmove.txt +++ b/npc/functions/npcmove.txt @@ -69,6 +69,11 @@ function script domoveaction { getmapxy(.@mapName$, .@x, .@y, 1); npcwalkto .@x + getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)), .@y + getvariableofnpc(.movepathy[.@pos], strnpcinfo(3)); } + else if (.@cmd$ == "speed") + { + npcspeed getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); + return 2; + } return 1; } diff --git a/npc/test/npc4.txt b/npc/test/npc4.txt index 4d54532b..a0558288 100644 --- a/npc/test/npc4.txt +++ b/npc/test/npc4.txt @@ -21,10 +21,12 @@ OnInit: "move", 25, 20, "emote", 3, 0, "class", 104, 0, + "speed", 100, 0, "wait", 2, 0, "move", 22, 10, "rmove", 3, 3, "class", 801, 0, + "speed", 200, 0, "wait", 1, 0, "warp", 22, 30, "goto", 0, 0; -- cgit v1.2.3-70-g09d2