Fix slayer task assignment and master recommendations - #1150
Open
HarleyGilpin wants to merge 5 commits into
Open
Fix slayer task assignment and master recommendations#1150HarleyGilpin wants to merge 5 commits into
HarleyGilpin wants to merge 5 commits into
Conversation
The Canifis and Shilo Village slayer masters are spawned as transforming
npcs (varbit 5525) which switch between the original master and their
While Guthix Sleeps stand-in: 8481 -> Mazchna/Achtryn and 8483 ->
Duradel/Lapalok. Their string ids named the transform base after the
stand-in, and the spawns pointed at those bases, so talking to Mazchna
found handlers under the transformed id but passed the base id
"achtryn" into the task roll, which has no task table:
java.lang.IllegalStateException: No task found for achtryn
at content.skill.slayer.SlayerKt.assignTask(Slayer.kt:69)
Name the transform bases after the master they spawn as, free up
"achtryn" and "lapalok" for the real npcs, and resolve the master from
the transformed definition the same way interaction dispatch does,
falling back to the spawned id so Sumona - also a transform base - keeps
working. Stand-ins now hand out the task list of the master they cover.
Duradel and Kuradal fell through to a default threshold of combat level 128 paired with the "Duradel in Shilo Village" suggestion, so a player above that level was told "You're actually very strong, are you sure you don't want Duradel in Shilo Village to assign you a task?" by Duradel himself, and by Kuradal who is stronger still. Pair each threshold with the master it points at so the two can't drift apart, and skip the question entirely when there is no stronger master.
Mazchna pointed strong players past Vannaka to Chaeldar, Vannaka pointed past Chaeldar to Sumona, and Chaeldar past Sumona to Duradel, so two masters were skipped on the way up. Each master now names the next master up, and a test walks the ladder to keep the rungs in order.
GregHib
approved these changes
Aug 9, 2026
The combat levels a master started pointing players up at (50, 75, 90, 100, 120) were invented and didn't line up with the requirements the rewards interface lists: combat 3, 20, 40 and 70 for Turael, Mazchna, Vannaka and Chaeldar, 35 Slayer after Smoking Kills for Sumona, 50 Slayer and combat 100 for Duradel, and 75 Slayer and combat 110 for Kuradal. Hold those requirements as one ordered list and suggest the next master the player actually qualifies for, so Chaeldar points at Duradel while Smoking Kills is outstanding rather than at a Sumona who won't talk tasks, and Duradel points at Kuradal once she will.
Pointing players one rung up meant a maxed player was walked through Mazchna, Vannaka, Chaeldar and Sumona to reach the master they could have gone straight to. Take the last master in the list they meet the requirements for instead of the first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Talking to Mazchna in Canifis and asking for a task throws:
Fixing that turned up three more problems in the same dialogue, all in how a master decides who to send a strong player to.
The crash: transforming masters
Canifis's master isn't spawned as Mazchna - it's npc
8481, a transforming npc keyed on varbit5525(While Guthix Sleeps) which switches between8464Mazchna and8465Achtryn, her stand-in while she's away. Shilo Village is the same shape:8483transforms to8466Duradel /8467Lapalok.The transform bases were named after the stand-in (
achtryn= 8481,lapalok_shilo_village= 8483) with the real npcs pushed onto suffixed ids (achtryn_3,lapalok_shilo_village_3), and the spawns pointed at the bases.PlayerOnNPCInteractlooks handlers up under the transformed definition's id, which is why "Talk-to" and "Get-task" fired at all - only 8464/8465 carry those options, the base has just "Examine".SlayerMasterthen passedtarget.id, the spawned id, into the roll. There is noachtryn_slayer_taskstable, sorollTaskreturned null andassignTaskthrew.String ids now match the cache names:
achtrynmazchna_canifisachtryn_3achtrynlapalok_shilo_villageduradel_shilo_villagelapalok_shilo_village_3lapalokSpawns and
wander_rangeskeys follow the renames.SlayerMasterresolves the master fromnpc.def(player).stringId, falling back tonpc.idwhen that isn't a known master - mirroring interaction dispatch. The fallback matters for Sumona, who is also a transform base (7779->7780sumona_2once Smoking Kills is done) and would otherwise break the same way.baseSlayerMaster()maps a stand-in to the master whose task list they hand out (spria/turael, achtryn/mazchna, lapalok/duradel), and the stand-ins are registered for Talk-to, Get-task, Trade and Rewards.NPCContactdrops its Lapalok special case for the same helper, and its spawn lookup points at the renamed transform bases.Who a master sends you to
Duradel and Kuradal fell through to a default of combat 128 paired with "Duradel in Shilo Village", so Duradel sent players to himself and Kuradal - stronger than Duradel - sent them to Duradel. The master each one pointed at was also off by a rung: Mazchna sent players past Vannaka to Chaeldar, Vannaka past Chaeldar to Sumona, Chaeldar past Sumona to Duradel. And the thresholds (50, 75, 90, 100, 120) were invented - they don't match what the rewards interface tells players:
Those requirements are now one ordered list, and a master recommends the strongest master in it the player qualifies for - checking combat level, Slayer level and quest - rather than the next one up. A maxed player asking Turael for work is sent straight to Kuradal instead of being walked through four masters to get there. Chaeldar points at Duradel while Smoking Kills is outstanding rather than at a Sumona who won't hand out tasks, and Kuradal points at nobody.
Worth a second opinion: Turael now starts recommending someone else above combat 20, the interface's requirement for Mazchna, where the invented threshold stayed quiet until 50.
Testing
SlayerMasterTesttakes a task from both transforming masters, takes one from Kuradal through the full dialogue, and covers the recommendation: a maxed player sent to Kuradal from every rung, the best-qualified pick when Smoking Kills is outstanding and Duradel is out of reach, Sumona promoted over Chaeldar once the quest is done, and a fresh player left with Turael.NPCContactTest's Duradel case is renamed - its old name asserted the mislabeled premise. Full suite passes.