Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 12:02

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

Advertisement



What should I be looking for?

Discussion on What should I be looking for? within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
What should I be looking for?

PlayerPacket.cs

Code:
public byte Job
        {
            get { return ReadByte(67); }
            set { WriteByte(value, 67); }
        }
Client.cs

Code:
private byte _Job;
Code:
public byte Job
            {
                get { return _Job; }               
            }
Code:
public void Jobs(StatusType[] Data, Client client)
            {
                if (Ninja(client))
                {
                    XpSkill = 6011;
                    XpAttackSpeed = 800;
                    ActionSpeed = 100;
                    XpJumpSpeed = 1000;
                    XpLootSpeed = 300;
                }
                if (Monk(client))
                {
                    XpSkill = 10390;
                    XpAttackSpeed = 300;
                    ActionSpeed = 100;
                    XpJumpSpeed = 800;
                    XpLootSpeed = 300;
                }
                /*  if (Taoist(Client))
                  {
                      XpSkill = 1280;
                      XpAttackSpeed = 150;
                      ActionSpeed = 100;
                      XpJumpSpeed = 800;
                      XpLootSpeed = 300;
                  }
                 */
                if (Warrior(client))
                {
                    XpSkill = 1025;
                    XpJumpSpeed = 300;
                    XpAttackSpeed = 150;
                    ActionSpeed = 100;
                    XpLootSpeed = 300;
                }
                if (Trojan(client))
                {
                    //XpSkill = 1015; //Accuracy
                    XpSkill = 1110;
                    XpAttackSpeed = 800;
                    ActionSpeed = 100;
                    XpJumpSpeed = 1000;
                    XpLootSpeed = 300;
                }
            }
Code:
#region JobBools

            public static bool Warrior(Client client)
            {
                return (client.Job > 16 && client.Job < 26);
            }
            public static bool Trojan(Client client)
            {
                return (client.Job > 9 && client.Job < 16);
            }
            public static bool Archer(Client client)
            {
                return (client.Job > 39 && client.Job < 46);
            }
            public static bool Taoist(Client client)
            {
                return (client.Job > 131 && client.Job < 136);
            }
            public static bool Monk(Client client)
            {
                return (client.Job > 59 && client.Job < 65);
            }
            public static bool Ninja(Client client)
            {
                return (client.Job > 49 && client.Job < 56);
            }
            #endregion
I'm guessing the reason it doesn't do anything is this?
Code:
public byte Job
        {
            get { return ReadByte(67); }
            set { WriteByte(value, 67); }
        }
denominator is offline  
Old 05/27/2012, 14:16   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
... you have two different versions of Job...


One is an access or for the private variable _Job (love of ***... use lower case if you're using private variables... it bothers me lol) and then you have a second version which looks to be referring to a byte array (The actual spawn packet for your character).

This looks to be a proxy settings system so there's no reason to be storing your spawn information. Just populate the value initially from the hero information packet when the client logs in and then store it as a normal variable as you have. I see no reason to use private/public Variable in this case... it's being set once and then looked up to change your settings. Just public byte Job {get;set;} would work just fine.
pro4never is offline  
Thanks
1 User
Old 05/27/2012, 15:44   #3
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Client.cs

Code:
            #region JobBools

            public static bool Warrior(Client client)
            {
                return (client.Job > 16 && client.Job < 26);
            }
            public static bool Trojan(Client client)
            {
                return (client.Job > 9 && client.Job < 16);
            }
            public static bool Archer(Client client)
            {
                return (client.Job > 39 && client.Job < 46);
            }
            public static bool Taoist(Client client)
            {
                return (client.Job > 131 && client.Job < 136);
            }
            public static bool Monk(Client client)
            {
                return (client.Job > 59 && client.Job < 65);
            }
            public static bool Ninja(Client client)
            {
                return (client.Job > 49 && client.Job < 56);
            }
            #endregion
            public byte job
            {
                get { return Job; }
            }
Code:
public byte Job { get; set; }
PlayerPacket.cs

Code:
public byte Job
        {
            get { return ReadByte(67); }
            set { WriteByte(value, 67); }
        }
So like that correct?
denominator is offline  
Old 05/27/2012, 16:02   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
... why do you have player packet at all?

Either read the character info from memory or simply read from the packet in a single method.

Unlike with pservers, there's no reason to hold onto the packet and edit it... The server tells you the information and it only changes if the server updates it.
pro4never is offline  
Old 05/27/2012, 16:08   #5
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Okay well I'll take it out of playerpacket.cs

Playerpacket.cs was already in the source

And the result is.....nothing happening o.0? Obviously not doing or adding something that needs to be added >.<
denominator is offline  
Reply




All times are GMT +1. The time now is 12:03.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.