Merge branch 'master' into 'master'
Add: Summoning Pouch updates, Karamja and Brimhaven misc fixes See merge request 2009scape/2009scape!67
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -375,7 +375,7 @@
|
|||||||
"general_store": "false",
|
"general_store": "false",
|
||||||
"id": "43",
|
"id": "43",
|
||||||
"title": "Davon's Amulet Store",
|
"title": "Davon's Amulet Store",
|
||||||
"stock": "{1718,0}-{1727,1}-{1729,0}-{1725,0}-{1731,0}"
|
"stock": "{1718,0}-{1727,0}-{1729,0}-{1725,0}-{1731,0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npcs": "2356",
|
"npcs": "2356",
|
||||||
@@ -1508,8 +1508,8 @@
|
|||||||
"currency": "995",
|
"currency": "995",
|
||||||
"general_store": "false",
|
"general_store": "false",
|
||||||
"id": "170",
|
"id": "170",
|
||||||
"title": "The Shrimps and Parrot",
|
"title": "The Shrimp and Parrot",
|
||||||
"stock": "{347,5}-{339,5}-{379,5}-{373,6}-{3144,0}"
|
"stock": "{347,5}-{339,5}-{379,3}-{373,2}-{3144,3}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npcs": "747",
|
"npcs": "747",
|
||||||
|
|||||||
@@ -1,90 +1,90 @@
|
|||||||
package core.game.content.dialogue;
|
package core.game.content.dialogue;
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the dialogue plugin for the npc alfonse the waiter.
|
* Represents the dialogue plugin for the npc alfonse the waiter.
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@Initializable
|
@Initializable
|
||||||
public final class AlfonseWaiterDialogue extends DialoguePlugin {
|
public final class AlfonseWaiterDialogue extends DialoguePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
|
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
|
||||||
*/
|
*/
|
||||||
public AlfonseWaiterDialogue() {
|
public AlfonseWaiterDialogue() {
|
||||||
/**
|
/**
|
||||||
* empty.
|
* empty.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
|
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
|
||||||
* @param player the player.
|
* @param player the player.
|
||||||
*/
|
*/
|
||||||
public AlfonseWaiterDialogue(Player player) {
|
public AlfonseWaiterDialogue(Player player) {
|
||||||
super(player);
|
super(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DialoguePlugin newInstance(Player player) {
|
public DialoguePlugin newInstance(Player player) {
|
||||||
return new AlfonseWaiterDialogue(player);
|
return new AlfonseWaiterDialogue(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean open(Object... args) {
|
public boolean open(Object... args) {
|
||||||
npc = (NPC) args[0];
|
npc = (NPC) args[0];
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to the Shrimps and Parrot.", "Would you like to order, sir?");
|
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to the Shrimp and Parrot.", "Would you like to order, sir?");
|
||||||
stage = 0;
|
stage = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
public boolean handle(int interfaceId, int buttonId) {
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0:
|
case 0:
|
||||||
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thank you.", "Where do you get your Karambwan from?");
|
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thank you.", "Where do you get your Karambwan from?");
|
||||||
stage = 1;
|
stage = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
switch (buttonId) {
|
switch (buttonId) {
|
||||||
case 1:
|
case 1:
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
|
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
|
||||||
stage = 10;
|
stage = 10;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, thank you.");
|
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, thank you.");
|
||||||
stage = 20;
|
stage = 20;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Where do you get your Karambwan from?");
|
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Where do you get your Karambwan from?");
|
||||||
stage = 30;
|
stage = 30;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
end();
|
end();
|
||||||
npc.openShop(player);
|
npc.openShop(player);
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
end();
|
end();
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 30:
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "We buy directly off Lubufu, a local fisherman. He", "seems to have a monopoly over Karambwan sale.");
|
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "We buy directly off Lubufu, a local fisherman. He", "seems to have a monopoly over Karambwan sales.");
|
||||||
stage = 31;
|
stage = 31;
|
||||||
break;
|
break;
|
||||||
case 31:
|
case 31:
|
||||||
end();
|
end();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getIds() {
|
public int[] getIds() {
|
||||||
return new int[] { 793 };
|
return new int[] { 793 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +1,72 @@
|
|||||||
package core.game.node.entity.skill.cooking
|
package core.game.node.entity.skill.cooking
|
||||||
|
|
||||||
import core.game.node.`object`.Scenery
|
import core.game.node.`object`.Scenery
|
||||||
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
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import org.rs09.consts.Items.BREAD_DOUGH_2307
|
import org.rs09.consts.Items.BREAD_DOUGH_2307
|
||||||
import org.rs09.consts.Items.RAW_BEEF_2132
|
import org.rs09.consts.Items.RAW_BEEF_2132
|
||||||
import org.rs09.consts.Items.SEAWEED_401
|
import org.rs09.consts.Items.SEAWEED_401
|
||||||
import org.rs09.consts.Items.UNCOOKED_CAKE_1889
|
import org.rs09.consts.Items.UNCOOKED_CAKE_1889
|
||||||
import rs09.game.interaction.InteractionListener
|
import rs09.game.interaction.InteractionListener
|
||||||
import rs09.game.node.entity.skill.cooking.CookingDialogue
|
import rs09.game.node.entity.skill.cooking.CookingDialogue
|
||||||
|
|
||||||
//author: Ceik
|
//author: Ceik
|
||||||
class CookingRewrite : InteractionListener() {
|
class CookingRewrite : InteractionListener() {
|
||||||
|
|
||||||
val RAW_FOODS: IntArray
|
val RAW_FOODS: IntArray
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val list = CookableItems.values().map { it.raw }.toMutableList()
|
val list = CookableItems.values().map { it.raw }.toMutableList()
|
||||||
list.add(Items.COOKED_MEAT_2142)
|
list.add(Items.COOKED_MEAT_2142)
|
||||||
list.add(RAW_BEEF_2132)
|
list.add(RAW_BEEF_2132)
|
||||||
list.add(SEAWEED_401)
|
list.add(SEAWEED_401)
|
||||||
RAW_FOODS = list.toIntArray()
|
RAW_FOODS = list.toIntArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun defineListeners() {
|
override fun defineListeners() {
|
||||||
|
|
||||||
onUseWith(OBJECT,RAW_FOODS, *COOKING_OBJs){player, used, with ->
|
onUseWith(OBJECT,RAW_FOODS, *COOKING_OBJs){player, used, with ->
|
||||||
val item = used.asItem()
|
val item = used.asItem()
|
||||||
val obj = with.asObject()
|
val obj = with.asObject()
|
||||||
val range = obj.name.toLowerCase().contains("range")
|
val range = obj.name.toLowerCase().contains("range")
|
||||||
when (item.id) {
|
when (item.id) {
|
||||||
RAW_BEEF_2132 -> if (range) {
|
RAW_BEEF_2132 -> if (range) {
|
||||||
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) {
|
SEAWEED_401 -> if (range) {
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item.id,1781,false,obj))
|
player.dialogueInterpreter.open(CookingDialogue(item.id,1781,false,obj))
|
||||||
return@onUseWith true
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//cook a standard item
|
//cook a standard item
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item.id,obj))
|
player.dialogueInterpreter.open(CookingDialogue(item.id,obj))
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val COOKING_OBJs = intArrayOf(24313,21302, 13528, 13529, 13533, 13531, 13536, 13539, 13542, 2728, 2729, 2730, 2731, 2732, 2859, 3038, 3039, 3769, 3775, 4265, 4266, 5249, 5499, 5631, 5632, 5981, 9682, 10433, 11404, 11405, 11406, 12102, 12796, 13337, 13881, 14169, 14919, 15156, 20000, 20001, 21620, 21792, 22713, 22714, 23046, 24283, 24284, 25155, 25156, 25465, 25730, 27297, 29139, 30017, 32099, 33500, 34495, 34546, 36973, 37597, 37629, 37726, 114, 4172, 5275, 8750, 16893, 22154, 34410, 34565, 114, 9085, 9086, 9087, 12269, 15398, 25440, 25441, 2724, 2725, 2726, 4618, 4650, 5165, 6093, 6094, 6095, 6096, 8712, 9439, 9440, 9441, 10824, 17640, 17641, 17642, 17643, 18039, 21795, 24285, 24329, 27251, 33498, 35449, 36815, 36816, 37426, 40110)
|
val COOKING_OBJs = intArrayOf(24313,21302, 13528, 13529, 13533, 13531, 13536, 13539, 13542, 2728, 2729, 2730, 2731, 2732, 2859, 3038, 3039, 3769, 3775, 4265, 4266, 5249, 5499, 5631, 5632, 5981, 9682, 10433, 11404, 11405, 11406, 12102, 12796, 13337, 13881, 14169, 14919, 15156, 20000, 20001, 21620, 21792, 22713, 22714, 23046, 24283, 24284, 25155, 25156, 25465, 25730, 27297, 29139, 30017, 32099, 33500, 34495, 34546, 36973, 37597, 37629, 37726, 114, 4172, 5275, 8750, 16893, 22154, 34410, 34565, 114, 9085, 9086, 9087, 12269, 15398, 25440, 25441, 2724, 2725, 2726, 4618, 4650, 5165, 6093, 6094, 6095, 6096, 8712, 9374, 9439, 9440, 9441, 10824, 17640, 17641, 17642, 17643, 18039, 21795, 24285, 24329, 27251, 33498, 35449, 36815, 36816, 37426, 40110)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun cook(player: Player, `object`: Scenery?, initial: Int, product: Int, amount: Int) {
|
fun cook(player: Player, `object`: Scenery?, initial: Int, product: Int, amount: Int) {
|
||||||
val food = Item(initial)
|
val food = Item(initial)
|
||||||
if (food.name.toLowerCase().contains("pizza")) {
|
if (food.name.toLowerCase().contains("pizza")) {
|
||||||
player.pulseManager.run(PizzaCookingPulse(player, `object`, initial, product, amount))
|
player.pulseManager.run(PizzaCookingPulse(player, `object`, initial, product, amount))
|
||||||
} else if (food.name.toLowerCase().contains("pie")) {
|
} else if (food.name.toLowerCase().contains("pie")) {
|
||||||
player.pulseManager.run(PieCookingPulse(player, `object`, initial, product, amount))
|
player.pulseManager.run(PieCookingPulse(player, `object`, initial, product, amount))
|
||||||
} else if (CookableItems.intentionalBurn(initial)) {
|
} else if (CookableItems.intentionalBurn(initial)) {
|
||||||
player.pulseManager.run(IntentionalBurnPulse(player, `object`, initial, product, amount))
|
player.pulseManager.run(IntentionalBurnPulse(player, `object`, initial, product, amount))
|
||||||
} else {
|
} else {
|
||||||
player.pulseManager.run(StandardCookingPulse(player, `object`, initial, product, amount))
|
player.pulseManager.run(StandardCookingPulse(player, `object`, initial, product, amount))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user