lottery?

03/22/2013 00:30 MrCaSpR#16
Quote:
Originally Posted by |xabi| View Post
what copy mistake mean??
remove lottotimes and change itemid from 16 to 12
man i changed it and nothing changed
03/22/2013 00:32 shadowman123#17
Very bad Written Packet Structure

1 - why do u make bool constructor since u will alawys aassign this boolean to be True
2 - Incorrect Way
3 - just make it Simpler like

public static void SendLottery(Client.GameState client, uint ItemID)
{
// send the client the packet
}
03/22/2013 00:36 abdoumatrix#18
Finally Done.
(el7amed lellah)
Ty God.

(dy tel3et moshkela tafha awy)

[Only registered and activated users can see links. Click Here To Register...]

ty all for help and new lenght and offest

take a look here and u will figure it out
[Only registered and activated users can see links. Click Here To Register...]

good luck all.
03/22/2013 01:30 MrCaSpR#19
GooooooooooD abdou
(wal3a ya 3m Men elly sa3dk Yad :D )
03/22/2013 01:43 korolos#20
use this
PHP Code:
    public class LotteryNew WriterInterfaces.IPacket
    
{
        public const 
byte
            Accept 
0,
            
AddJade 1,
            Continue = 
2;

        
byte[] Buffer;

        public 
LotteryNew()
        {

            
Buffer = new byte[34];
            
WriteUInt16(260Buffer);
            
WriteUInt16(13142Buffer);

        }

        public 
byte UN
        
{
            
get { return Buffer[4]; }
            
set Buffer[4] = value; }
        }

        public 
byte UN5
        
{
            
get { return Buffer[5]; }
            
set Buffer[5] = value; }
        }

        public 
byte UN6
        
{
            
get { return Buffer[6]; }
            
set Buffer[6] = value; }
        }
        public 
byte SocketOne
        
{
            
get { return Buffer[7]; }
            
set Buffer[7] = value; }
        }
        public 
byte SocketTwo
        
{
            
get { return Buffer[8]; }
            
set Buffer[8] = value; }
        }
        public 
byte Pluse
        
{
            
get { return Buffer[9]; }
            
set Buffer[9] = value; }
        }
        public 
byte Color
        
{
            
get { return Buffer[10]; }
            
set Buffer[10] = value; }
        }

        public 
uint ItemID
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
        public 
byte[] ToArray()
        {
            return 
Buffer;
        }
        public 
void Send(Client.GameState client)
        {
            
client.Send(Buffer);
        }
    } 
03/22/2013 01:47 abdoumatrix#21
Quote:
Originally Posted by korolos View Post
use this
PHP Code:
    public class LotteryNew WriterInterfaces.IPacket
    
{
        public const 
byte
            Accept 
0,
            
AddJade 1,
            Continue = 
2;

        
byte[] Buffer;

        public 
LotteryNew()
        {

            
Buffer = new byte[34];
            
WriteUInt16(260Buffer);
            
WriteUInt16(13142Buffer);

        }

        public 
byte UN
        
{
            
get { return Buffer[4]; }
            
set Buffer[4] = value; }
        }

        public 
byte UN5
        
{
            
get { return Buffer[5]; }
            
set Buffer[5] = value; }
        }

        public 
byte UN6
        
{
            
get { return Buffer[6]; }
            
set Buffer[6] = value; }
        }
        public 
byte SocketOne
        
{
            
get { return Buffer[7]; }
            
set Buffer[7] = value; }
        }
        public 
byte SocketTwo
        
{
            
get { return Buffer[8]; }
            
set Buffer[8] = value; }
        }
        public 
byte Pluse
        
{
            
get { return Buffer[9]; }
            
set Buffer[9] = value; }
        }
        public 
byte Color
        
{
            
get { return Buffer[10]; }
            
set Buffer[10] = value; }
        }

        public 
uint ItemID
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
        public 
byte[] ToArray()
        {
            return 
Buffer;
        }
        public 
void Send(Client.GameState client)
        {
            
client.Send(Buffer);
        }
    } 
1st. ty


bas a7na aslan low homa 3'yarna el structure 1000000 mara bardo hya hya
el 3eeb fe el npc
mesh el structure ba3d el update

shofo el type we anta t3rafo
03/22/2013 01:55 |xabi|#22
Quote:
Originally Posted by korolos View Post
use this
PHP Code:
    public class LotteryNew WriterInterfaces.IPacket
    
{
        public const 
byte
            Accept 
0,
            
AddJade 1,
            Continue = 
2;

        
byte[] Buffer;

        public 
LotteryNew()
        {

            
Buffer = new byte[34];
            
WriteUInt16(260Buffer);
            
WriteUInt16(13142Buffer);

        }

        public 
byte UN
        
{
            
get { return Buffer[4]; }
            
set Buffer[4] = value; }
        }

        public 
byte UN5
        
{
            
get { return Buffer[5]; }
            
set Buffer[5] = value; }
        }

        public 
byte UN6
        
{
            
get { return Buffer[6]; }
            
set Buffer[6] = value; }
        }
        public 
byte SocketOne
        
{
            
get { return Buffer[7]; }
            
set Buffer[7] = value; }
        }
        public 
byte SocketTwo
        
{
            
get { return Buffer[8]; }
            
set Buffer[8] = value; }
        }
        public 
byte Pluse
        
{
            
get { return Buffer[9]; }
            
set Buffer[9] = value; }
        }
        public 
byte Color
        
{
            
get { return Buffer[10]; }
            
set Buffer[10] = value; }
        }

        public 
uint ItemID
        
{
            
get { return BitConverter.ToUInt32(Buffer12); }
            
set WriteUInt32(value12Buffer); }
        }

        public 
void Deserialize(byte[] buffer)
        {
            
Buffer buffer;
        }
        public 
byte[] ToArray()
        {
            return 
Buffer;
        }
        public 
void Send(Client.GameState client)
        {
            
client.Send(Buffer);
        }
    } 
kero you just update the itemID offest and forget to update the length 20 instead of 26, i made the correct but i miss small thing
03/22/2013 01:55 korolos#23
Quote:
Originally Posted by abdoumatrix View Post
1st. ty


bas a7na aslan low homa 3'yarna el structure 1000000 mara bardo hya hya
el 3eeb fe el npc
mesh el structure ba3d el update

shofo el type we anta t3rafo
are you sure u know how to use packets?

Quote:
Originally Posted by |xabi| View Post
kero you just update the itemID offest and forget to update the length 20 instead of 26, i made the correct but i miss small thing
oh myyyyyyyyy the lenght if lower than that packet use it's problem
try use this packet struct with packet header 500 300 100 any lenght will work soz
[Only registered and activated users can see links. Click Here To Register...]
are u sure u know much about packets and how it works?
03/22/2013 02:08 abdoumatrix#24
Quote:
Originally Posted by korolos View Post
are you sure u know how to use packets?
akeed mesh zayak .anta ostaz lwa7dak aslan :D

bas 3shan ana 3reft el moshkela men eh :D

the problem concern here
PHP Code:
lotto.Type 4
check this and he will figure it out

PHP Code:
public enum LotteryAction
    
{
        
AcceptPrize 0,
        
AddTicket 1,
        
ContinueLottery 2,
        
DisplayPrize 3
    

xabi low 3andak

Quote:
// client.LotteryEntries += 1;
// lotto.LottoTimes = (ushort)(10 - client.LotteryEntries);
fe el npc shelo we grab
hyst3'al tmam
03/22/2013 02:34 korolos#25
Quote:
Originally Posted by abdoumatrix View Post
akeed mesh zayak .anta ostaz lwa7dak aslan :D

bas 3shan ana 3reft el moshkela men eh :D

the problem concern here
PHP Code:
lotto.Type 4
check this and he will figure it out

PHP Code:
public enum LotteryAction
    
{
        
AcceptPrize 0,
        
AddTicket 1,
        
ContinueLottery 2,
        
DisplayPrize 3
    

xabi low 3andak



fe el npc shelo we grab
hyst3'al tmam
i asked u question
did you answer it?
are u sure u already know how packet works? et(Lottery packet)
03/22/2013 06:12 sala7mostafa#26
i fixed it a5eran :D
03/22/2013 09:48 shadowman123#27
i dont think that much know how to use it
03/22/2013 10:10 MrCaSpR#28
Quote:
Originally Posted by sala7mostafa View Post
i fixed it a5eran :D
mabroooooooook ya sala7
03/22/2013 10:24 Haary*Potter#29
korolos ty bro it work 100% thank you verry much
but i want to ask you how to make lottery work slowly when addJade ??
[Only registered and activated users can see links. Click Here To Register...]
03/22/2013 14:12 abdoumatrix#30
Quote:
Originally Posted by korolos View Post
i asked u question
did you answer it?
are u sure u already know how packet works? et(Lottery packet)
lsa bt3almoh :D

ana lma radet kan 2asdy en el 3eeb men el sourcat el t3bana bta3tena mesh el structure bta3ak akeed .howa a7na la2yeeen .

we montesh baset fe el code
Ty for structure
(3'ba2 t2ol eh:D)



Quote:
Originally Posted by sala7mostafa View Post
i fixed it a5eran :D
wal3a ya sala7

Quote:
Originally Posted by shadowman123 View Post
i dont think that much know how to use it
bthady el nfos anta :D