Progress bar not working.

04/15/2013 15:06 Mero.El.Omda#16
Quote:
Originally Posted by { Angelius } View Post
A- You don't have to use the get/set property because you will never have to read any data from that packet.

B- I don't think that a Timeout of 2 seconds will work try 4+

C- I see you are setting ->

gData.UID = client.Entity.UID;
gData.dwParam = 220;
gData.ID = 164;

But you are not really writing those values to the buffer.

So a simple byte array wold do the job perfectly without complicating things, Something like...

PHP Code:
void Sen_Effect(IClient Client, uint data_8, ushort Type, ushort direction,  uint LoopTime, string EffectName)
    {
        
//38 + 1 + 8 + EffectName.Length = 47 + EffectName.Length
        //Where 38 is the normal 10010 packet length, 1 for the extra byte at offset 38, 8 for the Server Stamp
        
byte[] Packet = new byte[47 + EffectName.Length];
        
WriteUInt16(Packet.Length - 8, 0, Packet);
        
WriteUInt16(10010, 2, Packet);
        
WriteUInt32(Client.UID, 4, Packet);
        
WriteUInt32(data_8, 8, Packet);
        
WriteUInt16(Type, 20, Packet);
        
WriteUInt16(direction, 22, Packet);
        
WriteUInt32(LoopTime, 32, Packet);
        
WriteByte(1, 37, Packet);
        
WriteByte(EffectName.Length, 38, Packet);
        
WriteString(EffectName, 39, Packet);
        
Client.send(Packet); 
    } 
To call it -> Sen_Effect(Client, 220, 164, 1, 5, "Pick");

Good luck.
Nice one thanks Adel