Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data/src/scripts/_test/scripts/cheats/cheat_interactions.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ mes("Test 1: AP to OP Switching");
npc_add(movecoord(coord, 0, 0, 5), cow, 10);
%npc_lastcombat = add(map_clock, 10);
npc_setmode(none);
npc_walk(npc_coord);
queue(reset_itest, 10);
p_delay(2);
p_opnpc(2);
Expand All @@ -93,6 +94,7 @@ p_opnpc(2);
mes("Test 2: Blocking an Npc and then unblocking");
npc_add(movecoord(coord, -5, 0, -1), goblin, 10);
npc_setmode(none);
npc_walk(npc_coord);
npc_walk(movecoord(npc_coord, 10, 0, 0));
p_delay(2);
p_walk(movecoord(coord, 0, 0, -1));
Expand All @@ -119,6 +121,7 @@ queue(reset_itest, 15);
mes("Test 6 (manual): Clicking an Npc then clicking away before reaching");
npc_add(movecoord(coord, 0, 0, 5), goblin, 10);
npc_setmode(none);
npc_walk(npc_coord);

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

inv_clear(inv);

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

queue(reset_itest, 12);
Expand All @@ -203,6 +208,7 @@ p_delay(12);
mes("Test 18 (manual): Npc Modes in action.");
npc_add(movecoord(coord, 0, 0, 1), civilian_blonde, 30);
npc_setmode(none);
npc_walk(npc_coord);
p_opnpc(1);
world_delay(0);
npc_walk(movecoord(npc_coord, 0, 0, 1));
Expand Down Expand Up @@ -239,6 +245,7 @@ queue(reset_itest, 20);
mes("Test 21 (manual): Walking and equipping an Obj continues walking while targetting");
npc_add(movecoord(coord, 0, 0, 7), goblin, 20);
npc_setmode(none);
npc_walk(npc_coord);

inv_clear(inv);
inv_add(inv, bronze_axe, 1);
Expand All @@ -264,6 +271,7 @@ if_settabactive(^tab_wornitems);

npc_add(movecoord(coord, 0, 0, 7), goblin, 20);
npc_setmode(none);
npc_walk(npc_coord);
queue(reset_itest, 20);

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

queue(reset_itest, 10);

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

queue(reset_itest, 20);

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

queue(reset_itest, 20);

Expand Down Expand Up @@ -394,6 +405,7 @@ if (p_finduid(uid) = true) {
mes("Test 33: opnpc to p_walk");
npc_add(movecoord(coord, -1, 0, -1), gnome_cheerleader, 10);
npc_setmode(none);
npc_walk(npc_coord);
queue(reset_itest, 10);
p_delay(1);
p_opnpc(1);
Expand All @@ -402,6 +414,7 @@ p_opnpc(1);
mes("Test 34: apnpc to p_walk");
npc_add(movecoord(coord, -1, 0, -1), savage_bird, 10);
npc_setmode(none);
npc_walk(npc_coord);
queue(reset_itest, 10);
p_delay(1);
p_opnpc(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if (npc_findhero = ^false) {
}
%magearena = 2;
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(human_castteleport, 30);
npc_delay(2);

Expand All @@ -52,6 +53,7 @@ if (npc_findhero = ^false) {
}
%magearena = 3;
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(giant_teleport, 30);
npc_delay(2);

Expand All @@ -75,6 +77,7 @@ if (npc_findhero = ^false) {
}
%magearena = 4;
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(giantspider_teleport, 30);
npc_delay(2);

Expand All @@ -98,6 +101,7 @@ if (npc_findhero = ^false) {
}
%magearena = 5;
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(human_castteleport, 30);
npc_delay(2);

Expand All @@ -124,6 +128,7 @@ npc_delay(0);
%magearena = ^mage_arena_complete;
npc_delay(1);
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(demon_portalend, 30);
spotanim_map(smokepuff_large, npc_coord, 124, 90);
npc_delay(2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[proc,macro_event_triffid_spawn]
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(triffid_grow, 0);
%npc_int = ^triffid_growing;
%npc_macro_event_target = uid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ if (~inzone_coord_pair_table(trawler_nonflood_zones, coord) = true) {

[label,murphy_cry]
npc_setmode(none);
npc_walk(npc_coord);
npc_delay(0);
npc_anim(emote_cry, 0);
npc_delay(1);
npc_setmode(patrol);

[label,murphy_cheer]
npc_setmode(none);
npc_walk(npc_coord);
npc_delay(0);
npc_anim(emote_cheer, 0);
npc_delay(2);
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_arena/scripts/hengrad.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(%arena_progress = ^arena_sent_jail) {
// https://youtu.be/NHsQfeSPUb0?si=c_S0jTnjDBF0xilE&t=189
npc_add(0_40_49_26_4, khazard_guard_cutscene, 100);
npc_setmode(none);
npc_walk(npc_coord);
p_delay(0);
// https://youtu.be/Y6eWjQnV4Mo?si=7aaHIhL6qoxCuntZ&t=170 the guard can get stuck at any point, doesnt interrupt anything
npc_walk(0_40_49_39_5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ facesquare(movecoord(coord, 0, 0, -16));
// idk if this is how they checked it, maybe there's a bettter way
if(npc_getmode ! none & inzone(0_40_49_54_30, 0_40_49_56_34, npc_coord) = true) {
npc_setmode(none);
npc_walk(npc_coord);
npc_queue(10, $delay, 0);
}
npc_setmode(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
if (.npc_find(npc_coord, bloated_toad, 2, ^vis_lineofwalk) = true) {
npc_sethuntmode(null);
npc_setmode(none);
npc_walk(npc_coord);
npc_facesquare(.npc_coord);
npc_queue(5, 0, 0);
.npc_queue(5, 0, 0);
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
npc_say("Hey, dere's da chompy, I's gonna shoot it.");
npc_facesquare(.npc_coord);
npc_setmode(none);
npc_walk(npc_coord);
npc_queue(11, 0, 2);
npc_settimer(calc(10 + (random(6) * 2)));
return;
Expand Down
3 changes: 3 additions & 0 deletions data/src/scripts/quests/quest_fluffs/scripts/quest_fluffs.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ if (last_useitem = bucket_milk) {
inv_del(inv, gertrudekittens, 1);
anim(human_pickupfloor, 0);
npc_setmode(none);
npc_walk(npc_coord);
.npc_add(coord, lost_kitten, ^max_32bit_int);
.npc_setmode(none);
.npc_walk(.npc_coord);
p_delay(1);
npc_say("Purr...");
p_delay(0);
Expand Down Expand Up @@ -298,6 +300,7 @@ mes("You can hear kittens mewing close by...");
inv_delslot(inv, last_slot);
npc_add(coord, lost_kitten, 10);
npc_setmode(none);
npc_walk(npc_coord);
p_delay(0);
mes("You place the kitten on the floor.");
p_delay(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(inzone(0_46_47_0_0, 0_46_47_32_63, npc_coord) = true) {
~chatnpc("<p,neutral>Follow me.");
if_close;
npc_setmode(none);
npc_walk(npc_coord);
p_delay(0);
npc_walk(0_46_47_45_40);
p_delay(1);
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_grandtree/scripts/glough.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ p_delay(distance($start, coord)); // walking dist + 1 tick
~chatnpc("<p,angry>Bah! Well, soon you'll see, the gnomes are ready to fight, in three weeks this tree will be dead wood, in ten weeks it will be 30 battleships! Finally we will rid the world of the disease called humanity!");
~chatplayer("<p,angry>What makes you think I'll let you get away with it?");
npc_setmode(none);
npc_walk(npc_coord);
~chatnpcnoturn("<p,laugh>Fool...meet my little friend!");
if_close;
def_coord $demon_spawn = 0_38_154_47_11;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ switch_int(%grandtree_progress) {
~chatnpc("<p,sad>Traveller, Can I speak to you in strictest confidence?");
~chatplayer("<p,neutral>Of course sire.");
npc_setmode(none);
npc_walk(npc_coord);
~chatnpcnoturn("<p,shifty>Not here, follow me.");
if_close;
def_int $npc_dist = ~total_distance(npc_coord, ^narnode_trapdoor_coord);
Expand Down Expand Up @@ -244,6 +245,7 @@ switch_int(%grandtree_progress) {

[label,king_narnode_back_up]
npc_setmode(none);
npc_walk(npc_coord);
~chatnpcnoturn("<p,neutral>I'll show you the way back up.");
if_close;
def_coord $up_coord = movecoord(^narnode_trapdoor_coord, 0, 0, 6400);
Expand Down
5 changes: 4 additions & 1 deletion data/src/scripts/quests/quest_ikov/scripts/ikov_dungeon.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,18 @@ if(npc_find(coord, fire_warrior_of_lesarkus, 5, 0) = false) { // will spawn anot
sound_synth(fire_teleport, 0, 0);
npc_add(0_41_154_22_10, fire_warrior_of_lesarkus, 500);
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(human_smokepuff_tele_appear, 0);
p_delay(1);
}
npc_setmode(none);
npc_walk(npc_coord);
npc_say("You will not pass!");
p_delay(0);
npc_say("Amitus! Setitii!");
npc_setmode(playerface);
npc_facesquare(coord);
npc_setmode(none);
npc_walk(npc_coord);
npc_anim(human_caststrike, 0);
spotanim_npc(fireblast_casting, 92, 0);
sound_synth(fire_blast_all, 0, 0); // area sound in osrs, uses fireblast_cast_and_fire
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_ikov/scripts/lucien.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ if(%ikov_progress <= ^ikov_helping_armadyl) { // guessing...
if(npc_findhero = ^true & %ikov_progress = ^ikov_helping_armadyl) {
if_close;
npc_setmode(none);
npc_walk(npc_coord);
queue(queue_defeat_lucien, 0, npc_uid);
return;
}
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_legends/scripts/gujuo.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[ai_opplayer2,gujuo]
mes("Gujuo approaches.");
npc_setmode(none);
npc_walk(npc_coord);
@gujuo_start;

[opnpcu,gujuo]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ if(finduid(%npc_aggressive_player) = true) {
}
// doesn't queue, the npc will sit at 0 hp if no prot access
npc_setmode(none);
npc_walk(npc_coord);
npc_del;
if(%legends_progress < ^legends_heart_in_recess & ~obj_gettotal(heartcrystal_sectionb) = 0 & ~obj_gettotal(heartcrystal) = 0
& ~obj_gettotal(heartcrystal_glow) = 0 & testbit(%legends_bits, ^legends_smelting_hunk) = ^false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ if(testbit(%legends_bits, ^legends_defeated_san_final) = ^false) {
if(npc_finduid(%aggressive_npc) = true & npc_type = nezikchened) {
npc_sethuntmode(null);
npc_setmode(none);
npc_walk(npc_coord);
p_stopaction;
if (inzone(0_43_145_0_0, 0_43_145_63_63, coord) = true & %legends_progress = ^legends_summoned_nezikchened_fire) {
%legends_progress = ^legends_defeated_nezikchened_fire;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ if(finduid(%npc_aggressive_player) = true) {
}
// doesn't queue, the npc will sit at 0 hp if no prot access
npc_setmode(none);
npc_walk(npc_coord);
npc_del;
if(%legends_progress < ^legends_heart_in_recess & ~obj_gettotal(heartcrystal_sectionc) = 0 & ~obj_gettotal(heartcrystal) = 0
& ~obj_gettotal(heartcrystal_glow) = 0 & testbit(%legends_bits, ^legends_smelting_lump) = ^false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if(finduid(%npc_aggressive_player) = true) {
}
// doesn't queue, the npc will sit at 0 hp if no prot access
npc_setmode(none);
npc_walk(npc_coord);
npc_del;
if(%legends_progress < ^legends_heart_in_recess & ~obj_gettotal(heartcrystal_sectiona) = 0 & ~obj_gettotal(heartcrystal) = 0
& ~obj_gettotal(heartcrystal_glow) = 0 & testbit(%legends_bits, ^legends_smelting_chunk) = ^false) {
Expand Down
1 change: 1 addition & 0 deletions data/src/scripts/quests/quest_legends/scripts/ungadulu.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ if (last_useitem = book_of_binding) {
[ai_queue10,ungadulu]
npc_anim(human_death_backwards, 0); // seems like the last frame of this seq is broken...
npc_setmode(none);
npc_walk(npc_coord);
npc_delay(10); // delay 11t
npc_setmode(null);
npc_anim(null, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (%mcannon_progress = ^mcannon_tasked_with_finding_gilobs_son) {
%mcannon_progress = ^mcannon_return_to_dwarf_commander;
}
npc_setmode(none);
npc_walk(npc_coord);
p_delay(0);
npc_facesquare(0_40_153_7_56);
npc_queue(10, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ if (~inzone_coord_pair_table(sheepherder_pen_gate, npc_coord) = true) {
npc_add($npc_coord, $npc, 150);
npc_facesquare(movecoord(npc_coord, 0, 0, -1));
npc_setmode(none);
npc_walk(npc_coord);
%sheepherder_disposal = setbit(%sheepherder_disposal, $npc_start_bit);
mes("The sheep obligingly jumps over the gate and into the enclosure.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ mes("You hammer the stake into the vampire's chest!");
inv_del(inv, stake, 1);
anim(human_stake, 0);
npc_setmode(none);
npc_walk(npc_coord);
npc_queue(4, 0, 0);
if (%vampire_progress < ^vampire_complete) {
queue(quest_vampire_complete, 3);
Expand Down