Esempio n. 1
0
        public static bool SendLoginPacket3()
        {
            UOAMPacket p = new UOAMPacket();

            p.Write((short)5);
            p.Write((short)0x300);
            p.Write(0x10);
            p.Write(0);
            p.Write(m_Sequence++);
            p.Write(0);
            p.Write(1);
            p.Write(m_Password, 20);
            p.Write(m_Address);
            p.Write(0);
            p.Write(2);
            p.Write((short)0x70);
            p.Write((short)0xd5);
            p.Write((int)(m_Username.Length + 1));
            p.Write(0);
            p.Write((int)(m_Username.Length + 1));
            p.Write(m_Username, m_Username.Length + 1);
            p.Seek(0x10L, SeekOrigin.Begin);
            p.Write((int)(p.Length - 0x18L));
            return(Send(p));
        }
Esempio n. 2
0
        public static bool Post()
        {
            char   ch;
            Mobile player = World.Player;

            if (player == null)
            {
                return(false);
            }
            if (Engine.m_World == 0)
            {
                ch = 'f';
            }
            else if (Engine.m_World == 1)
            {
                ch = 't';
            }
            else
            {
                ch = 'i';
            }
            m_LastPost = DateTime.Now;
            UOAMPacket p = new UOAMPacket();

            p.Write((short)5);
            p.Write((short)0x300);
            p.Write(0x10);
            p.Write(0);
            p.Write(m_Sequence++);
            p.Write(0);
            p.Write(0);
            p.Write(m_Password, 20);
            p.Write(m_Address);
            p.Write(m_Username, 0x4f);
            p.Write((byte)ch);
            p.Write((int)player.X);
            p.Write((int)player.Y);
            p.Write(0);
            p.Seek(0x10L, SeekOrigin.Begin);
            p.Write((int)(p.Length - 0x18L));
            return(Send(p));
        }
Esempio n. 3
0
        public static bool SendLoginPacket4()
        {
            UOAMPacket p = new UOAMPacket();

            p.Write((short)5);
            p.Write((short)0x300);
            p.Write(0x10);
            p.Write(0);
            p.Write(m_Sequence++);
            p.Write(0);
            p.Write(1);
            p.Write(m_Password, 20);
            p.Write(m_Address);
            p.Write(0);
            p.Write(3);
            p.Write((short)0x76e8);
            p.Write((short)0xdb);
            p.Write((int)(m_Username.Length + 1));
            p.Write(0);
            p.Write((int)(m_Username.Length + 1));
            p.Write(m_Username, m_Username.Length + 1);
            p.Align(4);
            p.Write(0x40);
            p.Write((short)0x4390);
            p.Write((short)0xd8);
            p.Write(0x40);
            p.Write((ushort)0xf200);
            p.Write((short)0xff);
            p.Write((ushort)0xfff6);
            p.Write((ushort)0xffff);
            p.Write(0);
            p.Write(0);
            p.Write(0);
            p.Write(0);
            p.Write(0);
            p.Write(0);
            p.Write("Comic Sans MS", 0x20);
            p.Seek(0x10L, SeekOrigin.Begin);
            p.Write((int)(p.Length - 0x18L));
            return(Send(p));
        }
Esempio n. 4
0
        public static bool Query()
        {
            m_LastQuery = DateTime.Now;
            UOAMPacket p = new UOAMPacket();

            p.Write((short)5);
            p.Write((short)0x300);
            p.Write(0x10);
            p.Write(0);
            p.Write(m_Sequence++);
            p.Write(0);
            p.Write((byte)0);
            p.Write((byte)0);
            p.Write((byte)2);
            p.Write((byte)0);
            p.Write(m_Password, 20);
            p.Write(m_Address);
            p.Seek(0x10L, SeekOrigin.Begin);
            p.Write((int)(p.Length - 0x18L));
            return(Send(p));
        }
Esempio n. 5
0
        public static bool Chat(string text)
        {
            text = text.Trim();
            if (text.Length == 0)
            {
                return(false);
            }
            UOAMPacket p = new UOAMPacket();

            p.Write((short)5);
            p.Write((short)0x300);
            p.Write(0x10);
            p.Write(0);
            p.Write(m_Sequence++);
            p.Write(0);
            p.Write((byte)1);
            p.Write((byte)0);
            p.Write((byte)0);
            p.Write((byte)0);
            p.Write(m_Password, 20);
            p.Write(m_Address);
            p.Write(0);
            p.Write(1);
            p.Write((ushort)0xe390);
            p.Write((short)0xdb);
            p.Write((int)(m_Username.Length + 1));
            p.Write(0);
            p.Write((int)(m_Username.Length + 1));
            p.Write(m_Username, m_Username.Length + 1);
            p.Align(4);
            p.Write((int)(text.Length + 1));
            p.Write((short)0x4480);
            p.Write((short)0xd6);
            p.Write((int)(text.Length + 1));
            p.Write(text, text.Length + 1);
            p.Seek(0x10L, SeekOrigin.Begin);
            p.Write((int)(p.Length - 0x18L));
            return(Send(p));
        }
Esempio n. 6
0
 public static bool Chat(string text)
 {
     text = text.Trim();
     if (text.Length == 0)
     {
         return false;
     }
     UOAMPacket p = new UOAMPacket();
     p.Write((short) 5);
     p.Write((short) 0x300);
     p.Write(0x10);
     p.Write(0);
     p.Write(m_Sequence++);
     p.Write(0);
     p.Write((byte) 1);
     p.Write((byte) 0);
     p.Write((byte) 0);
     p.Write((byte) 0);
     p.Write(m_Password, 20);
     p.Write(m_Address);
     p.Write(0);
     p.Write(1);
     p.Write((ushort) 0xe390);
     p.Write((short) 0xdb);
     p.Write((int) (m_Username.Length + 1));
     p.Write(0);
     p.Write((int) (m_Username.Length + 1));
     p.Write(m_Username, m_Username.Length + 1);
     p.Align(4);
     p.Write((int) (text.Length + 1));
     p.Write((short) 0x4480);
     p.Write((short) 0xd6);
     p.Write((int) (text.Length + 1));
     p.Write(text, text.Length + 1);
     p.Seek(0x10L, SeekOrigin.Begin);
     p.Write((int) (p.Length - 0x18L));
     return Send(p);
 }
Esempio n. 7
0
 public static bool SendLoginPacket4()
 {
     UOAMPacket p = new UOAMPacket();
     p.Write((short) 5);
     p.Write((short) 0x300);
     p.Write(0x10);
     p.Write(0);
     p.Write(m_Sequence++);
     p.Write(0);
     p.Write(1);
     p.Write(m_Password, 20);
     p.Write(m_Address);
     p.Write(0);
     p.Write(3);
     p.Write((short) 0x76e8);
     p.Write((short) 0xdb);
     p.Write((int) (m_Username.Length + 1));
     p.Write(0);
     p.Write((int) (m_Username.Length + 1));
     p.Write(m_Username, m_Username.Length + 1);
     p.Align(4);
     p.Write(0x40);
     p.Write((short) 0x4390);
     p.Write((short) 0xd8);
     p.Write(0x40);
     p.Write((ushort) 0xf200);
     p.Write((short) 0xff);
     p.Write((ushort) 0xfff6);
     p.Write((ushort) 0xffff);
     p.Write(0);
     p.Write(0);
     p.Write(0);
     p.Write(0);
     p.Write(0);
     p.Write(0);
     p.Write("Comic Sans MS", 0x20);
     p.Seek(0x10L, SeekOrigin.Begin);
     p.Write((int) (p.Length - 0x18L));
     return Send(p);
 }
Esempio n. 8
0
 public static bool SendLoginPacket3()
 {
     UOAMPacket p = new UOAMPacket();
     p.Write((short) 5);
     p.Write((short) 0x300);
     p.Write(0x10);
     p.Write(0);
     p.Write(m_Sequence++);
     p.Write(0);
     p.Write(1);
     p.Write(m_Password, 20);
     p.Write(m_Address);
     p.Write(0);
     p.Write(2);
     p.Write((short) 0x70);
     p.Write((short) 0xd5);
     p.Write((int) (m_Username.Length + 1));
     p.Write(0);
     p.Write((int) (m_Username.Length + 1));
     p.Write(m_Username, m_Username.Length + 1);
     p.Seek(0x10L, SeekOrigin.Begin);
     p.Write((int) (p.Length - 0x18L));
     return Send(p);
 }
Esempio n. 9
0
 public static bool Query()
 {
     m_LastQuery = DateTime.Now;
     UOAMPacket p = new UOAMPacket();
     p.Write((short) 5);
     p.Write((short) 0x300);
     p.Write(0x10);
     p.Write(0);
     p.Write(m_Sequence++);
     p.Write(0);
     p.Write((byte) 0);
     p.Write((byte) 0);
     p.Write((byte) 2);
     p.Write((byte) 0);
     p.Write(m_Password, 20);
     p.Write(m_Address);
     p.Seek(0x10L, SeekOrigin.Begin);
     p.Write((int) (p.Length - 0x18L));
     return Send(p);
 }
Esempio n. 10
0
 public static bool Post()
 {
     char ch;
     Mobile player = World.Player;
     if (player == null)
     {
         return false;
     }
     if (Engine.m_World == 0)
     {
         ch = 'f';
     }
     else if (Engine.m_World == 1)
     {
         ch = 't';
     }
     else
     {
         ch = 'i';
     }
     m_LastPost = DateTime.Now;
     UOAMPacket p = new UOAMPacket();
     p.Write((short) 5);
     p.Write((short) 0x300);
     p.Write(0x10);
     p.Write(0);
     p.Write(m_Sequence++);
     p.Write(0);
     p.Write(0);
     p.Write(m_Password, 20);
     p.Write(m_Address);
     p.Write(m_Username, 0x4f);
     p.Write((byte) ch);
     p.Write((int) player.X);
     p.Write((int) player.Y);
     p.Write(0);
     p.Seek(0x10L, SeekOrigin.Begin);
     p.Write((int) (p.Length - 0x18L));
     return Send(p);
 }