Can now speak to Wormbrain through the jail cell

Fixed some Wormbrain typos
This commit is contained in:
Skal Fate 2023-03-01 08:12:48 +00:00 committed by Ryan
parent 88a2f354b4
commit adcdf9bd6a
2 changed files with 18 additions and 7 deletions

View file

@ -1,9 +1,11 @@
package content.region.misthalin.varrock.quest.dragonslayer
import core.api.sendMessage
import org.rs09.consts.Scenery
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.world.map.Location
import org.rs09.consts.NPCs
import org.rs09.consts.Scenery
class DSListeners : InteractionListener {
override fun defineListeners() {
@ -11,5 +13,17 @@ class DSListeners : InteractionListener {
sendMessage(player, "It's locked tight.")
return@on true
}
// Talk to Wormbrain
setDest(IntType.NPC, intArrayOf(NPCs.WORMBRAIN_745), "talk-to") { player, node ->
val npc = node.asNpc()
val p = player.asPlayer()
val dis = player.location.withinMaxnormDistance(npc.location, 1)
if (dis){
return@setDest Location.create( p.location.x, p.location.y, 0)
}
else return@setDest Location.create( npc.location.x, npc.location.y, 0)
}
}
}

View file

@ -96,7 +96,7 @@ public final class WormbrainDialogue extends DialoguePlugin {
stage = 505;
break;
case 2:
player("Alrigt, then, 10,000 it is.");
player("Alright, then, 10,000 it is.");
stage = 506;
break;
}
@ -154,7 +154,7 @@ public final class WormbrainDialogue extends DialoguePlugin {
break;
case 2:
player("Sorry, thought this was a zoo.");
stage = 20;
stage = 15;
break;
}
break;
@ -181,9 +181,6 @@ public final class WormbrainDialogue extends DialoguePlugin {
case 15:
end();
break;
case 20:
end();
break;
}
}
}