Skip to content

Commit

Permalink
refactor(content): use queues for eating toad
Browse files Browse the repository at this point in the history
  • Loading branch information
Jameskmonger committed Aug 24, 2024
1 parent 567e395 commit fcc7d9f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
11 changes: 11 additions & 0 deletions data/src/scripts/quests/quest_chompybird/scripts/bloated_toad.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,14 @@ while (.huntnext = true) {
// is damage random per-player or per-toad?
~.damage_self(calc(random(1) + 1));
}

// The toad is being eaten by the Chompy
[ai_queue5,bloated_toad]
npc_delay(3);

// TODO do we need to check that the Chompy is still there and eating the toad?
// should test on OSRS to confirm

npc_say("!!Croak!!");
npc_delay(2);
npc_del;
29 changes: 11 additions & 18 deletions data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,22 @@
npc_sethuntmode(chompybird);
}

// triggered by the .hunt config, the Chompy has found, and arrived at, the Bloated Toad
[ai_queue4,chompy_bird]
if (.npc_find(npc_coord, bloated_toad, 1, 1) = true) {
// TODO get delays, anims etc with OSRS
npc_say("Sqwark!");
npc_sethuntmode(null);
npc_facesquare(.npc_coord);

.npc_delay(3);

if (npc_finduid(npc_uid) = true & .npc_finduid(.npc_uid) = true) {
.npc_say("!!Croak!!");
npc_say("Gobble!");

.npc_delay(2);

if (.npc_finduid(.npc_uid) = true) {
.npc_del;

// TODO how to set `%chompybird_progress = ^chompybird_chompy_ate_toad` for the player who spawned the toad?
// TODO clear hunt mode?
}
}
npc_queue(5, 0, 0);
.npc_queue(5, 0, 0);
}

// the Chompy is eating the toad
[ai_queue5,chompy_bird]
npc_say("Sqwark!");
npc_delay(3);
npc_say("Gobble!");
npc_delay(2);

[opnpc4,chompy_bird_corpse]
mes("You start plucking the chompy bird.");
anim(human_pickupfloor, 0);
Expand Down

0 comments on commit fcc7d9f

Please sign in to comment.