Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit b6925d6

Browse files
tannerdinotannerdino
andauthored
fix(content): add npc_walk(npc_coord)'s to npc_setmode(none)'s (#1759)
Co-authored-by: tannerdino <tannerdino@gmail.com>
1 parent 2f996bc commit b6925d6

File tree

23 files changed

+46
-1
lines changed

23 files changed

+46
-1
lines changed

data/src/scripts/_test/scripts/cheats/cheat_interactions.rs2

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ mes("Test 1: AP to OP Switching");
8585
npc_add(movecoord(coord, 0, 0, 5), cow, 10);
8686
%npc_lastcombat = add(map_clock, 10);
8787
npc_setmode(none);
88+
npc_walk(npc_coord);
8889
queue(reset_itest, 10);
8990
p_delay(2);
9091
p_opnpc(2);
@@ -93,6 +94,7 @@ p_opnpc(2);
9394
mes("Test 2: Blocking an Npc and then unblocking");
9495
npc_add(movecoord(coord, -5, 0, -1), goblin, 10);
9596
npc_setmode(none);
97+
npc_walk(npc_coord);
9698
npc_walk(movecoord(npc_coord, 10, 0, 0));
9799
p_delay(2);
98100
p_walk(movecoord(coord, 0, 0, -1));
@@ -119,6 +121,7 @@ queue(reset_itest, 15);
119121
mes("Test 6 (manual): Clicking an Npc then clicking away before reaching");
120122
npc_add(movecoord(coord, 0, 0, 5), goblin, 10);
121123
npc_setmode(none);
124+
npc_walk(npc_coord);
122125

123126
[proc,clicking_an_obj_then_clicking_away_before_reaching]
124127
mes("Test 7 (manual): Clicking an obj then clicking away before reaching");
@@ -179,6 +182,7 @@ queue(reset_itest, 10);
179182
mes("Test 16 (manual): Magic Fire Bolt while underneath the Npc");
180183
npc_add(movecoord(coord, 0, 0, 1), goblin, 10);
181184
npc_setmode(none);
185+
npc_walk(npc_coord);
182186

183187
inv_clear(inv);
184188

@@ -194,6 +198,7 @@ p_teleport(movecoord(coord, 0, 0, 1));
194198
mes("Test 17 (manual): Not blocking Npcs when logged in without moving");
195199
npc_add(movecoord(coord, -5, 0, 0), goblin, 10);
196200
npc_setmode(none);
201+
npc_walk(npc_coord);
197202
npc_walk(movecoord(npc_coord, 10, 0, 0));
198203

199204
queue(reset_itest, 12);
@@ -203,6 +208,7 @@ p_delay(12);
203208
mes("Test 18 (manual): Npc Modes in action.");
204209
npc_add(movecoord(coord, 0, 0, 1), civilian_blonde, 30);
205210
npc_setmode(none);
211+
npc_walk(npc_coord);
206212
p_opnpc(1);
207213
world_delay(0);
208214
npc_walk(movecoord(npc_coord, 0, 0, 1));
@@ -239,6 +245,7 @@ queue(reset_itest, 20);
239245
mes("Test 21 (manual): Walking and equipping an Obj continues walking while targetting");
240246
npc_add(movecoord(coord, 0, 0, 7), goblin, 20);
241247
npc_setmode(none);
248+
npc_walk(npc_coord);
242249

243250
inv_clear(inv);
244251
inv_add(inv, bronze_axe, 1);
@@ -264,6 +271,7 @@ if_settabactive(^tab_wornitems);
264271

265272
npc_add(movecoord(coord, 0, 0, 7), goblin, 20);
266273
npc_setmode(none);
274+
npc_walk(npc_coord);
267275
queue(reset_itest, 20);
268276

269277
[proc,walking_and_unequipping_obj_continues_walk]
@@ -306,6 +314,7 @@ p_opnpc(2);
306314
mes("Test 28: Pathing to an Npc as it does changetype command");
307315
npc_add(movecoord(coord, 0, 0, 10), goblin, 10);
308316
npc_setmode(none);
317+
npc_walk(npc_coord);
309318

310319
queue(reset_itest, 10);
311320

@@ -321,6 +330,7 @@ npc_changetype_keepall(cow, 400);
321330
mes("Test 29: Repathing to an Npc on your last waypoint");
322331
npc_add(movecoord(coord, 12, 0, 3), goblin, 20);
323332
npc_setmode(none);
333+
npc_walk(npc_coord);
324334

325335
queue(reset_itest, 20);
326336

@@ -342,6 +352,7 @@ if (loc_find(0_50_50_38_10, loc_1533) = true) {
342352
}
343353
npc_add(movecoord(coord, 3, 0, 0), goblin, 20);
344354
npc_setmode(none);
355+
npc_walk(npc_coord);
345356

346357
queue(reset_itest, 20);
347358

@@ -394,6 +405,7 @@ if (p_finduid(uid) = true) {
394405
mes("Test 33: opnpc to p_walk");
395406
npc_add(movecoord(coord, -1, 0, -1), gnome_cheerleader, 10);
396407
npc_setmode(none);
408+
npc_walk(npc_coord);
397409
queue(reset_itest, 10);
398410
p_delay(1);
399411
p_opnpc(1);
@@ -402,6 +414,7 @@ p_opnpc(1);
402414
mes("Test 34: apnpc to p_walk");
403415
npc_add(movecoord(coord, -1, 0, -1), savage_bird, 10);
404416
npc_setmode(none);
417+
npc_walk(npc_coord);
405418
queue(reset_itest, 10);
406419
p_delay(1);
407420
p_opnpc(2);

data/src/scripts/areas/area_mage_arena/scripts/kolodion_fight.rs2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ if (npc_findhero = ^false) {
2929
}
3030
%magearena = 2;
3131
npc_setmode(none);
32+
npc_walk(npc_coord);
3233
npc_anim(human_castteleport, 30);
3334
npc_delay(2);
3435

@@ -52,6 +53,7 @@ if (npc_findhero = ^false) {
5253
}
5354
%magearena = 3;
5455
npc_setmode(none);
56+
npc_walk(npc_coord);
5557
npc_anim(giant_teleport, 30);
5658
npc_delay(2);
5759

@@ -75,6 +77,7 @@ if (npc_findhero = ^false) {
7577
}
7678
%magearena = 4;
7779
npc_setmode(none);
80+
npc_walk(npc_coord);
7881
npc_anim(giantspider_teleport, 30);
7982
npc_delay(2);
8083

@@ -98,6 +101,7 @@ if (npc_findhero = ^false) {
98101
}
99102
%magearena = 5;
100103
npc_setmode(none);
104+
npc_walk(npc_coord);
101105
npc_anim(human_castteleport, 30);
102106
npc_delay(2);
103107

@@ -124,6 +128,7 @@ npc_delay(0);
124128
%magearena = ^mage_arena_complete;
125129
npc_delay(1);
126130
npc_setmode(none);
131+
npc_walk(npc_coord);
127132
npc_anim(demon_portalend, 30);
128133
spotanim_map(smokepuff_large, npc_coord, 124, 90);
129134
npc_delay(2);

data/src/scripts/macro events/scripts/general/macro_event_triffid.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[proc,macro_event_triffid_spawn]
22
npc_setmode(none);
3+
npc_walk(npc_coord);
34
npc_anim(triffid_grow, 0);
45
%npc_int = ^triffid_growing;
56
%npc_macro_event_target = uid;

data/src/scripts/minigames/game_trawler/scripts/murphy_at_sea.rs2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ if (~inzone_coord_pair_table(trawler_nonflood_zones, coord) = true) {
4646

4747
[label,murphy_cry]
4848
npc_setmode(none);
49+
npc_walk(npc_coord);
4950
npc_delay(0);
5051
npc_anim(emote_cry, 0);
5152
npc_delay(1);
5253
npc_setmode(patrol);
5354

5455
[label,murphy_cheer]
5556
npc_setmode(none);
57+
npc_walk(npc_coord);
5658
npc_delay(0);
5759
npc_anim(emote_cheer, 0);
5860
npc_delay(2);

data/src/scripts/quests/quest_arena/scripts/hengrad.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if(%arena_progress = ^arena_sent_jail) {
1919
// https://youtu.be/NHsQfeSPUb0?si=c_S0jTnjDBF0xilE&t=189
2020
npc_add(0_40_49_26_4, khazard_guard_cutscene, 100);
2121
npc_setmode(none);
22+
npc_walk(npc_coord);
2223
p_delay(0);
2324
// https://youtu.be/Y6eWjQnV4Mo?si=7aaHIhL6qoxCuntZ&t=170 the guard can get stuck at any point, doesnt interrupt anything
2425
npc_walk(0_40_49_39_5);

data/src/scripts/quests/quest_arena/scripts/jeremy_servil.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ facesquare(movecoord(coord, 0, 0, -16));
7070
// idk if this is how they checked it, maybe there's a bettter way
7171
if(npc_getmode ! none & inzone(0_40_49_54_30, 0_40_49_56_34, npc_coord) = true) {
7272
npc_setmode(none);
73+
npc_walk(npc_coord);
7374
npc_queue(10, $delay, 0);
7475
}
7576
npc_setmode(null);

data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
if (.npc_find(npc_coord, bloated_toad, 2, ^vis_lineofwalk) = true) {
2121
npc_sethuntmode(null);
2222
npc_setmode(none);
23+
npc_walk(npc_coord);
2324
npc_facesquare(.npc_coord);
2425
npc_queue(5, 0, 0);
2526
.npc_queue(5, 0, 0);

data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
350350
npc_say("Hey, dere's da chompy, I's gonna shoot it.");
351351
npc_facesquare(.npc_coord);
352352
npc_setmode(none);
353+
npc_walk(npc_coord);
353354
npc_queue(11, 0, 2);
354355
npc_settimer(calc(10 + (random(6) * 2)));
355356
return;

data/src/scripts/quests/quest_fluffs/scripts/quest_fluffs.rs2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ if (last_useitem = bucket_milk) {
230230
inv_del(inv, gertrudekittens, 1);
231231
anim(human_pickupfloor, 0);
232232
npc_setmode(none);
233+
npc_walk(npc_coord);
233234
.npc_add(coord, lost_kitten, ^max_32bit_int);
234235
.npc_setmode(none);
236+
.npc_walk(.npc_coord);
235237
p_delay(1);
236238
npc_say("Purr...");
237239
p_delay(0);
@@ -298,6 +300,7 @@ mes("You can hear kittens mewing close by...");
298300
inv_delslot(inv, last_slot);
299301
npc_add(coord, lost_kitten, 10);
300302
npc_setmode(none);
303+
npc_walk(npc_coord);
301304
p_delay(0);
302305
mes("You place the kitten on the floor.");
303306
p_delay(0);

data/src/scripts/quests/quest_grandtree/scripts/foreman.rs2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if(inzone(0_46_47_0_0, 0_46_47_32_63, npc_coord) = true) {
1515
~chatnpc("<p,neutral>Follow me.");
1616
if_close;
1717
npc_setmode(none);
18+
npc_walk(npc_coord);
1819
p_delay(0);
1920
npc_walk(0_46_47_45_40);
2021
p_delay(1);

0 commit comments

Comments
 (0)