diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/000-1/chest.txt | 4 | ||||
-rw-r--r-- | npc/000-2-1/chest.txt | 4 | ||||
-rw-r--r-- | npc/001-2-22/chest.txt | 4 | ||||
-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 | ||||
-rw-r--r-- | npc/test/npc1.txt | 6 |
8 files changed, 16 insertions, 16 deletions
diff --git a/npc/000-1/chest.txt b/npc/000-1/chest.txt index 46f626a3..511023e0 100644 --- a/npc/000-1/chest.txt +++ b/npc/000-1/chest.txt @@ -25,7 +25,7 @@ getitem OldBook, 1; } - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing + specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing .busy = true; // lock until available again initnpctimer; @@ -53,7 +53,7 @@ OnUnTouch: OnTimer30000: .busy = true; .dir = 6; // closing - specialeffect(25, AREA, getnpcid(0)); // closing + specialeffect(25, AREA, getnpcid()); // closing setnpctimer 0; OnTouch: end; diff --git a/npc/000-2-1/chest.txt b/npc/000-2-1/chest.txt index 3f565521..f9ec2742 100644 --- a/npc/000-2-1/chest.txt +++ b/npc/000-2-1/chest.txt @@ -33,7 +33,7 @@ npctalk3 l("You take the clothes from the chest."); } - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing + specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing .busy = true; // lock the animation initnpctimer; @@ -61,7 +61,7 @@ OnUnTouch: OnTimer30000: .busy = true; .dir = 6; // closing - specialeffect(25, AREA, getnpcid(0)); // closing + specialeffect(25, AREA, getnpcid()); // closing setnpctimer 0; OnTouch: end; diff --git a/npc/001-2-22/chest.txt b/npc/001-2-22/chest.txt index 010f5a79..69e8a8af 100644 --- a/npc/001-2-22/chest.txt +++ b/npc/001-2-22/chest.txt @@ -10,7 +10,7 @@ if (.busy == false) { - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing + specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing .busy = true; // lock until available again initnpctimer; @@ -38,7 +38,7 @@ OnUnTouch: OnTimer30000: .busy = true; .dir = 6; // closing - specialeffect(25, AREA, getnpcid(0)); // closing + specialeffect(25, AREA, getnpcid()); // closing setnpctimer 0; OnTouch: end; 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; diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt index f6777f48..38a03142 100644 --- a/npc/test/npc1.txt +++ b/npc/test/npc1.txt @@ -625,15 +625,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: |