summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/npcmovegraph.txt25
1 files changed, 23 insertions, 2 deletions
diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt
index 1db945fb..dedd14fe 100644
--- a/npc/functions/npcmovegraph.txt
+++ b/npc/functions/npcmovegraph.txt
@@ -98,6 +98,14 @@ function script execmovecmd {
{
setnpcdir atoi(.@cmd$[1]);
}
+ else if (.@cmd$[0] == "sit")
+ {
+ npcsit;
+ }
+ else if (.@cmd$[0] == "stand")
+ {
+ npcstand;
+ }
else if (.@cmd$[0] == "wait")
{
set getvariableofnpc(.waitticks, strnpcinfo(3)), atoi(.@cmd$[1]);
@@ -113,10 +121,23 @@ function script execmovecmd {
}
else if (.@cmd$[0] == "warp")
{
- .@pos = findmovegraphlabel(.@cmd$[1]);
+ .@pos = -1;
+ .@map$ = "";
+ .@pos_idx = 1;
+ if (getarraysize(.@cmd$) == 3)
+ {
+ .@map$ = .@cmd$[1];
+ .@pos_idx = 2;
+ }
+ .@pos = findmovegraphlabel(.@cmd$[.@pos_idx]);
if (.@pos > 0)
{
- movenpc strnpcinfo(3), getvariableofnpc(.movepos_x1[.@pos], strnpcinfo(3)), getvariableofnpc(.movepos_y1[.@pos], strnpcinfo(3));
+ .@x = getvariableofnpc(.movepos_x1[.@pos], strnpcinfo(3));
+ .@y = getvariableofnpc(.movepos_y1[.@pos], strnpcinfo(3));
+ if (getstrlen(.@map$) > 0)
+ unitwarp getnpcid(0), .@map$, .@x, .@y;
+ else
+ movenpc strnpcinfo(3), .@x, .@y;
set getvariableofnpc(.movepos, strnpcinfo(3)), .@pos;
}
else