More sounds + audio refactoring
Modified default audio radius default parameter to be safer, 8 tiles instead of 15 Improved location/direction based sounds Fixed the way sounds are handled for magic spells (All modern and ancient combat spells. All lunar teleport spells.) Magic spells now correctly fade in volume the further away you are from a target/player casting or being hit by a spell. The sound starts to fade after a few tiles until it cant be heard anymore Refactored lunar teleport sounds to use playGlobalAudio Humidfy now can be heard globally by other players Fixed Lunar fertile soil spell graphics and animation to be authentic Weapon attack sounds now start to fade after a few tiles until it cant be heard anymore NPC attack sound now fades with distance NPC hurt sound now fades with distance NPC death sound now fades with distance Fixed combat punching sound when no weapon is equipped so it can be heard globally Fixed a issue where you would hear a punching sound when casting any combat spell Fixed male player hurt sounds when in combat Implemented female player hurt sounds when in combat Failing agility obstacles will now play the correct hurt sound based on gender Fixed low wall agility pyramid sound Fixed taking damage from dying of thirst in the desert to use correct sounds Fixed the sound of drinking from a waterskin in the desert Implemented sound when attaching godsword blades to a hilt Fixed rune essence mine teleport sound so it no longer loops 10 times and plays authentically Implemented undead tree attack sound at Draynor manor Implemented all ectofunctus bone grinder sounds and the sound when offering to the ectofunctus Implemented mort myre ghast attack and player hurt sounds Fixed thieving pickpocket fail sounds Implemented falador guards combat sounds Implemented varrock guards combat sounds Implemented draynor market guard combat sounds Implemented cyclops combat sounds (warriors guild cyclops) Implemented animated armor combat sounds (all warriors guild animated armors) Implemented white wolf/big wolf/wolf combat sounds (wolves on white wolf mountain)
This commit is contained in:
@@ -7,6 +7,9 @@ import core.game.node.item.Item;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.Initializable;
|
||||
import core.tools.StringUtils;
|
||||
import org.rs09.consts.Sounds;
|
||||
|
||||
import static core.api.ContentAPIKt.playAudio;
|
||||
|
||||
/**
|
||||
* Handles the attaching of a hilt on the godsword blade.
|
||||
@@ -40,6 +43,7 @@ public final class GodswordHiltAttachPlugin extends UseWithHandler {
|
||||
item = new Item(item.getId() - 8);
|
||||
player.getInventory().add(item);
|
||||
String name = item.getDefinition().getName();
|
||||
playAudio(player, Sounds.GODWARS_GODSWORD_FIX_3889);
|
||||
player.getPacketDispatch().sendMessage("You attach the hilt to the blade and make a" + (StringUtils.isPlusN(name) ? "n " : " ") + name + ".");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public final class AgilityHandler {
|
||||
player.getProperties().setTeleportLocation(dest);
|
||||
if (hit > 0) {
|
||||
player.getImpactHandler().setDisabledTicks(0);
|
||||
player.getImpactHandler().manualHit(player, hit, HitsplatType.NORMAL);
|
||||
impact(player, hit, HitsplatType.NORMAL);
|
||||
}
|
||||
if (message != null) {
|
||||
player.getPacketDispatch().sendMessage(message);
|
||||
|
||||
@@ -223,15 +223,14 @@ public final class AgilityPyramidCourse extends AgilityCourse {
|
||||
}
|
||||
player.lock(4);
|
||||
player.getPacketDispatch().sendMessage("You climb the low wall...");
|
||||
playAudio(player, Sounds.CLIMB_WALL_2453,10, 40);
|
||||
if (fail) {
|
||||
Location end = player.getLocation().transform(d, 1);
|
||||
player.lock(3);
|
||||
playAudio(player, Sounds.PYRAMID_SLIP_1397, 10, 25);
|
||||
AgilityHandler.failWalk(player, 2, player.getLocation(), end, end, Animation.create(1106), 15, getHitAmount(player), "You lost your balance!");
|
||||
AgilityHandler.forceWalk(player, -1, end, player.getLocation(), ForceMovement.WALK_ANIMATION, 10, 0.0, null, 4);
|
||||
return;
|
||||
}
|
||||
playAudio(player, Sounds.CLIMB_WALL_2453,10, 40);
|
||||
AgilityHandler.forceWalk(player, 0, player.getLocation(), player.getLocation().transform(d, 2), Animation.create(1252), 6, 8, "... and make it over.");
|
||||
player.animate(Animation.RESET, 4);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Sounds;
|
||||
|
||||
import static core.api.ContentAPIKt.playGlobalAudio;
|
||||
|
||||
/**
|
||||
* Handles the Blood spells from the Ancient spellbook.
|
||||
* @author Emperor
|
||||
@@ -95,7 +97,7 @@ public final class BloodSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, getAudio());
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,9 +11,7 @@ import core.game.node.entity.combat.spell.SpellType;
|
||||
import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.impl.Animator.Priority;
|
||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import core.game.node.entity.player.link.audio.Audio;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.game.world.update.flag.context.Graphics;
|
||||
import core.plugin.Initializable;
|
||||
@@ -104,15 +102,14 @@ public final class IceSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, audio);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visualizeImpact(Entity entity, Entity target, BattleState state) {
|
||||
if (state.isFrozen()) {
|
||||
if (target == entity.getProperties().getCombatPulse().getVictim()) {
|
||||
sendAudio(target, new Audio(impactAudio, 1, 20));
|
||||
}
|
||||
playGlobalAudio(target.getLocation(), impactAudio, 1, 20);
|
||||
target.graphics(BARRAGE_ORB);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public final class MiasmicSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, audio);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package content.global.skill.magic.ancient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.combat.spell.Runes;
|
||||
import core.game.node.Node;
|
||||
@@ -19,6 +20,9 @@ import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Sounds;
|
||||
|
||||
import static core.api.ContentAPIKt.playAudio;
|
||||
import static core.api.ContentAPIKt.playGlobalAudio;
|
||||
|
||||
/**
|
||||
* Handles the Shadow spells from the Ancient spellbook.
|
||||
* @author Emperor
|
||||
@@ -96,7 +100,7 @@ public final class ShadowSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, audio);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import core.game.node.entity.combat.spell.CombatSpell;
|
||||
import core.game.node.entity.combat.spell.SpellType;
|
||||
import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.impl.Animator.Priority;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
@@ -107,7 +108,7 @@ public final class SmokeSpells extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, audio);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Animation;
|
||||
import core.game.world.update.flag.context.Graphics;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Sounds;
|
||||
|
||||
import static core.api.ContentAPIKt.playGlobalAudio;
|
||||
|
||||
/**
|
||||
* Represents the humidify spell.
|
||||
@@ -74,7 +77,7 @@ public final class HumidifySpell extends MagicSpell {
|
||||
p.lock(ANIMATION.getDuration() + 1);
|
||||
p.animate(ANIMATION);
|
||||
p.graphics(GRAPHIC);
|
||||
p.getAudioManager().send(3614);
|
||||
playGlobalAudio(p.getLocation(), Sounds.LUNAR_HUMIDIFY_3614, 1, 20);
|
||||
for (int k = 0; k < 28; k++) {
|
||||
for (int i = 0; i < 21; i++) {
|
||||
if (p.getInventory().contains(EMPTY[i], 1)) {
|
||||
|
||||
@@ -16,7 +16,7 @@ val NPC_CONTACT_ANIM = Animation(4413)
|
||||
val PLANK_MAKE_ANIM = Animation(6298)
|
||||
val STRING_JEWELLERY_ANIM = Animation(4412)
|
||||
val SUPERGLASS_MAKE_ANIM = Animation(4413)
|
||||
val FERTILE_SOIL_ANIM = Animation(724)
|
||||
val FERTILE_SOIL_ANIM = Animation(4413)
|
||||
val CURE_ME_ANIM = Animation(4411)
|
||||
val CURE_GROUP_ANIM = Animation(4409)
|
||||
val CURE_OTHER_ANIM = Animation(4411)
|
||||
@@ -31,7 +31,7 @@ val NPC_CONTACT_GFX = Graphics(730,130)
|
||||
val PLANK_MAKE_GFX = Graphics(1063, 120)
|
||||
val STRING_JEWELLERY_GFX = Graphics(728, 100)
|
||||
val SUPERGLASS_MAKE_GFX = Graphics(729, 120)
|
||||
val FERTILE_SOIL_GFX = Graphics(141, 96)
|
||||
val FERTILE_SOIL_GFX = Graphics(724)
|
||||
val CURE_ME_GFX = Graphics(731, 90)
|
||||
val CURE_GROUP_GFX = Graphics(751, 130)
|
||||
val CURE_OTHER_GFX = Graphics(738, 130)
|
||||
|
||||
@@ -26,6 +26,7 @@ import core.game.world.repository.Repository
|
||||
import core.tools.RandomFunction
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.Sounds
|
||||
import kotlin.math.floor
|
||||
|
||||
class LunarListeners : SpellListener("lunar"), Commands {
|
||||
@@ -39,91 +40,91 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
|
||||
onCast(Lunar.MOONCLAN_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,69, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,2)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,66.0, Location.create(2111, 3916, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.MOONCLAN_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,70, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,4)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,67.0,"Moonclan Island",Location.create(2111, 3916, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.OURANIA_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,71, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,6)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,69.0, Location.create(2469, 3247, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.WATERBIRTH_TELEPORT, NONE){ player, _ ->
|
||||
requires(player,72, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,71.0, Location.create(2527, 3739, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.WATERBIRTH_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,73, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555,5)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,72.0,"Waterbirth Island", Location.create(2527, 3739, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.BARBARIAN_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,75, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,3)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,76.0, Location.create(2544, 3572, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.BARBARIAN_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,77, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,6)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,77.0,"Barbarian Outpost", Location.create(2544, 3572, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.KHAZARD_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,78, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,4)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,80.0, Location.create(2656, 3157, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.KHAZARD_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,79, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,8)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,81.0, "Port Khazard", Location.create(2656, 3157, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.FISHING_GUILD_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,85, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,89.0, Location.create(2611, 3393, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.FISHING_GUILD_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,86, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,14)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,90.0,"Fishing Guild", Location.create(2611, 3393, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.CATHERBY_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,87, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,92.0, Location.create(2804, 3433, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.CATHERBY_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,88, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,15)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,93.0,"Catherby", Location.create(2804, 3433, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.ICE_PLATEAU_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,89, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,8)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendTeleport(player,96.0, Location.create(2972, 3873, 0))
|
||||
}
|
||||
|
||||
onCast(Lunar.ICE_PLATEAU_GR_TELEPORT, NONE) { player, _ ->
|
||||
requires(player,90, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,16)))
|
||||
player.getAudioManager().send(Audio(200), true)
|
||||
playGlobalAudio(player.location, Sounds.TELEPORT_ALL_200)
|
||||
sendGroupTeleport(player,99.0, "Ice Plateau", Location.create(2972, 3873, 0))
|
||||
}
|
||||
|
||||
@@ -468,7 +469,9 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
||||
}
|
||||
requires(player, 83, arrayOf(Item(Items.ASTRAL_RUNE_9075, 3), Item(Items.NATURE_RUNE_561, 2), Item(Items.EARTH_RUNE_557, 15)))
|
||||
removeRunes(player, true)
|
||||
visualizeSpell(player, FERTILE_SOIL_ANIM, FERTILE_SOIL_GFX, 2891)
|
||||
animate(player, FERTILE_SOIL_ANIM)
|
||||
sendGraphics(FERTILE_SOIL_GFX, target.location)
|
||||
playGlobalAudio(target.location, Sounds.LUNAR_FERTILIZE_2891)
|
||||
patch.compost = CompostType.SUPER
|
||||
sendMessage(player, "You fertilize the soil.")
|
||||
addXP(player, 87.0)
|
||||
|
||||
@@ -13,7 +13,6 @@ import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import core.game.node.entity.player.link.audio.Audio;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
@@ -23,6 +22,8 @@ import core.plugin.Plugin;
|
||||
import org.rs09.consts.Items;
|
||||
import org.rs09.consts.Sounds;
|
||||
|
||||
import static core.api.ContentAPIKt.*;
|
||||
|
||||
/**
|
||||
* Handles the god spells.
|
||||
* @author Emperor
|
||||
@@ -192,19 +193,19 @@ public final class GodSpells extends CombatSpell {
|
||||
if (state.getEstimatedHit() == -1) {
|
||||
target.graphics(SPLASH_GRAPHIC);
|
||||
if (projectile == SARA_PROJECTILE) {
|
||||
sendAudio(target, new Audio(Sounds.SARADOMIN_STRIKE_FAIL_1656, 1, 20));
|
||||
playGlobalAudio(target.getLocation(), Sounds.SARADOMIN_STRIKE_FAIL_1656, 1, 20);
|
||||
}
|
||||
if (projectile == GUTHIX_PROJECTILE) {
|
||||
sendAudio(target, new Audio(Sounds.CLAWS_OF_GUTHIX_FAIL_1652, 1, 20));
|
||||
playGlobalAudio(target.getLocation(), Sounds.CLAWS_OF_GUTHIX_FAIL_1652, 1, 20);
|
||||
}
|
||||
if (projectile == ZAM_PROJECTILE) {
|
||||
sendAudio(target, new Audio(Sounds.FLAMES_OF_ZAMORAK_FAIL_1654, 1, 20));
|
||||
playGlobalAudio(target.getLocation(), Sounds.FLAMES_OF_ZAMORAK_FAIL_1654, 1, 20);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
target.graphics(endGraphic);
|
||||
sendAudio(entity, new Audio(impactAudio, 1));
|
||||
playGlobalAudio(target.getLocation(), impactAudio, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -78,7 +78,7 @@ public final class TeleblockSpell extends CombatSpell {
|
||||
projectile.transform(entity, (Entity) target, false, 58, 10).send();
|
||||
}
|
||||
entity.animate(animation);
|
||||
sendAudio(entity, audio);
|
||||
playGlobalAudio(entity.getLocation(), audio.getId(), 1, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,24 +1,21 @@
|
||||
package content.global.skill.thieving
|
||||
|
||||
import content.global.skill.skillcapeperks.SkillcapePerks
|
||||
import core.api.stun
|
||||
import core.api.*
|
||||
import core.game.node.entity.combat.ImpactHandler
|
||||
import core.game.node.entity.impl.Animator
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.audio.Audio
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import core.tools.RandomFunction
|
||||
import org.rs09.consts.Items
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.IntType
|
||||
import core.tools.secondsToTicks
|
||||
import org.rs09.consts.Sounds
|
||||
|
||||
class ThievingListeners : InteractionListener {
|
||||
|
||||
private val PICKPOCKET_ANIM = Animation(881,Animator.Priority.HIGH)
|
||||
private val NPC_ANIM = Animation(422)
|
||||
private val SUCCESS = Audio(2581, 1, 0)
|
||||
|
||||
override fun defineListeners() {
|
||||
|
||||
@@ -56,8 +53,7 @@ class ThievingListeners : InteractionListener {
|
||||
node.asNpc().face(player)
|
||||
node.asNpc().animator.animate(NPC_ANIM)
|
||||
|
||||
val hitSoundId = 518 + RandomFunction.random(4) // choose 1 of 4 possible hit noises
|
||||
player.audioManager.send(hitSoundId, 1, 20) // OSRS defines a delay of 20
|
||||
playHurtAudio(player, 20)
|
||||
|
||||
stun(player, pickpocketData.stunTime)
|
||||
|
||||
@@ -65,7 +61,7 @@ class ThievingListeners : InteractionListener {
|
||||
|
||||
node.asNpc().face(null)
|
||||
} else {
|
||||
player.audioManager.send(SUCCESS)
|
||||
playAudio(player, Sounds.PICK_2581)
|
||||
player.lock(2)
|
||||
pickpocketData.table.roll().forEach { player.inventory.add(it) }
|
||||
player.skills.addExperience(Skills.THIEVING,pickpocketData.experience)
|
||||
|
||||
@@ -18,6 +18,7 @@ import core.game.world.update.flag.context.Animation
|
||||
import core.game.world.update.flag.context.Graphics
|
||||
import core.tools.RandomFunction
|
||||
import core.game.world.GameWorld
|
||||
import org.rs09.consts.Sounds
|
||||
|
||||
/**
|
||||
* Represents a utilitity class for rune essence teleporting.
|
||||
@@ -57,7 +58,7 @@ object EssenceTeleport {
|
||||
npc.faceTemporary(player, 1)
|
||||
npc.graphics(GLOWING_HANDS_GFX)
|
||||
lock(player,4)
|
||||
player.audioManager.send(125)
|
||||
playGlobalAudio(player.location, Sounds.CURSE_ALL_125, 1)
|
||||
Projectile.create(npc, player, CURSE_PROJECTILE).send()
|
||||
npc.sendChat("Senventior Disthine Molenko!")
|
||||
GameWorld.Pulser.submit(object : Pulse(1) {
|
||||
|
||||
Reference in New Issue
Block a user