Thread: Sounds & Music

Page 9 of 19 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 182
  1. #81  
    Member

    Bells's Avatar
    Join Date
    Dec 2008
    Posts
    3,797
    Thanks given
    599
    Thanks received
    1,449
    Rep Power
    4098
    Ooooo sxc. Nice work.
    Reply With Quote  
     

  2. #82  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    Quote Originally Posted by Galkon View Post
    Sound might be Sounds and ByteVector is Stream.
    Code:
    client.java:6734: cannot find symbol
    symbol  : constructor Stream(byte[],int,int)
    location: class Stream
                                            new SoundPlayer((InputStream) new Stream
    (stream.buffer, 0, stream.currentOffset), soundVolume[index], anIntArray1250[ind
    ex]);
                                                                          ^
    1 error
    Press any key to continue . . .
    any help pls
    stream class
    Code:
    // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) 
    
    import java.math.BigInteger;
    import sign.signlink;
    
    public final class Stream extends NodeSub {
    
    	public static Stream create()
    	{
    		synchronized(nodeList)
    		{
    			Stream stream = null;
    			if(anInt1412 > 0)
    			{
    				anInt1412--;
    				stream = (Stream) nodeList.popHead();
    			}
    			if(stream != null)
    			{
    				stream.currentOffset = 0;
    				return stream;
    			}
    		}
    		Stream stream_1 = new Stream();
    		stream_1.currentOffset = 0;
    		stream_1.buffer = new byte[5000];
    		return stream_1;
    	}
    
    	private Stream()
    	{
    	}
    
    	public Stream(byte abyte0[])
    	{
    		buffer = abyte0;
    			currentOffset = 0;
    	}
    
    	public void createFrame(int i)
    	{
    		buffer[currentOffset++] = (byte)(i + encryption.getNextKey());
    	}
    
    	public void writeWordBigEndian(int i)
    	{
    		buffer[currentOffset++] = (byte)i;
    	}
    
    	public void writeWord(int i)
    	{
    		buffer[currentOffset++] = (byte)(i >> 8);
    		buffer[currentOffset++] = (byte)i;
    	}
    
    	public void method400(int i)
    	{
    		buffer[currentOffset++] = (byte)i;
    		buffer[currentOffset++] = (byte)(i >> 8);
    	}
    
    	public void writeDWordBigEndian(int i)
    	{
    		buffer[currentOffset++] = (byte)(i >> 16);
    		buffer[currentOffset++] = (byte)(i >> 8);
    		buffer[currentOffset++] = (byte)i;
    	}
    
    	public void writeDWord(int i)
    	{
    		buffer[currentOffset++] = (byte)(i >> 24);
    		buffer[currentOffset++] = (byte)(i >> 16);
    		buffer[currentOffset++] = (byte)(i >> 8);
    		buffer[currentOffset++] = (byte)i;
    	}
    
    	public void method403(int j)
    	{
    		buffer[currentOffset++] = (byte)j;
    		buffer[currentOffset++] = (byte)(j >> 8);
    			buffer[currentOffset++] = (byte)(j >> 16);
    			buffer[currentOffset++] = (byte)(j >> 24);
    	}
    
    	public void writeQWord(long l)
    	{
    		try
    		{
    			buffer[currentOffset++] = (byte)(int)(l >> 56);
    			buffer[currentOffset++] = (byte)(int)(l >> 48);
    			buffer[currentOffset++] = (byte)(int)(l >> 40);
    			buffer[currentOffset++] = (byte)(int)(l >> 32);
    			buffer[currentOffset++] = (byte)(int)(l >> 24);
    			buffer[currentOffset++] = (byte)(int)(l >> 16);
    			buffer[currentOffset++] = (byte)(int)(l >> 8);
    			buffer[currentOffset++] = (byte)(int)l;
    		}
    		catch(RuntimeException runtimeexception)
    		{
    			signlink.reporterror("14395, " + 5 + ", " + l + ", " + runtimeexception.toString());
    			throw new RuntimeException();
    		}
    	}
    
    	public void writeString(String s)
    	{
    		//s.getBytes(0, s.length(), buffer, currentOffset);	//deprecated
    		System.arraycopy(s.getBytes(), 0, buffer, currentOffset, s.length());
    		currentOffset += s.length();
    		buffer[currentOffset++] = 10;
    	}
    
    	public void writeBytes(byte abyte0[], int i, int j)
    	{
    		for(int k = j; k < j + i; k++)
    			buffer[currentOffset++] = abyte0[k];
    
    	}
    
    	public void writeBytes(int i)
    	{
    		buffer[currentOffset - i - 1] = (byte)i;
    	}
    
    	public int readUnsignedByte()
    	{
    		return buffer[currentOffset++] & 0xff;
    	}
    
    	public byte readSignedByte()
    	{
    		return buffer[currentOffset++];
    	}
    
    	public int readUnsignedWord()
    	{
    		currentOffset += 2;
    		return ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] & 0xff);
    	}
    
    	public int readSignedWord()
    	{
    		currentOffset += 2;
    		int i = ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] & 0xff);
    		if(i > 32767)
    			i -= 0x10000;
    		return i;
    	}
    
    	public int read3Bytes()
    	{
    		currentOffset += 3;
    		return ((buffer[currentOffset - 3] & 0xff) << 16) + ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] & 0xff);
    	}
    
    	public int readDWord()
    	{
    		currentOffset += 4;
    		return ((buffer[currentOffset - 4] & 0xff) << 24) + ((buffer[currentOffset - 3] & 0xff) << 16) + ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] & 0xff);
    	}
    
    	public long readQWord()
    	{
    		long l = (long) readDWord() & 0xffffffffL;
    		long l1 = (long) readDWord() & 0xffffffffL;
    		return (l << 32) + l1;
    	}
    
    	public String readString()
    	{
    		int i = currentOffset;
    		while(buffer[currentOffset++] != 10) ;
    		return new String(buffer, i, currentOffset - i - 1);
    	}
    
    	public byte[] readBytes()
    	{
    		int i = currentOffset;
    		while(buffer[currentOffset++] != 10) ;
    		byte abyte0[] = new byte[currentOffset - i - 1];
    		System.arraycopy(buffer, i, abyte0, i - i, currentOffset - 1 - i);
    		return abyte0;
    	}
    
    	public void readBytes(int i, int j, byte abyte0[])
    	{
    		for(int l = j; l < j + i; l++)
    			abyte0[l] = buffer[currentOffset++];
    	}
    
    	public void initBitAccess()
    	{
    		bitPosition = currentOffset * 8;
    	}
    
    	public int readBits(int i)
    	{
    		int k = bitPosition >> 3;
    		int l = 8 - (bitPosition & 7);
    		int i1 = 0;
    		bitPosition += i;
    		for(; i > l; l = 8)
    		{
    			i1 += (buffer[k++] & anIntArray1409[l]) << i - l;
    			i -= l;
    		}
    		if(i == l)
    			i1 += buffer[k] & anIntArray1409[l];
    		else
    			i1 += buffer[k] >> l - i & anIntArray1409[i];
    		return i1;
    	}
    
    	public void finishBitAccess()
    	{
    		currentOffset = (bitPosition + 7) / 8;
    	}
    
    	public int method421()
    	{
    		int i = buffer[currentOffset] & 0xff;
    		if(i < 128)
    			return readUnsignedByte() - 64;
    		else
    			return readUnsignedWord() - 49152;
    	}
    
    	public int method422()
    	{
    		int i = buffer[currentOffset] & 0xff;
    		if(i < 128)
    			return readUnsignedByte();
    		else
    			return readUnsignedWord() - 32768;
    	}
    
    	public void doKeys()
    	{
    		int i = currentOffset;
    		currentOffset = 0;
    		byte abyte0[] = new byte[i];
    		readBytes(i, 0, abyte0);
    		BigInteger biginteger2 = new BigInteger(abyte0);
    		BigInteger biginteger3 = biginteger2/*.modPow(biginteger, biginteger1)*/;
    		byte abyte1[] = biginteger3.toByteArray();
    		currentOffset = 0;
    		writeWordBigEndian(abyte1.length);
    		writeBytes(abyte1, abyte1.length, 0);
    	}
    
    	public void method424(int i)
    	{
    		buffer[currentOffset++] = (byte)(-i);
    	}
    
    	public void method425(int j)
    	{
    		buffer[currentOffset++] = (byte)(128 - j);
    	}
    
    	public int method426()
    	{
    			return buffer[currentOffset++] - 128 & 0xff;
    	}
    
    	public int method427()
    	{
    		return -buffer[currentOffset++] & 0xff;
    	}
    
    	public int method428()
    	{
    		return 128 - buffer[currentOffset++] & 0xff;
    	}
    
    	public byte method429()
    	{
    			return (byte)(-buffer[currentOffset++]);
    	}
    
    	public byte method430()
    	{
    		return (byte)(128 - buffer[currentOffset++]);
    	}
    
    	public void method431(int i)
    	{
    		buffer[currentOffset++] = (byte)i;
    		buffer[currentOffset++] = (byte)(i >> 8);
    	}
    
    	public void method432(int j)
    	{
    		buffer[currentOffset++] = (byte)(j >> 8);
    		buffer[currentOffset++] = (byte)(j + 128);
    	}
    
    	public void method433(int j)
    	{
    		buffer[currentOffset++] = (byte)(j + 128);
    		buffer[currentOffset++] = (byte)(j >> 8);
    	}
    
    	public int method434()
    	{
    		currentOffset += 2;
    			return ((buffer[currentOffset - 1] & 0xff) << 8) + (buffer[currentOffset - 2] & 0xff);
    	}
    
    	public int method435()
    	{
    		currentOffset += 2;
    		return ((buffer[currentOffset - 2] & 0xff) << 8) + (buffer[currentOffset - 1] - 128 & 0xff);
    	}
    
    	public int method436()
    	{
    		currentOffset += 2;
    		return ((buffer[currentOffset - 1] & 0xff) << 8) + (buffer[currentOffset - 2] - 128 & 0xff);
    	}
    
    	public int method437()
    	{
    		currentOffset += 2;
    		int j = ((buffer[currentOffset - 1] & 0xff) << 8) + (buffer[currentOffset - 2] & 0xff);
    		if(j > 32767)
    			j -= 0x10000;
    		return j;
    	}
    
    	public int method438()
    	{
    		currentOffset += 2;
    		int j = ((buffer[currentOffset - 1] & 0xff) << 8) + (buffer[currentOffset - 2] - 128 & 0xff);
    		if(j > 32767)
    			j -= 0x10000;
    		return j;
    	}
    
    	public int method439()
    	{
    			currentOffset += 4;
    			return ((buffer[currentOffset - 2] & 0xff) << 24) + ((buffer[currentOffset - 1] & 0xff) << 16) + ((buffer[currentOffset - 4] & 0xff) << 8) + (buffer[currentOffset - 3] & 0xff);
    	}
    
    	public int method440()
    	{
    		currentOffset += 4;
    		return ((buffer[currentOffset - 3] & 0xff) << 24) + ((buffer[currentOffset - 4] & 0xff) << 16) + ((buffer[currentOffset - 1] & 0xff) << 8) + (buffer[currentOffset - 2] & 0xff);
    	}
    
    	public void method441(int i, byte abyte0[], int j)
    	{
    		for(int k = (i + j) - 1; k >= i; k--)
    			buffer[currentOffset++] = (byte)(abyte0[k] + 128);
    
    	}
    
    	public void method442(int i, int j, byte abyte0[])
    	{
    		for(int k = (j + i) - 1; k >= j; k--)
    			abyte0[k] = buffer[currentOffset++];
    
    	}
    
    	public byte buffer[];
    	public int currentOffset;
    	public int bitPosition;
    	private static final int[] anIntArray1409 = {
    		0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 
    		1023, 2047, 4095, 8191, 16383, 32767, 65535, 0x1ffff, 0x3ffff, 0x7ffff, 
    		0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff, 0x1fffffff, 
    		0x3fffffff, 0x7fffffff, -1
    	};
    	public ISAACRandomGen encryption;
    	private static int anInt1412;
    	private static final NodeList nodeList = new NodeList();
    
    	//removed useless static initializer
    }
    thank you
    Reply With Quote  
     

  3. #83  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    bump pls help
    Reply With Quote  
     

  4. #84  
    Registered Member
    natsu's Avatar
    Join Date
    Apr 2007
    Age
    29
    Posts
    3,451
    Thanks given
    1,084
    Thanks received
    676
    Rep Power
    1096
    use this

    new SoundPlayer((InputStream) new ByteArrayInputStream(stream.buffer, 0, stream.currentOffset), soundVolume[i], anIntArray1250[i]);

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. Thankful user:


  6. #85  
    Developer

    Join Date
    Jun 2009
    Posts
    793
    Thanks given
    26
    Thanks received
    67
    Rep Power
    11
    Quote Originally Posted by dani_gonzales View Post
    pls help me to rename alli just fixed most of them
    Code:
    client.java:38: cannot find symbol
    symbol  : variable Sound
    location: class client
                    anIntArray1250[anInt1062] = delay + Sound.anIntArray326[id];
                                                        ^
    client.java:38: operator + cannot be applied to int,<any>
                    anIntArray1250[anInt1062] = delay + Sound.anIntArray326[id];
                                                ^
    client.java:38: incompatible types
    found   : <nulltype>
    required: int
                    anIntArray1250[anInt1062] = delay + Sound.anIntArray326[id];
                                                      ^
    client.java:6733: cannot find symbol
    symbol  : class ByteVector
    location: class client
                                            ByteVector stream = Sound.method241(anIn
    tArray1241[index], anIntArray1207[index]);
                                            ^
    client.java:6733: cannot find symbol
    symbol  : variable Sound
    location: class client
                                            ByteVector stream = Sound.method241(anIn
    tArray1241[index], anIntArray1207[index]);
                                                                ^
    5 errors
    Press any key to continue . . .
    If you're using PI, Sound would be Sounds.

    Also you're going to have to comment out the packet 173 server side for the void resetFollowing and some where in Combatassistant.
    Want something done? Private message me, but have something to offer.
    Reply With Quote  
     

  7. #86  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    where do u add this
    case 174:
    int soundId = in.readShort();
    int type = in.readUByte();
    int delay = in.readShort();
    int volume = in.readShort();
    sound[currentSound] = soundId;
    soundType[currentSound] = type;
    soundDelay[currentSound] = delay + Sound.anIntArray326[soundId];
    soundVolume[currentSound] = volume;
    currentSound++;
    opCode = -1;
    return true;
    added on my server this
    public void sendSound(int id, int type, int delay, int volume) {
    if(c.outStream != null && c != null && id != -1) {
    c.outStream.createFrame(174);
    c.outStream.writeWord(id);
    c.outStream.writeByte(type);
    c.outStream.writeWord(delay);
    c.outStream.writeWord(volume);
    c.flushOutStream();
    }
    }
    but forced me to add sounds like this c.getPA().sendSound(316, 8, 8, 1);
    any help please
    thank you r2ange for client side fix!
    Reply With Quote  
     

  8. #87  
    Registered Member
    natsu's Avatar
    Join Date
    Apr 2007
    Age
    29
    Posts
    3,451
    Thanks given
    1,084
    Thanks received
    676
    Rep Power
    1096
    Quote Originally Posted by dani_gonzales View Post
    where do u add this

    added on my server this
    but forced me to add sounds like this c.getPA().sendSound(316, 8, 8, 1);
    any help please
    thank you r2ange for client side fix!
    the type never change so remove that and change it to (TYPEID)

    c.getPA().sendSound(316, 8, 1);

    like that

    SOund ID Delay Volume

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #88  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    done but no sound and disconect me

    Error: T1 - 88,0 - 174,126
    Reply With Quote  
     

  10. #89  
    Registered Member
    natsu's Avatar
    Join Date
    Apr 2007
    Age
    29
    Posts
    3,451
    Thanks given
    1,084
    Thanks received
    676
    Rep Power
    1096
    Quote Originally Posted by dani_gonzales View Post
    done but no sound and disconect me
    change the packet size in sizecontent

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  11. #90  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,167
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    Code:
    // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) 
    
    
    final class SizeConstants {
    
    	public static final int[] anIntArray552 = {
    		6, 21, 25, 33, 254, 127, 183, 87, 216, 215, 
    		211, 48, 15, 195, 149, 233, 162, 102, 104, 179, 
    		222, 103, 224, 81, 152, 89, 45, 11, 197, 187, 
    		210, 37, 135, 220, 137, 128, 63, 188, 207, 144, 
    		201, 161, 28, 192, 206, 32, 115, 57, 196, 22, 
    		132, 226, 227, 169, 237, 105, 174, 109, 5, 55, 
    		205, 156, 8, 34, 113, 176, 209, 3, 50, 117, 
    		122, 189, 101, 142, 246, 163, 238, 76, 74, 84, 
    		91, 217, 58, 23, 118, 66, 35, 164, 114, 138, 
    		96, 110, 29, 235, 147, 249, 214, 198, 242, 56, 
    		94, 248, 59, 253, 150, 16, 13, 46, 24, 130, 
    		232, 153, 167, 229, 79, 134, 26, 191, 0, 213, 
    		204, 241, 160, 39, 180, 49, 250, 47, 140, 193, 
    		202, 108, 120, 247, 106, 194, 65, 27, 93, 143, 
    		186, 171, 125, 54, 155, 190, 139, 165, 77, 178, 
    		72, 99, 61, 141, 116, 100, 80, 184, 154, 145, 
    		131, 12, 90, 42, 255, 75, 44, 78, 172, 107, 
    		52, 7, 119, 146, 38, 218, 10, 223, 182, 240, 
    		159, 88, 158, 64, 221, 200, 1, 43, 252, 62, 
    		40, 230, 129, 18, 111, 51, 17, 53, 136, 20, 
    		60, 225, 30, 9, 239, 97, 234, 41, 203, 236, 
    		36, 185, 212, 19, 245, 251, 208, 175, 243, 86, 
    		2, 69, 181, 151, 14, 166, 70, 98, 124, 126, 
    		67, 157, 199, 112, 123, 177, 82, 168, 71, 170, 
    		95, 31, 92, 4, 231, 219, 73, 85, 244, 148, 
    		173, 228, 121, 83, 133, 68, 0
    	};
    	public static final int[] packetSizes = {
    		0, 0, 0, 0, 6, 0, 0, 0, 4, 0, 
    		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    		0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 
    		0, 0, 0, 0, -2, 4, 3, 0, 0, 0, 
    		0, 0, 0, 0, 5, 0, 0, 6, 0, 0, 
    		9, 0, 0, -2, 0, 0, 0, 0, 0, 0, 
    		-2, 1, 0, 0, 2, -2, 0, 0, 0, 0, 
    		6, 3, 2, 4, 2, 4, 0, 0, 0, 4, 
    		0, -2, 0, 0, 7, 2, 0, 6, 0, 0, 
    		0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 
    		0, 2, 0, 0, -1, 4, 1, 0, 0, 0, 
    		1, 0, 0, 0, 2, 0, 0, 15, 0, 0, 
    		0, 4, 4, 0, 0, 0, -2, 0, 0, 0, 
    		0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 
    		0, 0, 2, 0, 0, 0, 0, 14, 0, 0, 
    		0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 
    		4, 0, 0, 0, 2, 0, 6, 0, 0, 0, 
    		0, 3, 0, 0, 5, 0, 10, 6, 0, 0, 
    		0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 
    		0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 
    		4, 0, 0, 0, 0, 0, 3, 0, 2, 0, 
    		0, 0, 0, 0, -2, 7, 0, 0, 2, 0, 
    		0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
    		8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    		2, -2, 0, 0, 0, 0, 6, 0, 4, 3, 
    		0, 0, 0, -1, 6, 0, 0
    	};
    }
    wich 5 to 6?
    Reply With Quote  
     

Page 9 of 19 FirstFirst ... 7891011 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 7
    Last Post: 03-14-2012, 02:54 PM
  2. Sounds and Music
    By Dennis in forum Help
    Replies: 2
    Last Post: 06-01-2010, 01:31 AM
  3. Music and Sounds
    By Viii in forum Tutorials
    Replies: 43
    Last Post: 07-05-2009, 01:12 PM
  4. Sounds, music and more.
    By Inside Sin in forum Requests
    Replies: 0
    Last Post: 10-05-2008, 06:40 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •