Merge branch 'misc-sfx' into 'master'

Add sound effects for chivalry, piety, potionmaking, and pouchmaking.

See merge request 2009scape/2009scape!300
This commit is contained in:
Ceikry
2021-10-15 11:17:54 +00:00
5 changed files with 16 additions and 2 deletions
@@ -43,6 +43,10 @@ public final class Prayer {
*/ */
public Prayer(Player player) { public Prayer(Player player) {
this.player = player; this.player = player;
// 1050 is checked client-side for making piety/chivalry disallowed sfx, likely due to the minigame requirement.
// Set it here unconditionally until the minigame is implemented.
player.varpManager.get(1050).setVarbit(1, 8);
} }
/** /**
@@ -61,8 +61,8 @@ public enum PrayerType {
RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(10000)), RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(10000)),
REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2678)), REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2678)),
SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2685)), SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2685)),
CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, 1000,65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)), CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, 3826, 65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)),
PIETY(70, 2, 1053, 57, PrayerCategory.PINK, 1000, 70 , new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2)); PIETY(70, 2, 1053, 57, PrayerCategory.PINK, 3825, 70, new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2));
/** /**
* Represents the a cache of objects related to prayers in order to decide * Represents the a cache of objects related to prayers in order to decide
@@ -117,6 +117,7 @@ public final class HerblorePulse extends SkillPulse<Item> {
final Item item = potion.getProduct(); final Item item = potion.getProduct();
player.getInventory().add(item); player.getInventory().add(item);
player.getPacketDispatch().sendMessage("You put the" + StringUtils.formatDisplayName(potion.getIngredient().getName().toLowerCase().replace("clean", "")) + " leaf into the vial of water."); player.getPacketDispatch().sendMessage("You put the" + StringUtils.formatDisplayName(potion.getIngredient().getName().toLowerCase().replace("clean", "")) + " leaf into the vial of water.");
player.getAudioManager().send(2608);
if (cycles++ == 3) { if (cycles++ == 3) {
player.animate(ANIMATION); player.animate(ANIMATION);
cycles = 0; cycles = 0;
@@ -133,6 +134,7 @@ public final class HerblorePulse extends SkillPulse<Item> {
player.getInventory().add(item); player.getInventory().add(item);
player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true); player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true);
player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion."); player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion.");
player.getAudioManager().send(2608);
player.animate(ANIMATION); player.animate(ANIMATION);
} }
} }
@@ -157,6 +157,7 @@ public final class SummoningCreator {
if (getDelay() == 1) { if (getDelay() == 1) {
setDelay(4); setDelay(4);
player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(8509)); player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(8509));
player.getAudioManager().send(4164); // 4277 also sounds the same
return false; return false;
} }
player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(8510)); player.getPacketDispatch().sendSceneryAnimation(object, Animation.create(8510));
@@ -312,6 +312,13 @@ class MiscCommandSet : CommandSet(Command.Privilege.ADMIN){
notify(player, "${VarbitDefinition.forObjectID(SceneryDefinition.forId(objectID).varbitID).configId}") notify(player, "${VarbitDefinition.forObjectID(SceneryDefinition.forId(objectID).varbitID).configId}")
} }
define("define_varbit"){ player, args ->
if(args.size < 2) {
reject(player, "Syntax: ::define_varbit varbitId")
}
val varbitID = args[1].toInt()
notify(player, "${varbitID}: ${VarbitDefinition.forId(varbitID, 0)}")
}
define("togglexp",Command.Privilege.STANDARD){ player, args -> define("togglexp",Command.Privilege.STANDARD){ player, args ->
val enabled = player.varpManager.get(2501).getVarbit(0)?.value == 1 val enabled = player.varpManager.get(2501).getVarbit(0)?.value == 1
player.varpManager.get(2501).setVarbit(0,if(enabled) 0 else 1).send(player) player.varpManager.get(2501).setVarbit(0,if(enabled) 0 else 1).send(player)