Cats will no longer eat buckets

Created a new command, ::petrate, for testing pet growth. ::petrate 0 is for pausing growth, 1 for 1x rate, and 2 uses the dev rate of growth (100x normal)
Adult and overgrown cats will not grow hungry
Removed several pets inauthentic to 2009
Dogs no longer can turn into minotaurs
Wolpertingers now double yield and experience from bushes
This commit is contained in:
Syndromeramo 2025-07-15 12:23:58 +00:00 committed by Ryan
parent cb17786a86
commit 98f662d0c6
6 changed files with 67 additions and 33 deletions

View file

@ -5,6 +5,7 @@ import core.cache.def.impl.SceneryDefinition
import core.game.interaction.OptionHandler import core.game.interaction.OptionHandler
import core.game.node.Node import core.game.node.Node
import content.global.skill.summoning.familiar.GiantEntNPC import content.global.skill.summoning.familiar.GiantEntNPC
import content.global.skill.summoning.familiar.WolpertingerNPC
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.player.link.diary.DiaryType import core.game.node.entity.player.link.diary.DiaryType
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
@ -76,8 +77,15 @@ class FruitAndBerryPicker : OptionHandler() {
animate(player, animation) animate(player, animation)
playAudio(player, Sounds.FARMING_PICK_2437) playAudio(player, Sounds.FARMING_PICK_2437)
if (familiar != null && familiar is WolpertingerNPC && patch.patch.type == PatchType.BUSH_PATCH) {
addItemOrDrop(player, reward.id, reward.amount * 2)
rewardXP(player, Skills.FARMING, plantable.harvestXP * 2)
}
else {
addItemOrDrop(player, reward.id, reward.amount) addItemOrDrop(player, reward.id, reward.amount)
rewardXP(player, Skills.FARMING, plantable.harvestXP) rewardXP(player, Skills.FARMING, plantable.harvestXP)
}
patch.setCurrentState(patch.getCurrentState() - 1) patch.setCurrentState(patch.getCurrentState() - 1)
if (patch.patch.type == PatchType.CACTUS_PATCH) { if (patch.patch.type == PatchType.CACTUS_PATCH) {

View file

@ -16,6 +16,7 @@ import core.game.node.item.Item;
import core.game.world.map.Location; import core.game.world.map.Location;
import core.game.world.map.zone.ZoneRestriction; import core.game.world.map.zone.ZoneRestriction;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import org.rs09.consts.Items;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -341,6 +342,9 @@ public final class FamiliarManager {
for (int food : pets.getFood()) { for (int food : pets.getFood()) {
if (food == foodId) { if (food == foodId) {
player.getInventory().remove(new Item(foodId)); player.getInventory().remove(new Item(foodId));
if (foodId == Items.BUCKET_OF_MILK_1927) {
player.getInventory().add(new Item(Items.BUCKET_1925));
}
player.getPacketDispatch().sendMessage("Your pet happily eats the " + ItemDefinition.forId(food).getName() + "."); player.getPacketDispatch().sendMessage("Your pet happily eats the " + ItemDefinition.forId(food).getName() + ".");
player.animate(new Animation(827)); player.animate(new Animation(827));
npc.getDetails().updateHunger(-15.0); npc.getDetails().updateHunger(-15.0);

View file

@ -67,7 +67,7 @@ public final class KittenInteractDialogue extends DialoguePlugin {
interpreter.sendDialogues(player, null, "That cat sure loves to be stroked."); interpreter.sendDialogues(player, null, "That cat sure loves to be stroked.");
stage = 99; stage = 99;
break; break;
case 2:// chase-vermine case 2:// chase-vermin
end(); end();
player.sendChat("Go on puss...kill that rat!"); player.sendChat("Go on puss...kill that rat!");
boolean cant = true; boolean cant = true;

View file

@ -5,7 +5,6 @@ import content.global.skill.summoning.familiar.Familiar;
import content.global.skill.summoning.familiar.FamiliarSpecial; import content.global.skill.summoning.familiar.FamiliarSpecial;
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 core.game.world.GameWorld;
import static core.api.ContentAPIKt.*; import static core.api.ContentAPIKt.*;
@ -67,10 +66,13 @@ public final class Pet extends Familiar {
@Override @Override
public void handleTickActions() { public void handleTickActions() {
final PetDetails petDetails = details; final PetDetails petDetails = details;
if (getPet().getFood().length > 0) { if (getPet().getFood().length > 0 && !pet.isGrownCat(itemId)) {
if(!SkillcapePerks.isActive(SkillcapePerks.PET_MASTERY, owner)) { if(!SkillcapePerks.isActive(SkillcapePerks.PET_MASTERY, owner)) {
double amount = itemId == pet.getBabyItemId() ? 0.025 : 0.018; double amount = itemId == pet.getBabyItemId() ? 0.025 : 0.018;
if (GameWorld.getSettings().isDevMode()) { if (owner.getAttribute("petrate",1) == 0) {
amount = 0 ;
}
else if (owner.getAttribute("petrate",1) == 2) {
amount *= 100; amount *= 100;
} }
petDetails.updateHunger(amount); petDetails.updateHunger(amount);
@ -96,7 +98,10 @@ public final class Pet extends Familiar {
double growth = petDetails.getGrowth(); double growth = petDetails.getGrowth();
double growthrate = pet.getGrowthRate(); double growthrate = pet.getGrowthRate();
if (growthrate > 0.000) { if (growthrate > 0.000) {
if (GameWorld.getSettings().isDevMode()) { if (owner.getAttribute("petrate",1) == 0) {
growthrate = 0;
}
else if (owner.getAttribute("petrate",1) == 2) {
growthrate *= 100; growthrate *= 100;
} }
petDetails.updateGrowth(growthrate); petDetails.updateGrowth(growthrate);

View file

@ -25,16 +25,6 @@ public enum Pets {
*/ */
CLOCKWORK_CAT(7771, 7772, -1, 3598, -1, -1, 0.0, 0), CLOCKWORK_CAT(7771, 7772, -1, 3598, -1, -1, 0.0, 0),
/**
* The firemaker's curse pets.
*/
SEARING_FLAME(22994, -1, -1, 14769, -1, -1, 0.0, 0), GLOWING_EMBER(22993, -1, -1, 14768, -1, -1, 0.0, 0), TWISTED_FIRESTARTER(22995, -1, -1, 14770, -1, -1, 0.0, 0), WARMING_FLAME(22992, -1, -1, 14767, -1, -1, 0.0, 0),
/**
* Troll baby pet.
*/
TROLL_BABY(23030, 23030, -1, 14846, -1, -1, 0.0, 0),
/** /**
* A bulldog pet. * A bulldog pet.
*/ */
@ -63,7 +53,7 @@ public enum Pets {
/** /**
* A terrier pet. * A terrier pet.
*/ */
TERRIER(12512, 12513, -1, 6958, 6859, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526), TERRIER_1(12700, 12701, -1, 7237, 7238, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526), TERRIER_2(12702, 12703, -1, 7239, 7240, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526), TERRIER(12512, 12513, -1, 6958, 6959, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526), TERRIER_1(12700, 12701, -1, 7237, 7238, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526), TERRIER_2(12702, 12703, -1, 7239, 7240, -1, 0.0033333333333333, 4, 2132, 2134, 2136, 2138, 10816, 9986, 9978, 526),
/** /**
* A creeping hand pet. * A creeping hand pet.
@ -90,11 +80,6 @@ public enum Pets {
*/ */
//ABYSSAL_MINION(14651, -1, -1, 8624, -1, -1, 0.0033333333333333, 4, 592), //ABYSSAL_MINION(14651, -1, -1, 8624, -1, -1, 0.0033333333333333, 4, 592),
/**
* Rune guardian pets.
*/
RUNE_GUARDIAN(15626, -1, -1, 9656, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_1(15627, -1, -1, 9657, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_2(15628, -1, -1, 9658, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_3(15629, -1, -1, 9659, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_4(15630, -1, -1, 9660, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_5(15631, -1, -1, 9661, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_6(15632, -1, -1, 9662, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_7(15633, -1, -1, 9663, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_8(15634, -1, -1, 9664, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_9(15635, -1, -1, 9665, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_10(15636, -1, -1, 9666, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_11(15637, -1, -1, 9667, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_12(15638, -1, -1, 9668, -1, -1, 0.0033333333333333, 4), RUNE_GUARDIAN_13(15639, -1, -1, 9669, -1, -1, 0.0033333333333333, 4),
/** /**
* Gecko pet. * Gecko pet.
*/ */
@ -115,11 +100,6 @@ public enum Pets {
*/ */
PENGUIN(12481, 12482, -1, 6908, 6909, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270), PENGUIN_1(12763, 12762, -1, 7313, 7314, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270), PENGUIN_2(12765, 12764, -1, 7316, 7317, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270), PENGUIN(12481, 12482, -1, 6908, 6909, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270), PENGUIN_1(12763, 12762, -1, 7313, 7314, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270), PENGUIN_2(12765, 12764, -1, 7316, 7317, -1, 0.0046296296296296, 30, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270),
/**
* A tooth creature pet.
*/
TOOTH_CREATURE(18671, 18669, -1, 11411, 11413, -1, 0.075757575757576, 37, 1927, 1977),
/** /**
* A giant crab pet. * A giant crab pet.
*/ */
@ -155,11 +135,6 @@ public enum Pets {
*/ */
RACCOON(12486, 12487, -1, 6913, 6914, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978), RACCOON_1(12734, 12735, -1, 7271, 7272, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978), RACCOON_2(12736, 12737, -1, 7273, 7274, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978), RACCOON(12486, 12487, -1, 6913, 6914, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978), RACCOON_1(12734, 12735, -1, 7271, 7272, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978), RACCOON_2(12736, 12737, -1, 7273, 7274, -1, 0.0029444444444444, 80, 321, 363, 341, 15264, 345, 377, 353, 389, 7944, 349, 331, 327, 395, 383, 317, 371, 335, 359, 15264, 15270, 2132, 2134, 2136, 2138, 10816, 9986, 9978),
/**
* A sneaker peeper pet.
*/
SNEAKER_PEEPER(19894, 19895, -1, 13089, 13090, -1, 0.05, 80, 221),
/** /**
* A vulture pet. * A vulture pet.
*/ */
@ -446,4 +421,24 @@ public enum Pets {
return false; return false;
} }
} }
/**
* Checks if this pet is a grown cat
* @return a boolean, true if the pet is a grown cat
*/
public boolean isGrownCat(int id) {
switch (this) {
case CAT:
case CAT_1:
case CAT_2:
case CAT_3:
case CAT_4:
case CAT_5:
case CAT_6:
case HELLCAT:
return id == grownItemId || id == overgrownItemId;
default:
return false;
}
}
} }

View file

@ -217,6 +217,28 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) {
p.graphics(Graphics(369, 0)) p.graphics(Graphics(369, 0))
} }
} }
/**
* Toggles pet hunger to off, normal, or dev
* 0 = No hunger/growth mode (hunger/growth does not progress)
* 1 = Normal hunger/growth mode (1x speed)
* 2 = Dev hunger/growth mode (100x speed)
*/
define("petrate", Privilege.ADMIN, "petrate <lt>0-2<gt>", "Sets pet hunger and growth to off, normal, or dev."){ player, args ->
if(args.size < 2) {
notify(player, "Pet mode is currently ${player.getAttribute("petrate", 1)}")
return@define
}
val mode = args[1].toIntOrNull() ?: (-1).also { reject(player, "Please enter a valid number") }
if (mode in 0 .. 2) {
player.setAttribute("petrate", mode)
notify(player, "Setting pet mode to $mode")
}
else {
reject(player, "Only modes 0-2 are valid")
}
}
} }
fun bury(player: Player){ fun bury(player: Player){