forked from 2009Scape/Server
Merge branch 'runecrafting-sfx' into 'master'
Add proper sound effects for crafting runes and antifire/antiposion expiration. See merge request 2009scape/2009scape!276
This commit is contained in:
commit
9b0b72a1d5
3 changed files with 27 additions and 1 deletions
|
|
@ -253,6 +253,29 @@ object DeveloperConsole {
|
|||
println("Error. Plays sound effect. Use: playsound soundID soundDelay soundVolume")
|
||||
}
|
||||
}
|
||||
"playsoundrange" -> {
|
||||
if (argSize == 4) {
|
||||
var beginID = if (clientCommand[1].toIntOrNull() == null) 0 else clientCommand[1].toInt()
|
||||
var endID = if (clientCommand[2].toIntOrNull() == null) 0 else clientCommand[2].toInt()
|
||||
var delay = if (clientCommand[3].toIntOrNull() == null) 0 else clientCommand[3].toInt()
|
||||
if (beginID > endID) {
|
||||
val tmp = endID;
|
||||
endID = beginID;
|
||||
beginID = tmp;
|
||||
}
|
||||
Thread(object : Runnable {
|
||||
override fun run() {
|
||||
for (i in beginID..endID) {
|
||||
println("Playing sound effect ${i}")
|
||||
AudioHandler.soundEffectHandler(1, i, 0)
|
||||
Thread.sleep(delay.toLong())
|
||||
}
|
||||
}
|
||||
}).start()
|
||||
} else {
|
||||
println("Error. Plays sound effect. Use: playsoundrange beginID endID delay")
|
||||
}
|
||||
}
|
||||
"playsong" -> {
|
||||
if (argSize in 2..8) {
|
||||
if (clientCommand[1].toIntOrNull() == null) {
|
||||
|
|
@ -427,4 +450,4 @@ object DeveloperConsole {
|
|||
TextureOperation12.outgoingBuffer.writeByte(command.length + 2)
|
||||
TextureOperation12.outgoingBuffer.writeString(command)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -480,6 +480,7 @@ public class Player extends Entity {
|
|||
if(time == 0){
|
||||
sendMessage(colorize("%RYour antifire potion has expired."));
|
||||
removeAttribute("fire:immune");
|
||||
getAudioManager().send(2607);
|
||||
}
|
||||
}
|
||||
if(getAttribute("poison:immunity",0) > 0){
|
||||
|
|
@ -491,6 +492,7 @@ public class Player extends Entity {
|
|||
if(time == 0){
|
||||
sendMessage(colorize("%RYour antipoison potion has expired."));
|
||||
removeAttribute("poison:immunity");
|
||||
getAudioManager().send(2607);
|
||||
}
|
||||
}
|
||||
if (!artificial && (System.currentTimeMillis() - getSession().getLastPing()) > 20_000L) {
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
|||
public void animate() {
|
||||
player.animate(ANIMATION);
|
||||
player.graphics(GRAPHICS);
|
||||
player.getAudioManager().send(2710);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue