diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-12-06 00:08:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-12-06 00:08:51 +0300 |
commit | 28fdcc18ff9c80fea20414482ecc7c74fd0bf9cf (patch) | |
tree | 87386b5cf5b45b1e72fcdb80a0492c863c279473 /npc/functions | |
parent | 8ea7823761b86aa9fec47a47cc208b7f24ed8f29 (diff) | |
download | serverdata-28fdcc18ff9c80fea20414482ecc7c74fd0bf9cf.tar.gz serverdata-28fdcc18ff9c80fea20414482ecc7c74fd0bf9cf.tar.bz2 serverdata-28fdcc18ff9c80fea20414482ecc7c74fd0bf9cf.tar.xz serverdata-28fdcc18ff9c80fea20414482ecc7c74fd0bf9cf.zip |
Remove extra parameter from function getnpcid
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/fishing.txt | 4 | ||||
-rw-r--r-- | npc/functions/main.txt | 4 | ||||
-rw-r--r-- | npc/functions/npcmove.txt | 2 | ||||
-rw-r--r-- | npc/functions/npcmovegraph.txt | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index f1782f3e..dcf4ac02 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -183,7 +183,7 @@ function script fishing { .@fish_id = relative_array_random(getvariableofnpc(.fish_ids[0], .@npc$)); // RNG to obtain a fish - if (rand(gettimetick(0) - @fishing_tick) <= .@pull_rand_max + (100 * @FISHING_BOOSTER[getnpcid(0)])) + if (rand(gettimetick(0) - @fishing_tick) <= .@pull_rand_max + (100 * @FISHING_BOOSTER[getnpcid()])) { specialeffect(.@success_fx, SELF, playerattached()); // event success @@ -244,7 +244,7 @@ function script fishing { if (getvariableofnpc(.bait_ids[.@i], .@npc$) == .@bait) { .@bait_c = true; - @FISHING_BOOSTER[getnpcid(0)] = getvariableofnpc(.bait_ids[.@i + 1], .@npc$); + @FISHING_BOOSTER[getnpcid()] = getvariableofnpc(.bait_ids[.@i + 1], .@npc$); break; } } diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 97c34702..b620be0c 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -183,9 +183,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 eb6acded..612ab036 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 b26f9a16..d03f15c5 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; |