From d95b7707c57c8697dd523370dcab163947a60c84 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Dec 2018 00:48:59 -0200 Subject: Hercules Update (needed for pipelines) --- npc/functions/main.txt | 4 ++-- npc/functions/npcmove.txt | 2 +- npc/functions/npcmovegraph.txt | 4 ++-- npc/test/npc1.txt | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'npc') diff --git a/npc/functions/main.txt b/npc/functions/main.txt index b1777cb3d..38034980e 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -221,9 +221,9 @@ function script npctalkonce { set(getvariableofnpc(.talk_lock, strnpcinfo(NPC_NAME_UNIQUE)), gettimetick(2) + getarg(1, 1)); break; default: - if (gettimetick(2) <= @NPC_TALK_LOCK[getnpcid(0)]) + if (gettimetick(2) <= @NPC_TALK_LOCK[getnpcid()]) return false; - @NPC_TALK_LOCK[getnpcid(0)] = gettimetick(2) + getarg(1, 1); + @NPC_TALK_LOCK[getnpcid()] = gettimetick(2) + getarg(1, 1); } // talk mechanism diff --git a/npc/functions/npcmove.txt b/npc/functions/npcmove.txt index eb6acded0..612ab0361 100644 --- a/npc/functions/npcmove.txt +++ b/npc/functions/npcmove.txt @@ -47,7 +47,7 @@ function script domoveaction { } else if (.@cmd$ == "emote") { - unitemote getnpcid(0), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); + unitemote getnpcid(), getvariableofnpc(.movepathx[.@pos], strnpcinfo(3)); return 2; } else if (.@cmd$ == "class") diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt index b26f9a162..d03f15c53 100644 --- a/npc/functions/npcmovegraph.txt +++ b/npc/functions/npcmovegraph.txt @@ -115,7 +115,7 @@ function script execmovecmd { } else if (.@cmd$[0] == "emote") { - unitemote getnpcid(0), atoi(.@cmd$[1]); + unitemote getnpcid(), atoi(.@cmd$[1]); } else if (.@cmd$[0] == "class") { @@ -137,7 +137,7 @@ function script execmovecmd { .@x = getvariableofnpc(.movepos_x1[.@pos], strnpcinfo(3)); .@y = getvariableofnpc(.movepos_y1[.@pos], strnpcinfo(3)); if (getstrlen(.@map$) > 0) - unitwarp getnpcid(0), .@map$, .@x, .@y; + unitwarp getnpcid(), .@map$, .@x, .@y; else movenpc strnpcinfo(3), .@x, .@y; set getvariableofnpc(.movepos, strnpcinfo(3)), .@pos; diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt index e19ffb66e..2969a09c4 100644 --- a/npc/test/npc1.txt +++ b/npc/test/npc1.txt @@ -629,15 +629,15 @@ L_Start: setunitdata(.@npcId, UDT_HAIRCOLOR, 17); break; case 2: - .@npcId = getnpcid(0, "npc4"); + .@npcId = getnpcid("npc4"); setunitdata(.@npcId, UDT_HAIRSTYLE, 0); break; case 3: - .@npcId = getnpcid(0, "npc4"); + .@npcId = getnpcid("npc4"); setunitdata(.@npcId, UDT_HEADTOP, 1301); break; case 4: - .@npcId = getnpcid(0, "npc4"); + .@npcId = getnpcid("npc4"); setunitdata(.@npcId, UDT_HEADTOP, 0); break; case 5: -- cgit v1.2.3-70-g09d2