diff --git a/data/src/scripts/quests/quest_chompybird/configs/quest_chompybird.npc b/data/src/scripts/quests/quest_chompybird/configs/quest_chompybird.npc index c5eb6b7a15..3173b9a298 100644 --- a/data/src/scripts/quests/quest_chompybird/configs/quest_chompybird.npc +++ b/data/src/scripts/quests/quest_chompybird/configs/quest_chompybird.npc @@ -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 diff --git a/data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2 b/data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2 index 8e3fe650b4..d03aebed29 100644 --- a/data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2 +++ b/data/src/scripts/quests/quest_chompybird/scripts/chompy_bird.rs2 @@ -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) { @@ -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)); diff --git a/data/src/scripts/quests/quest_chompybird/scripts/ogre_bow.rs2 b/data/src/scripts/quests/quest_chompybird/scripts/ogre_bow.rs2 index 68509dabd1..352574dbf1 100644 --- a/data/src/scripts/quests/quest_chompybird/scripts/ogre_bow.rs2 +++ b/data/src/scripts/quests/quest_chompybird/scripts/ogre_bow.rs2 @@ -5,11 +5,6 @@ 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) { @@ -17,6 +12,11 @@ if($kills = 0) { } mes("You've scratched up a total of 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@ @bla@chompy birds so far!||@blu@<$rank_mes>", 250, 0, ^objbox_height); // imgur.com/N4FttpP [proc,get_chompy_rank](int $kills)(string) @@ -82,4 +82,5 @@ if ($kills < 3000) { } if ($kills < 4000) { return("Expert Ogre Dragon Archer"); -} \ No newline at end of file +} +return ("Expert Dragon Archer"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2 b/data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2 index bcb37f3117..fdf2df5411 100644 --- a/data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2 +++ b/data/src/scripts/quests/quest_chompybird/scripts/rantz.rs2 @@ -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("There you go, I've placed the bait."); - ~chatnpc("Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky..."); + ~chatnpc("Goodz, me now waits for da chompy! It shouldn't be long now. Sneaky... sneaky..."); ~chatplayer("Yes, I know... stick da chompy!"); ~chatnpc("Hey, you's creature, is da fatsy toady still dere? Go get more fatsy toadies if dey all gone!"); - ~chatplayer("What? I have to get more bait if there's none there? Does this Chompy Bird even exist I wonder?"); + ~chatplayer("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("Hey there, you keep missing the chompy bird."); ~chatnpc("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); // 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; @@ -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; } } @@ -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)); } diff --git a/data/src/scripts/skill_combat/scripts/player/player_ranged.rs2 b/data/src/scripts/skill_combat/scripts/player/player_ranged.rs2 index 7c323c7808..f87bc2fb6c 100644 --- a/data/src/scripts/skill_combat/scripts/player/player_ranged.rs2 +++ b/data/src/scripts/skill_combat/scripts/player/player_ranged.rs2 @@ -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); } @@ -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)); diff --git a/data/src/scripts/skill_combat/scripts/projectile.rs2 b/data/src/scripts/skill_combat/scripts/projectile.rs2 index 7f80e5d7cf..b64001aaa7 100644 --- a/data/src/scripts/skill_combat/scripts/projectile.rs2 +++ b/data/src/scripts/skill_combat/scripts/projectile.rs2 @@ -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);