R0cky 0wnz
Donator
- Mar 6, 2008
- 2,590
- 160
- 0
Problem description: Kronos source only have "item on object" cooking, ie; bit annoying. This opens an interface similar to smelting
Fix:
In source search for "for (Food food : Food.values()) {" , found in Cooking.java
In the "static {" bracket, somewhere add the following:
add this method in the same class
Fix:
In source search for "for (Food food : Food.values()) {" , found in Cooking.java
In the "static {" bracket, somewhere add the following:
Code:
ObjectAction.register("range", "cook", (player, obj) -> {
SkillItem i = new SkillItem(317).name("Raw Shrimps").addAction((p, amount, event) -> cook_2(p, Food.RAW_SHRIMPS, obj, amount, 896, false));
SkillItem i2 = new SkillItem(321).name("Raw Anchovies").addAction((p, amount, event) -> cook_2(p, Food.RAW_ANCHOVIES, obj, amount, 896, false));
SkillItem i3 = new SkillItem(359).name("Raw Tuna").addAction((p, amount, event) -> cook_2(p, Food.RAW_TUNA, obj, amount, 896, false));
SkillItem i4 = new SkillItem(371).name("Raw Swordfish").addAction((p, amount, event) -> cook_2(p, Food.RAW_SWORDFISH, obj, amount, 896, false));
SkillItem i5 = new SkillItem(7944).name("Raw Monkfish").addAction((p, amount, event) -> cook_2(p, Food.RAW_MONKFISH, obj, amount, 896, false));
SkillItem i6 = new SkillItem(383).name("Raw Shark").addAction((p, amount, event) -> cook_2(p, Food.RAW_SHARK, obj, amount, 896, false));
SkillItem i8 = new SkillItem(389).name("Raw Manta").addAction((p, amount, event) -> cook_2(p, Food.RAW_MANTA_RAY, obj, amount, 896, false));
SkillItem i7 = new SkillItem(13439).name("Raw Anglerfish").addAction((p, amount, event) -> cook_2(p, Food.RAW_ANGLERFISH, obj, amount, 896, false));
SkillDialogue.cook(player, i, i2, i3, i4, i5, i6, i7, i8);
});
add this method in the same class
Code:
private static void cook_2(Player player, Food food, GameObject obj, int amount, int anim, boolean fire) {
if (!player.getStats().check(StatType.Cooking, food.levelRequirement, "cook " + food.descriptiveName))
return;
startCooking(player, food, obj, amount, anim, fire);
}
Attachments
Last edited: