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

Commit 05b897d

Browse files
authored
fix(content): chompybird fixes (#1762)
* fix: chompybird fixes * fix: use static coord for smaller find range
1 parent 798791f commit 05b897d

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

data/src/scripts/quests/quest_chompybird/configs/quest_chompybird.npc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ model1=model_2878_npc
1010
model2=model_3442_npc
1111
head1=model_141_npc_head
1212
wanderrange=2
13-
timer=10
13+
timer=1
1414
param=damagetype,^crush_style
1515
param=death_anim,ogre_death
1616
param=death_sound,giant_death

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ if ($rhand ! ogre_bow) {
8080
return;
8181
}
8282

83+
if(%quest_chompybird_baiter ! uid) {
84+
mes("This is not your Chompy Bird to shoot.");
85+
return;
86+
}
87+
8388

8489
def_obj $ammo = inv_getobj(worn, ^wearpos_quiver);
8590
if ($ammo = null) {
@@ -158,7 +163,7 @@ if (random(2) = 0) {
158163

159164
// Ogre arrow launch spotanim is higher than other arrows by default, so we compensate for that here
160165
[proc,player_use_ogre_bow](obj $ammo)(int)
161-
spotanim_pl(oc_param($ammo, proj_launch), 46, 0);
166+
spotanim_pl(oc_param($ammo, proj_launch), 50, 0);
162167
inv_del(worn, $ammo, 1);
163168
return(~npc_projectile(coord, npc_uid, oc_param($ammo, proj_travel), 40, 36, 41, 15, 5, 11, 5));
164169

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ if (%chompybird_progress < ^chompybird_complete) {
55
return;
66
}
77
def_int $kills = %chompybird_kills;
8-
if($kills > 4000) {
9-
// https://youtu.be/LtoYNXgM5Wg?si=MeXmjKYkbEKliZ9F&t=16
10-
~objbox(chompy_bird_obj, "@blu@**** Congratulations! ****|@dre@~ You're an Expert Dragon Archer! ~|This is the highest honour that can be bestowed on any|chompy bird hunter.", 250, 0, ^objbox_height);
11-
return;
12-
}
138
def_string $rank = ~add_article(~get_chompy_rank($kills));
149
def_string $rank_mes = "~ You're <$rank>! ~";
1510
if($kills = 0) {
1611
$rank_mes = "You've not even started.";
1712
}
1813
mes("You've scratched up a total of <tostring($kills)> chompy bird kills so far!");
1914
mes($rank_mes);
15+
if($kills >= 4000) {
16+
// https://youtu.be/LtoYNXgM5Wg?si=MeXmjKYkbEKliZ9F&t=16
17+
~objbox(chompy_bird_obj, "@blu@**** Congratulations! ****|@dre@~ You're an Expert Dragon Archer! ~|This is the highest honour that can be bestowed on any|chompy bird hunter.", 250, 0, ^objbox_height);
18+
return;
19+
}
2020
~objbox(chompy_bird_obj, "You've killed a total of @blu@<tostring($kills)> @bla@chompy birds so far!||@blu@<$rank_mes>", 250, 0, ^objbox_height); // imgur.com/N4FttpP
2121

2222
[proc,get_chompy_rank](int $kills)(string)
@@ -82,4 +82,5 @@ if ($kills < 3000) {
8282
}
8383
if ($kills < 4000) {
8484
return("Expert Ogre Dragon Archer");
85-
}
85+
}
86+
return ("Expert Dragon Archer");

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,11 @@ switch_int(%chompybird_progress) {
7777
// Maybe chompy_ate_toad has a separate set of dialogue, but in normal circumstances the stage
7878
// advances to rantz_tried_to_shoot_chompy too quickly to tell.
7979
case ^chompybird_dropped_toad, ^chompybird_chompy_ate_toad :
80-
// todo mesanim TBC
8180
~chatplayer("<p,neutral>There you go, I've placed the bait.");
82-
~chatnpc("<p,neutral>Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky...");
81+
~chatnpc("<p,happy>Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky...");
8382
~chatplayer("<p,neutral>Yes, I know... stick da chompy!");
8483
~chatnpc("<p,neutral>Hey, you's creature, is da fatsy toady still dere? Go get more fatsy toadies if dey all gone!");
85-
~chatplayer("<p,neutral>What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?");
84+
~chatplayer("<p,angry>What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?");
8685
case ^chompybird_rantz_tried_to_shoot_chompy :
8786
~chatplayer("<p,neutral>Hey there, you keep missing the chompy bird.");
8887
~chatnpc("<p,angry>I knows, I keeps missing... because your stabbers are|worserer at flying than a dead dog.");
@@ -340,8 +339,10 @@ queue(quest_chompybird_complete, 0);
340339

341340
// look for any chompy birds to shoot
342341
[ai_timer,chompybird_rantz]
343-
if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
344-
if (p_finduid(.%quest_chompybird_baiter) = true) {
342+
if(random(20) ! 0 | npc_getmode = none) return;
343+
if (.npc_find(0_41_46_11_22, chompy_bird, 12, ^vis_lineofsight) = true) {
344+
if(%rantz_attacking_chompy = .npc_uid) return;
345+
if (p_finduid(.%quest_chompybird_baiter) = true & inzone(0_41_46_0_0, 0_41_46_63_63, coord) = true) {
345346
// we only run this logic for players in the right quest state
346347
if (%chompybird_progress >= ^chompybird_chompy_ate_toad & %chompybird_progress < ^chompybird_rantz_gave_player_bow) {
347348
%rantz_attacking_chompy = .npc_uid;
@@ -352,7 +353,6 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
352353
npc_setmode(none);
353354
npc_walk(npc_coord);
354355
npc_queue(11, 0, 2);
355-
npc_settimer(calc(10 + (random(6) * 2)));
356356
return;
357357
}
358358
}
@@ -362,7 +362,7 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
362362
if(.npc_finduid(%rantz_attacking_chompy) = true) {
363363
npc_anim(ogre_longbow, 0);
364364
spotanim_npc(ogre_arrow_launch, 50, 0);
365-
def_int $duration = ~npc_projectile(npc_coord, .npc_uid, ogre_arrow_travel, 40, 36, 41, 15, 5, 11, 5);
365+
def_int $duration = ~npc_to_npc_projectile(.npc_uid, ogre_arrow_travel, 38, 36, 41, 15, 5, 11, 5);
366366
def_int $delay = add(sub(divide($duration, 30), 1), 2);
367367
npc_queue(12, 0, calc($delay + 1));
368368
}

data/src/scripts/skill_combat/scripts/player/player_ranged.rs2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ if ($weapon_cat ! weapon_bow & $weapon_cat ! weapon_crossbow) {
8686
}
8787
def_obj $ammo = inv_getobj(worn, ^wearpos_quiver);
8888
if ($ammo = null) {
89-
mes("There is no ammo left in your quiver.");
89+
if($rhand = ogre_bow) mes("There is no ammo left in your quiver");
90+
else mes("There is no ammo left in your quiver.");
9091
return(null);
9192
}
9293
def_category $ammo_cat = oc_category($ammo);
93-
if ($weapon_cat = weapon_bow & $ammo_cat ! arrows) {
94+
if (($rhand = ogre_bow & $ammo_cat ! ogre_arrows) |
95+
($rhand ! ogre_bow & $weapon_cat = weapon_bow & $ammo_cat ! arrows)) {
9496
mes("You can't use that ammo with your bow."); // todo confirm this for 2004.
9597
return(null);
9698
}
@@ -113,7 +115,8 @@ switch_category(oc_category($rhand)) {
113115
}
114116

115117
[proc,ranged_shoot_npc](obj $ammo)(int)
116-
spotanim_pl(oc_param($ammo, proj_launch), 96, 0);
118+
if($ammo = ogre_arrow) spotanim_pl(oc_param($ammo, proj_launch), 50, 0);
119+
else spotanim_pl(oc_param($ammo, proj_launch), 96, 0);
117120
inv_del(worn, $ammo, 1);
118121
return(~npc_projectile(coord, npc_uid, oc_param($ammo, proj_travel), 40, 36, 41, 15, 5, 11, 5));
119122

data/src/scripts/skill_combat/scripts/projectile.rs2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ def_int $duration = calc($delay + $flight);
1010
projanim_npc($coord, $uid, $spotanim, $startheight, $endheight, $delay, $duration, $angle, $offset);
1111
return($duration);
1212

13+
[proc,npc_to_npc_projectile](npc_uid $uid, spotanim $spotanim, int $startheight, int $endheight, int $delay, int $angle, int $length, int $offset, int $step)(int)
14+
def_int $flight = calc($length + (npc_range(.npc_coord) * $step));
15+
def_int $duration = calc($delay + $flight);
16+
projanim_npc(npc_coord, $uid, $spotanim, $startheight, $endheight, $delay, $duration, $angle, $offset);
17+
return($duration);
18+
1319
[proc,player_projectile](coord $coord, coord $coord2, player_uid $uid, spotanim $spotanim, int $startheight, int $endheight, int $delay, int $angle, int $length, int $offset, int $step)(int)
1420
def_int $flight = calc($length + (distance($coord, $coord2) * $step));
1521
def_int $duration = calc($delay + $flight);

0 commit comments

Comments
 (0)