mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-11 09:00:23 -07:00
Fix Seaweed, Ectofuntus Pot Filling, and Quest Typos
This commit is contained in:
parent
2aaf342e0f
commit
4dd5d9f596
7 changed files with 68 additions and 69 deletions
|
|
@ -27,7 +27,7 @@ public final class MerlinCrystal extends Quest {
|
||||||
line(player, "<blue>I can start this quest by speaking to <red>King Arthur<blue> at<n> <red>Camelot Castle<blue>, just <red>North West of Catherby<n><blue>I must be able to defeat a <red>level 37 enemy", 11);
|
line(player, "<blue>I can start this quest by speaking to <red>King Arthur<blue> at<n> <red>Camelot Castle<blue>, just <red>North West of Catherby<n><blue>I must be able to defeat a <red>level 37 enemy", 11);
|
||||||
break;
|
break;
|
||||||
case 10:// after talking to arthur
|
case 10:// after talking to arthur
|
||||||
line(player, "<str>I spoke to King Arthur and he said I would be worthy of <n><str>becoming a Knight of the Round Table if I could free Merlin<n><str>from a giant crystal that he has been trapped in.</str>" + "<n><br><br><br><blue> I should ask the <red>other Knights<blue> if they have any <red>advice<blue> for<n><blue>me on how I should go about doing this.", 11);
|
line(player, "<str>I spoke to King Arthur and he said I would be worthy of <n><str>becoming a Knight of the Round Table if I could free Merlin<n><str>from a giant crystal that he has been trapped in.</str>" + "<n><blue> I should ask the<red> other Knights<blue> if they have any <red>advice<blue> for<n><blue>me on how I should go about doing this.", 11);
|
||||||
break;
|
break;
|
||||||
case 20:// upon talking to kay/gawain and learning how merlin got trapped
|
case 20:// upon talking to kay/gawain and learning how merlin got trapped
|
||||||
line(player, "<str>I spoke to King Arthur and he said I would be worthy of <n><str>becoming a Knight of the Round Table if I could free Merlin<n><str>from a giant crystal that he has been trapped in.</str>" + "<n><blue>Gawain told me it was the work of <red>Morgan Le Faye<blue>.", 11);
|
line(player, "<str>I spoke to King Arthur and he said I would be worthy of <n><str>becoming a Knight of the Round Table if I could free Merlin<n><str>from a giant crystal that he has been trapped in.</str>" + "<n><blue>Gawain told me it was the work of <red>Morgan Le Faye<blue>.", 11);
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class AlmeraDialogue extends DialoguePlugin {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "It's my son Hudon, he's always getting to trouble, the", "boy's convinced there's hidden treasure in the river and", "I'm a bit worried about his safety, the poor lad can't", "even swim.");
|
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "It's my son Hudon, he's always getting into trouble, the", "boy's convinced there's hidden treasure in the river and", "I'm a bit worried about his safety, the poor lad can't", "even swim.");
|
||||||
stage = 4;
|
stage = 4;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@ public enum CookableItems {
|
||||||
|
|
||||||
//Miscellaneous
|
//Miscellaneous
|
||||||
RAW_OOMLIE(Items.RAW_OOMLIE_2337, 0, Items.BURNT_OOMLIE_2426, 50, 0, 999,0,0), // always burns
|
RAW_OOMLIE(Items.RAW_OOMLIE_2337, 0, Items.BURNT_OOMLIE_2426, 50, 0, 999,0,0), // always burns
|
||||||
OOMLIE_WRAP(Items.COOKED_OOMLIE_WRAP_2343, Items.WRAPPED_OOMLIE_2341, Items.BURNT_OOMLIE_WRAP_2345, 50, 110, 999,0,0);
|
OOMLIE_WRAP(Items.COOKED_OOMLIE_WRAP_2343, Items.WRAPPED_OOMLIE_2341, Items.BURNT_OOMLIE_WRAP_2345, 50, 110, 999,0,0),
|
||||||
|
SEAWEED(Items.SEAWEED_401,0,Items.SODA_ASH_1781,0,0,999,0,0);
|
||||||
|
|
||||||
public final static HashMap<Integer,CookableItems>cookingMap = new HashMap<>();
|
public final static HashMap<Integer,CookableItems>cookingMap = new HashMap<>();
|
||||||
public final static HashMap<Integer, CookableItems>intentionalBurnMap = new HashMap<>();
|
public final static HashMap<Integer, CookableItems>intentionalBurnMap = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,6 @@ class CookingRewrite : InteractionListener() {
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item.id,9436,true,obj))
|
player.dialogueInterpreter.open(CookingDialogue(item.id,9436,true,obj))
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
SEAWEED_401 -> if (range) {
|
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item.id,1781,false,obj))
|
|
||||||
return@onUseWith true
|
|
||||||
}
|
|
||||||
BREAD_DOUGH_2307, UNCOOKED_CAKE_1889 -> if (!range) {
|
BREAD_DOUGH_2307, UNCOOKED_CAKE_1889 -> if (!range) {
|
||||||
player.packetDispatch.sendMessage("You need to cook this on a range.")
|
player.packetDispatch.sendMessage("You need to cook this on a range.")
|
||||||
return@onUseWith false
|
return@onUseWith false
|
||||||
|
|
|
||||||
|
|
@ -212,15 +212,15 @@ public class StandardCookingPulse extends Pulse {
|
||||||
if (food.getId() == Items.RAW_OOMLIE_2337) {
|
if (food.getId() == Items.RAW_OOMLIE_2337) {
|
||||||
return "The meat is far too delicate to cook like this. Perhaps you should wrap something around it to protect it from the heat.";
|
return "The meat is far too delicate to cook like this. Perhaps you should wrap something around it to protect it from the heat.";
|
||||||
}
|
}
|
||||||
if (CookableItems.intentionalBurn(food.getId())) {
|
|
||||||
return "You deliberately burn the perfectly good piece of meat.";
|
|
||||||
}
|
|
||||||
switch (product.getId()) {
|
switch (product.getId()) {
|
||||||
case Items.SINEW_9436:
|
case Items.SINEW_9436:
|
||||||
return "You dry the meat into sinew.";
|
return "You dry the meat into sinew.";
|
||||||
case Items.SODA_ASH_1781:
|
case Items.SODA_ASH_1781:
|
||||||
return "You burn the seaweed into soda ash.";
|
return "You burn the seaweed into soda ash.";
|
||||||
}
|
}
|
||||||
|
if (CookableItems.intentionalBurn(food.getId())) {
|
||||||
|
return "You deliberately burn the perfectly good piece of meat.";
|
||||||
|
}
|
||||||
if (!burned) {
|
if (!burned) {
|
||||||
return "You manage to cook some " + food.getName().replace("Raw ", "");
|
return "You manage to cook some " + food.getName().replace("Raw ", "");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package rs09.game.content.zone.phasmatys.bonegrinder
|
package rs09.game.content.zone.phasmatys.bonegrinder
|
||||||
|
|
||||||
|
import api.Container
|
||||||
|
import api.ContentAPI
|
||||||
import core.game.content.global.Bones
|
import core.game.content.global.Bones
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
|
|
@ -13,16 +15,18 @@ import rs09.game.world.GameWorld.Pulser
|
||||||
private const val LOADER = 11162
|
private const val LOADER = 11162
|
||||||
private const val BONE_GRINDER = 11163
|
private const val BONE_GRINDER = 11163
|
||||||
private const val BIN = 11164
|
private const val BIN = 11164
|
||||||
|
|
||||||
private const val LOADED_BONE_KEY = "/save:bonegrinder-bones"
|
private const val LOADED_BONE_KEY = "/save:bonegrinder-bones"
|
||||||
private const val BONE_HOPPER_KEY = "/save:bonegrinder-hopper"
|
private const val BONE_HOPPER_KEY = "/save:bonegrinder-hopper"
|
||||||
private const val BONE_BIN_KEY = "/save:bonegrinder-bin"
|
private const val BONE_BIN_KEY = "/save:bonegrinder-bin"
|
||||||
|
|
||||||
private val FILL_ANIM = Animation(1649)
|
private val FILL_ANIM = Animation(1649)
|
||||||
private val WIND_ANIM = Animation(1648)
|
private val WIND_ANIM = Animation(1648)
|
||||||
private val SCOOP_ANIM = Animation(1650)
|
private val SCOOP_ANIM = Animation(1650)
|
||||||
|
|
||||||
class BoneGrinderListener : InteractionListener() {
|
class BoneGrinderListener : InteractionListener() {
|
||||||
|
|
||||||
val boneIDs = Bones.values().map { it.itemId }.toIntArray()
|
private val boneIDs = Bones.values().map { it.itemId }.toIntArray()
|
||||||
|
|
||||||
override fun defineListeners() {
|
override fun defineListeners() {
|
||||||
|
|
||||||
|
|
@ -67,15 +71,15 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
fun handleFill(player: Player): Boolean{
|
fun handleFill(player: Player): Boolean{
|
||||||
val bone = getBone(player)
|
val bone = getBone(player)
|
||||||
if(bone == null){
|
if(bone == null){
|
||||||
player.sendMessage("You have no bones to grind.")
|
ContentAPI.sendMessage(player,"You have no bones to grind.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(player.getAttribute(BONE_HOPPER_KEY,false) != false){
|
if(ContentAPI.getAttribute(player,BONE_HOPPER_KEY,false)){
|
||||||
player.sendMessage("You already have some bones in the hopper.")
|
ContentAPI.sendMessage(player,"You already have some bones in the hopper.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(player.getAttribute(BONE_BIN_KEY,false) != false){
|
if(ContentAPI.getAttribute(player,BONE_BIN_KEY,false)){
|
||||||
player.sendMessage("You already have some bonemeal that needs to be collected.")
|
ContentAPI.sendMessage(player,"You already have some bonemeal that needs to be collected.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,15 +88,14 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
when(stage++){
|
when(stage++){
|
||||||
0 -> {
|
0 -> {
|
||||||
player.lock()
|
ContentAPI.lock(player, FILL_ANIM.duration)
|
||||||
player.animator.animate(FILL_ANIM)
|
ContentAPI.animate(player,FILL_ANIM)
|
||||||
}
|
}
|
||||||
FILL_ANIM.duration -> {
|
FILL_ANIM.duration -> {
|
||||||
player.sendMessage("You fill the hopper with bones.")
|
ContentAPI.sendMessage(player,"You fill the hopper with bones.")
|
||||||
player.unlock()
|
ContentAPI.removeItem(player,Item(bone.itemId),Container.INVENTORY)
|
||||||
player.inventory.remove(Item(bone.itemId))
|
ContentAPI.setAttribute(player,LOADED_BONE_KEY,bone.ordinal)
|
||||||
player.setAttribute(LOADED_BONE_KEY,bone.ordinal)
|
ContentAPI.setAttribute(player,BONE_HOPPER_KEY,true)
|
||||||
player.setAttribute(BONE_HOPPER_KEY,true)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -100,30 +103,28 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.inventory.getAmount(bone.itemId) > 0){
|
if(ContentAPI.inInventory(player,bone.itemId)){
|
||||||
player.pulseManager.run(object : Pulse(){
|
player.pulseManager.run(object : Pulse(){
|
||||||
var stage = 0
|
var stage = 0
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
when(stage++){
|
when(stage++){
|
||||||
0 -> Pulser.submit(fillPulse).also { delay = FILL_ANIM.duration + 1}
|
0 -> Pulser.submit(fillPulse).also { delay = FILL_ANIM.duration + 1}
|
||||||
1 -> {
|
1 -> {
|
||||||
player.walkingQueue.reset()
|
ContentAPI.stopWalk(player)
|
||||||
player.walkingQueue.addPath(3659,3524,true)
|
ContentAPI.forceWalk(player,Location(3659,3524),"smart")
|
||||||
delay = 2
|
delay = 2
|
||||||
}
|
}
|
||||||
2 -> {
|
2 -> {
|
||||||
player.faceLocation(Location.create(3659, 3526, 1))
|
|
||||||
handleWind(player)
|
handleWind(player)
|
||||||
delay = WIND_ANIM.duration + 1
|
delay = WIND_ANIM.duration + 1
|
||||||
}
|
}
|
||||||
3 -> {
|
3 -> {
|
||||||
player.walkingQueue.reset()
|
ContentAPI.stopWalk(player)
|
||||||
player.walkingQueue.addPath(3658,3524,true)
|
ContentAPI.forceWalk(player,Location(3658,3524),"smart")
|
||||||
delay = 2
|
delay = 2
|
||||||
}
|
}
|
||||||
4 -> {
|
4 -> {
|
||||||
player.faceLocation(Location.create(3658, 3525, 1))
|
if(!ContentAPI.inInventory(player,Items.EMPTY_POT_1931,1)){
|
||||||
if(!player.inventory.contains(Items.EMPTY_POT_1931,1)){
|
|
||||||
return handleEmpty(player)
|
return handleEmpty(player)
|
||||||
} else {
|
} else {
|
||||||
handleEmpty(player)
|
handleEmpty(player)
|
||||||
|
|
@ -131,12 +132,12 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
5 -> {
|
5 -> {
|
||||||
player.walkingQueue.reset()
|
ContentAPI.stopWalk(player)
|
||||||
player.walkingQueue.addPath(3660,3524,true)
|
ContentAPI.forceWalk(player,Location(3660,3524),"smart")
|
||||||
delay = 4
|
delay = 4
|
||||||
}
|
}
|
||||||
6 -> {
|
6 -> {
|
||||||
player.faceLocation(Location.create(3660,3526))
|
ContentAPI.face(player,Location(3660,3526))
|
||||||
handleFill(player)
|
handleFill(player)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -151,13 +152,13 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun handleWind(player: Player): Boolean{
|
fun handleWind(player: Player): Boolean{
|
||||||
if(!player.getAttribute(BONE_HOPPER_KEY,false)){
|
if(!ContentAPI.getAttribute(player,BONE_HOPPER_KEY,false)){
|
||||||
player.sendMessage("You have no bones loaded to grind.")
|
ContentAPI.sendMessage(player,"You have no bones loaded to grind.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.getAttribute(BONE_BIN_KEY,false)){
|
if(ContentAPI.getAttribute(player,BONE_BIN_KEY,false)){
|
||||||
player.sendMessage("You already have some bonemeal which you need to collect.")
|
ContentAPI.sendMessage(player,"You already have some bonemeal which you need to collect.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -166,15 +167,15 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
when(stage++){
|
when(stage++){
|
||||||
0 -> {
|
0 -> {
|
||||||
player.lock()
|
ContentAPI.face(player,Location(3659, 3526, 1))
|
||||||
player.animator.animate(WIND_ANIM)
|
ContentAPI.lock(player,WIND_ANIM.duration)
|
||||||
player.sendMessage("You wind the handle.")
|
ContentAPI.animate(player,WIND_ANIM)
|
||||||
|
ContentAPI.sendMessage(player,"You wind the handle.")
|
||||||
}
|
}
|
||||||
WIND_ANIM.duration -> {
|
WIND_ANIM.duration -> {
|
||||||
player.unlock()
|
ContentAPI.sendMessage(player,"The bonemeal falls into the bin.")
|
||||||
player.sendMessage("The bonemeal falls into the bin.")
|
ContentAPI.setAttribute(player,BONE_HOPPER_KEY,false)
|
||||||
player.setAttribute(BONE_HOPPER_KEY,false)
|
ContentAPI.setAttribute(player,BONE_BIN_KEY,true)
|
||||||
player.setAttribute(BONE_BIN_KEY,true)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -184,51 +185,54 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fun handleStatus(player: Player): Boolean{
|
private fun handleStatus(player: Player): Boolean{
|
||||||
val bonesLoaded = player.getAttribute(BONE_HOPPER_KEY,false)
|
val bonesLoaded = ContentAPI.getAttribute(player,BONE_HOPPER_KEY,false)
|
||||||
val boneMealReady = player.getAttribute(BONE_BIN_KEY,false)
|
val boneMealReady = ContentAPI.getAttribute(player,BONE_BIN_KEY,false)
|
||||||
|
|
||||||
if(bonesLoaded) player.sendMessage("There are bones waiting in the hopper.")
|
if(bonesLoaded) ContentAPI.sendMessage(player,"There are bones waiting in the hopper.")
|
||||||
if(boneMealReady) player.sendMessage("There is bonemeal waiting in the bin to be collected.")
|
if(boneMealReady) ContentAPI.sendMessage(player,"There is bonemeal waiting in the bin to be collected.")
|
||||||
|
|
||||||
if(!bonesLoaded && !boneMealReady){
|
if(!bonesLoaded && !boneMealReady){
|
||||||
player.sendMessage("There is nothing loaded into the machine.")
|
ContentAPI.sendMessage(player,"There is nothing loaded into the machine.")
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fun handleEmpty(player: Player): Boolean{
|
fun handleEmpty(player: Player): Boolean{
|
||||||
if(!player.getAttribute(BONE_BIN_KEY,false)){
|
if(!ContentAPI.getAttribute(player,BONE_BIN_KEY,false)){
|
||||||
player.sendMessage("You have no bonemeal to collect.")
|
ContentAPI.sendMessage(player,"You have no bonemeal to collect.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.getAttribute(BONE_HOPPER_KEY,false) && !player.getAttribute(BONE_BIN_KEY,false)){
|
if(ContentAPI.getAttribute(player,BONE_HOPPER_KEY,false) && !ContentAPI.getAttribute(player,BONE_BIN_KEY,false)){
|
||||||
player.sendMessage("You need to wind the wheel to grind the bones.")
|
ContentAPI.sendMessage(player,"You need to wind the wheel to grind the bones.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!player.inventory.contains(Items.EMPTY_POT_1931,1)){
|
if(!ContentAPI.inInventory(player,Items.EMPTY_POT_1931,1)){
|
||||||
player.sendMessage("You don't have any pots to take the bonemeal with.")
|
ContentAPI.sendMessage(player,"You don't have any pots to take the bonemeal with.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
val bone = Bones.values()[player.getAttribute(LOADED_BONE_KEY,-1)]
|
val bone = Bones.values()[ContentAPI.getAttribute(player,LOADED_BONE_KEY,-1)]
|
||||||
|
|
||||||
|
|
||||||
player.lock()
|
|
||||||
Pulser.submit(object : Pulse(){
|
Pulser.submit(object : Pulse(){
|
||||||
var stage = 0
|
var stage = 0
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
when(stage++){
|
when(stage++){
|
||||||
0 -> player.animator.animate(SCOOP_ANIM)
|
0 -> {
|
||||||
|
ContentAPI.face(player,Location(3658, 3525, 1))
|
||||||
|
ContentAPI.lock(player, SCOOP_ANIM.duration)
|
||||||
|
ContentAPI.animate(player,SCOOP_ANIM)
|
||||||
|
}
|
||||||
SCOOP_ANIM.duration -> {
|
SCOOP_ANIM.duration -> {
|
||||||
player.unlock()
|
if(ContentAPI.removeItem(player,Item(Items.EMPTY_POT_1931),Container.INVENTORY)){
|
||||||
if(player.inventory.remove(Item(Items.EMPTY_POT_1931))){
|
ContentAPI.addItem(player,bone.boneMeal.id)
|
||||||
player.inventory.add(bone.boneMeal)
|
ContentAPI.setAttribute(player,BONE_BIN_KEY,false)
|
||||||
player.setAttribute(BONE_BIN_KEY,false)
|
ContentAPI.setAttribute(player,BONE_HOPPER_KEY,false)
|
||||||
player.setAttribute(BONE_HOPPER_KEY,false)
|
ContentAPI.setAttribute(player,LOADED_BONE_KEY,-1)
|
||||||
player.setAttribute(LOADED_BONE_KEY,-1)
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
@ -236,13 +240,12 @@ class BoneGrinderListener : InteractionListener() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getBone(player: Player): Bones? {
|
fun getBone(player: Player): Bones? {
|
||||||
for(bone in Bones.values()){
|
for(bone in Bones.values()){
|
||||||
if(player.inventory.contains(bone.itemId,1)) return bone
|
if(ContentAPI.inInventory(player,bone.itemId)) return bone
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import core.game.node.entity.skill.Skills
|
||||||
import core.game.node.entity.skill.gather.SkillingTool
|
import core.game.node.entity.skill.gather.SkillingTool
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import core.game.world.update.flag.context.Animation
|
import core.game.world.update.flag.context.Animation
|
||||||
import core.net.packet.out.SkillLevel
|
|
||||||
import org.rs09.consts.Components
|
import org.rs09.consts.Components
|
||||||
|
|
||||||
object CanoeUtils {
|
object CanoeUtils {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue