Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] Offline TG Packet

Discussion on [Help] Offline TG Packet within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
TaiZer's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 39
Received Thanks: 5
[Help] Offline TG Packet

Hello everyone.
I just figured out how to get into offline TG using button.
I receive a 2044 Packet that show how long you can stay in offline tg.

Now I want to get the screen that you get when talking to Offline TG admin.
If someone could give me some infos would help me a lot.


TaiZer is offline  
Old 08/16/2010, 17:10   #2


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,435
Received Thanks: 1,150
By memory, it's like another NPC dialog with a special subtype.
CptSky is offline  
Old 08/17/2010, 18:24   #3
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
in case 2044 (like you said) just above
Code:
GC.MyChar.InOTG = true;
add this Teleport
Code:
GC.MyChar.Teleport(601, 60, 54);
and u'll get teleported to the offline tg area hopefully wit da offline tg admin in there...
killersub is offline  
Old 08/17/2010, 18:34   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 259
Received Thanks: 159
here for 5165

Code:
                    case 2044:
                        {
                           byte Type = Data[4];
                            if (Type == 1)
                            {
                                GC.MyChar.Loc.Map = 601;
                                GC.MyChar.Loc.X = 60;
                                GC.MyChar.Loc.Y = 54;
                                Database.SaveCharacter(GC.MyChar, GC.AuthInfo.Account);
                            }
                            ushort MinutesTrained = (ushort)((GC.MyChar.LoggedOn - GC.MyChar.LastLogin).TotalMinutes);
                            ushort HowLong = (ushort)(MinutesTrained * 10);
                            if (HowLong > 900 || HowLong < 0)
                                HowLong = 900;
                            else if (HowLong == 0)
                                HowLong = (ushort)(MinutesTrained / 100);
                            GC.SendPacket(Packets.OffLineTg((short)HowLong,Type));
Code:
        public static byte[] OffLineTg(short HowLong, byte Typ)
        {
            byte[] Packet = new byte[8 + 12];//12
            COPacket P = new COPacket(Packet);
            P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
            P.WriteUshortAddPos2((ushort)2044);
            P.WriteUintAddPos4(Typ);
            P.WriteUintAddPos4((uint)HowLong);
            return P.AddTqServer8Byte();
        }
teroareboss1 is offline  
Old 08/17/2010, 18:49   #5
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by teroareboss1 View Post
here for 5165

Code:
                    case 2044:
                        {
                           byte Type = Data[4];
                            if (Type == 1)
                            {
                                GC.MyChar.Loc.Map = 601;
                                GC.MyChar.Loc.X = 60;
                                GC.MyChar.Loc.Y = 54;
                                Database.SaveCharacter(GC.MyChar, GC.AuthInfo.Account);
                            }
                            ushort MinutesTrained = (ushort)((GC.MyChar.LoggedOn - GC.MyChar.LastLogin).TotalMinutes);
                            ushort HowLong = (ushort)(MinutesTrained * 10);
                            if (HowLong > 900 || HowLong < 0)
                                HowLong = 900;
                            else if (HowLong == 0)
                                HowLong = (ushort)(MinutesTrained / 100);
                            GC.SendPacket(Packets.OffLineTg((short)HowLong,Type));
Code:
        public static byte[] OffLineTg(short HowLong, byte Typ)
        {
            byte[] Packet = new byte[8 + 12];//12
            COPacket P = new COPacket(Packet);
            P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
            P.WriteUshortAddPos2((ushort)2044);
            P.WriteUintAddPos4(Typ);
            P.WriteUintAddPos4((uint)HowLong);
            return P.AddTqServer8Byte();
        }
your code will make newbies say "I HAVE MANY ERRORS" why? because as u said this was for 5165 but yet, I tested it on a 5165 and you have added some fucked up 5017 packet or something lmao...

Code:
GC.SendPacket
LOL?

Code:
 [COLOR="DarkRed"]P.WriteUshortAddPos2[/COLOR]((ushort)(Packet.Length - 8));
            [COLOR="DarkRed"]P.WriteUshortAddPos2[/COLOR]((ushort)2044);
            [COLOR="DarkRed"]P.WriteUintAddPos4[/COLOR](Typ);
            [COLOR="DarkRed"]P.WriteUintAddPos4[/COLOR]((uint)HowLong);
            [COLOR="DarkRed"]return P.AddTqServer8Byte();[/COLOR]
LOL again?

THE FIX is:

Code:
case 2044:
                        {
                           byte Type = Data[4];
                            {
                            if (Type == 1)
                            {
                                GC.MyChar.Loc.Map = 601;
                                GC.MyChar.Loc.X = 60;
                                GC.MyChar.Loc.Y = 54;
                                Database.SaveCharacter(GC.MyChar, GC.AuthInfo.Account);
                            }
                            ushort MinutesTrained = (ushort)((GC.MyChar.LoggedOn - GC.MyChar.LastLogin).TotalMinutes);
                            ushort HowLong = (ushort)(MinutesTrained * 10);
                            if (HowLong > 900 || HowLong < 0)
                                HowLong = 900;
                            else if (HowLong == 0)
                                HowLong = (ushort)(MinutesTrained / 100);
                            GC.AddSend(Packets.OffLineTg((short)HowLong,Type));
                        }
break;
}
Code:
public static COPacket OffLineTg(short HowLong, byte Type)
        {
            byte[] Packet = new byte[8 + 12];//12
            COPacket P = new COPacket(Packet);
            P.WriteInt16((ushort)(Packet.Length - 8));
            P.WriteInt16((ushort)2044);
            P.WriteByte(Type);
            P.WriteInt32((uint)HowLong);
            return P;
        }
killersub is offline  
Old 08/17/2010, 19:40   #6
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,224
Received Thanks: 868
Some sort for 5017 ****? His packet are structured differently...
_DreadNought_ is offline  
Old 08/17/2010, 19:48   #7
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Eliminationn View Post
Some sort for 5017 ****? His packet are structured differently...
if u haven't noticed "some" 5017's are structured similar to dat of his...I jus said dat as an example...
killersub is offline  
Reply




All times are GMT +2. The time now is 15:03.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.