Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How To Add Sounds On A 317

Newbie Spellweaver
Joined
Sep 26, 2012
Messages
7
Reaction score
2
Hello! Today I am going to show you how to fully add sounds to your 317 server!


Difficulty: 1/10
Files Used: Client.java
Server Tested On: Delta


Okay, first off, I know many people want to know how to do this. So I should point out a few things.


1.)I will not give you the method to turn sounds off.
2.)I will ONLY tell you how to add sounds and will give you 1 example.
3.)I take all credits for this.


So lets get started.


First, open up client.java, add this near any public void's:

Code:
public void frame174(int i1, int i2, int i3)//This allows you to play sounds
{
outStream.createFrame(174);
outStream.writeWord(i1);
outStream.writeByte(i2);
outStream.writeWord(i3);
//sM("Frame 174 tested");
updateRequired = true;
appearanceUpdateRequired = true;
}

Let me explain the above. The frame for sound is 174.
int i1 = sound id.
int i2 = time the sound starts after action happens.
int i3 = amount of time the sound lasts


Okay, so, you want an example of a sound. Here you go.

Code:
frame174(1081, 000, 030);

let me explain this. we declare the sound frame 174, allowing the sound to happen.

the sound being played is: 1081 (whip special attack)
the sound plays right when the whip attacks with special.
the sound lasts for 0.30 seconds.

Ok, so you want to search for this in client.java

Code:
if(playerEquipment[playerWeapon] == 4151 && specialAmount > 49){

and under that you will see

Code:
AttackingOn2.specGFX(341);
specialAmount -= 50;

hit enter after this making it look like this

Code:
AttackingOn2.specGFX(341);
specialAmount -= 50;

in that blank space add this

Code:
frame174(1081, 000, 030);


it should now look like this.

Code:
if(playerEquipment[playerWeapon] == 4151 && specialAmount > 49){
AttackingOn2.specGFX(341);
specialAmount -= 50;
frame174(1081, 000, 030);

now your whole process should look like this

Code:
if(playerEquipment[playerWeapon] == 4151 && specialAmount > 49){
AttackingOn2.specGFX(341);
specialAmount -= 50;
frame174(1081, 000, 030);
hitDiff = misc.random(playerMaxHit) + misc.random(StrPrayer) + misc.random(voidmelee);
lastSpecial = System.currentTimeMillis();
setAnimation(1658);
actionInterval = getbattleTimer();
lastAction = System.currentTimeMillis();
specOn = false;
}


Let me explain this, but only for this part.

the weapon (4151) = abyssal whip
attackingon2 = the thing your attacking
specialamount -= 50 = amount of special you lose
frame174 = sound frame

so lets review this process.


when you are attacking with the whip, if you click the special bar and it attacks, you will see the gfx(341) and you will hear the whip special attack.





If you do use this, give me credits.
 
Back
Top