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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model1=model_2878_npc
model2=model_3442_npc
head1=model_141_npc_head
wanderrange=2
timer=10
timer=1
param=damagetype,^crush_style
param=death_anim,ogre_death
param=death_sound,giant_death
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ if ($rhand ! ogre_bow) {
return;
}

if(%quest_chompybird_baiter ! uid) {
mes("This is not your Chompy Bird to shoot.");
return;
}


def_obj $ammo = inv_getobj(worn, ^wearpos_quiver);
if ($ammo = null) {
Expand Down Expand Up @@ -157,7 +162,7 @@ if (random(2) = 0) {

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

Expand Down
13 changes: 7 additions & 6 deletions data/src/scripts/quests/quest_chompybird/scripts/ogre_bow.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ if (%chompybird_progress < ^chompybird_complete) {
return;
}
def_int $kills = %chompybird_kills;
if($kills > 4000) {
// https://youtu.be/LtoYNXgM5Wg?si=MeXmjKYkbEKliZ9F&t=16
~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);
return;
}
def_string $rank = ~add_article(~get_chompy_rank($kills));
def_string $rank_mes = "~ You're <$rank>! ~";
if($kills = 0) {
$rank_mes = "You've not even started.";
}
mes("You've scratched up a total of <tostring($kills)> chompy bird kills so far!");
mes($rank_mes);
if($kills >= 4000) {
// https://youtu.be/LtoYNXgM5Wg?si=MeXmjKYkbEKliZ9F&t=16
~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);
return;
}
~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

[proc,get_chompy_rank](int $kills)(string)
Expand Down Expand Up @@ -82,4 +82,5 @@ if ($kills < 3000) {
}
if ($kills < 4000) {
return("Expert Ogre Dragon Archer");
}
}
return ("Expert Dragon Archer");
14 changes: 7 additions & 7 deletions data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ switch_int(%chompybird_progress) {
// Maybe chompy_ate_toad has a separate set of dialogue, but in normal circumstances the stage
// advances to rantz_tried_to_shoot_chompy too quickly to tell.
case ^chompybird_dropped_toad, ^chompybird_chompy_ate_toad :
// todo mesanim TBC
~chatplayer("<p,neutral>There you go, I've placed the bait.");
~chatnpc("<p,neutral>Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky...");
~chatnpc("<p,happy>Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky...");
~chatplayer("<p,neutral>Yes, I know... stick da chompy!");
~chatnpc("<p,neutral>Hey, you's creature, is da fatsy toady still dere? Go get more fatsy toadies if dey all gone!");
~chatplayer("<p,neutral>What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?");
~chatplayer("<p,angry>What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?");
case ^chompybird_rantz_tried_to_shoot_chompy :
~chatplayer("<p,neutral>Hey there, you keep missing the chompy bird.");
~chatnpc("<p,angry>I knows, I keeps missing... because your stabbers are|worserer at flying than a dead dog.");
Expand Down Expand Up @@ -340,8 +339,10 @@ queue(quest_chompybird_complete, 0);

// look for any chompy birds to shoot
[ai_timer,chompybird_rantz]
if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
if (p_finduid(.%quest_chompybird_baiter) = true) {
if(random(20) ! 0 | npc_getmode = none) return;
if (.npc_find(0_41_46_11_22, chompy_bird, 12, ^vis_lineofsight) = true) {
if(%rantz_attacking_chompy = .npc_uid) return;
if (p_finduid(.%quest_chompybird_baiter) = true & inzone(0_41_46_0_0, 0_41_46_63_63, coord) = true) {
// we only run this logic for players in the right quest state
if (%chompybird_progress >= ^chompybird_chompy_ate_toad & %chompybird_progress < ^chompybird_rantz_gave_player_bow) {
%rantz_attacking_chompy = .npc_uid;
Expand All @@ -351,7 +352,6 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
npc_facesquare(.npc_coord);
npc_setmode(none);
npc_queue(11, 0, 2);
npc_settimer(calc(10 + (random(6) * 2)));
return;
}
}
Expand All @@ -361,7 +361,7 @@ if (.npc_find(npc_coord, chompy_bird, 17, ^vis_lineofsight) = true) {
if(.npc_finduid(%rantz_attacking_chompy) = true) {
npc_anim(ogre_longbow, 0);
spotanim_npc(ogre_arrow_launch, 50, 0);
def_int $duration = ~npc_projectile(npc_coord, .npc_uid, ogre_arrow_travel, 40, 36, 41, 15, 5, 11, 5);
def_int $duration = ~npc_to_npc_projectile(.npc_uid, ogre_arrow_travel, 38, 36, 41, 15, 5, 11, 5);
def_int $delay = add(sub(divide($duration, 30), 1), 2);
npc_queue(12, 0, calc($delay + 1));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ if ($weapon_cat ! weapon_bow & $weapon_cat ! weapon_crossbow) {
}
def_obj $ammo = inv_getobj(worn, ^wearpos_quiver);
if ($ammo = null) {
mes("There is no ammo left in your quiver.");
if($rhand = ogre_bow) mes("There is no ammo left in your quiver");
else mes("There is no ammo left in your quiver.");
return(null);
}
def_category $ammo_cat = oc_category($ammo);
if ($weapon_cat = weapon_bow & $ammo_cat ! arrows) {
if (($rhand = ogre_bow & $ammo_cat ! ogre_arrows) |
($rhand ! ogre_bow & $weapon_cat = weapon_bow & $ammo_cat ! arrows)) {
mes("You can't use that ammo with your bow."); // todo confirm this for 2004.
return(null);
}
Expand All @@ -113,7 +115,8 @@ switch_category(oc_category($rhand)) {
}

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

Expand Down
6 changes: 6 additions & 0 deletions data/src/scripts/skill_combat/scripts/projectile.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ def_int $duration = calc($delay + $flight);
projanim_npc($coord, $uid, $spotanim, $startheight, $endheight, $delay, $duration, $angle, $offset);
return($duration);

[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)
def_int $flight = calc($length + (npc_range(.npc_coord) * $step));
def_int $duration = calc($delay + $flight);
projanim_npc(npc_coord, $uid, $spotanim, $startheight, $endheight, $delay, $duration, $angle, $offset);
return($duration);

[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)
def_int $flight = calc($length + (distance($coord, $coord2) * $step));
def_int $duration = calc($delay + $flight);
Expand Down