Compare commits

..

6 Commits

Author SHA1 Message Date
Greg Tseng
22269f32f9 both quests now have a bribe option 2025-03-06 15:15:01 -05:00
Greg Tseng
5895b1e90a made Shield of Arrav completable with bribery to King Roald 2025-03-06 12:18:15 -05:00
Greg Tseng
d6add6cc4e initial bribing of King Roald enabled 2025-03-06 08:13:10 -05:00
Greg Tseng
504a49eaae accidentally uncommented out something in the west ardy civilian cat handler 2025-03-05 18:24:14 -05:00
Greg Tseng
709d259b77 This implements a stat for how many cats get sold for death runes
Merge branch 'cat-sold-counter'
2025-03-05 12:43:03 -05:00
Greg Tseng
ade60a1e45 finished the cats sold stat implementation 2025-03-05 12:42:03 -05:00
4 changed files with 11 additions and 19 deletions

View File

@ -43,5 +43,5 @@ I would strongly recommend contributing code to the [2009Scape project](https://
## License
Like 2009Scape, this is AGPLv3. This is, in my opinion, the only proper license for an open source RSPS. The key term of the license being if you wish to use this code to host your own server, you must also offer the source code for people to inspect and use, and allow them to make modifications to it as I did with 2009Scape's code.
Like 2009Scape, this is AGPLv3. This is, in my opinion, the only proper license for an open source RSPS. The key term of the license being if you wish to use this code, you must also offer the source code for people to inspect and use! (eg no private, for profit RSPS).

View File

@ -46,23 +46,23 @@ enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = n
WeightedItem(Items.TOOTH_HALF_OF_A_KEY_985,1,1,0.1),
WeightedItem(Items.LOOP_HALF_OF_A_KEY_987,1,1,0.1)
)),
// MAZE(npc = MazeNPC()),
MAZE(npc = MazeNPC()),
DRILL_DEMON(npc = SergeantDamienNPC()),
EVIL_CHICKEN(npc = EvilChickenNPC()),
// STRANGE_PLANT(npc = StrangePlantNPC()),
// SWARM(npc = SwarmNPC()),
// EVIL_BOB(npc = EvilBobNPC(), skillIds = intArrayOf(Skills.FISHING, Skills.MAGIC)),
STRANGE_PLANT(npc = StrangePlantNPC()),
SWARM(npc = SwarmNPC()),
EVIL_BOB(npc = EvilBobNPC(), skillIds = intArrayOf(Skills.FISHING, Skills.MAGIC)),
DRUNKEN_DWARF(npc = DrunkenDwarfNPC()),
RICK_TURPENTINE(npc = RickTurpentineNPC(), loot = CERTER.loot),
SURPRISE_EXAM(npc = MysteriousOldManNPC(), type = "sexam"),
FREAKY_FORESTER(npc = FreakyForesterNPC(), skillIds = intArrayOf(Skills.WOODCUTTING)),
// PILLORY(npc = PilloryNPC(), skillIds = intArrayOf(Skills.THIEVING)),
PILLORY(npc = PilloryNPC(), skillIds = intArrayOf(Skills.THIEVING)),
TREE_SPIRIT(npc = TreeSpiritRENPC(), skillIds = intArrayOf(Skills.WOODCUTTING)),
QUIZ_MASTER(npc = QuizMasterNPC()),
RIVER_TROLL(RiverTrollRENPC(), skillIds = intArrayOf(Skills.FISHING)),
// ROCK_GOLEM(RockGolemRENPC(), skillIds = intArrayOf(Skills.MINING)),
SHADE(ShadeRENPC(), skillIds = intArrayOf(Skills.PRAYER));
// ZOMBIE(ZombieRENPC(), skillIds = intArrayOf(Skills.PRAYER));
ROCK_GOLEM(RockGolemRENPC(), skillIds = intArrayOf(Skills.MINING)),
SHADE(ShadeRENPC(), skillIds = intArrayOf(Skills.PRAYER)),
ZOMBIE(ZombieRENPC(), skillIds = intArrayOf(Skills.PRAYER));
companion object {
@JvmField

View File

@ -128,12 +128,7 @@ public final class FamiliarManager {
}
if (currentPet != -1) {
int last = this.petDetails.get(currentPet).size() - 1;
PetDetails details;
if (last < 0) { //missing data in save due to historical bug (see GL !2077)
details = new PetDetails(0);
} else {
details = this.petDetails.get(currentPet).get(last);
}
PetDetails details = this.petDetails.get(currentPet).get(last);
Pets pets = Pets.forId(currentPet);
familiar = new Pet(player, details, currentPet, pets.getNpcId(currentPet));
} else if (familiarData.containsKey("familiar")) {
@ -419,9 +414,6 @@ public final class FamiliarManager {
* @param details The new pet details.
*/
public void addDetails(int itemId, PetDetails details) {
if (petDetails.get(itemId) == null) {
petDetails.put(itemId, new ArrayList<>());
}
petDetails.get(itemId).add(details);
}

View File

@ -129,8 +129,8 @@ public final class Pet extends Familiar {
if (pet.isKitten(itemId)) {
owner.incrementAttribute("/save:stats_manager:cats_raised");
}
owner.getFamiliarManager().addDetails(newItemId, details);
owner.getFamiliarManager().removeDetails(getItemId());
owner.getFamiliarManager().addDetails(newItemId, details);
owner.getFamiliarManager().morphPet(new Item(newItemId), false, location, details.getHunger(), 0);
owner.getPacketDispatch().sendMessage("<col=ff0000>Your pet has grown larger.</col>");
}