Register for your free account! | Forgot your password?

You last visited: Today at 23:03

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

Advertisement



Flags Problem ....

Discussion on Flags Problem .... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Haary*Potter's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 29
Received Thanks: 1
Flags Problem ....

hay



i have some problem

1- When i used skill transfer to the Assisan
Code:
attacker.AddFlag3(Update.Flags3.PathOfShadow);
when Xplist Comes OR when I use any other Flag Like Riding
Flag3 Remove Automatically and character return normal state not assisan
i what to know what is wrong

2- Lottery Stop Working I Want to know what changes happen
Haary*Potter is offline  
Old 03/14/2013, 19:04   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
if it was flags problem so the problem would be from Tq Conquer but in my view the problem with your update 10017 flag3. [maybe right or wrong] i just guess.
|xabi| is offline  
Old 03/14/2013, 20:27   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by |xabi| View Post
if it was flags problem so the problem would be from Tq Conquer but in my view the problem with your update 10017 flag3. [maybe right or wrong] i just guess.
Make sure of what u say b4 u post it cuz what u posted is Completely wrong ... when u Assign value to StatusFlag its Okay but when Xp List comes the Char StatusFlag3 will be gone cuz simply Xp List is StatusFlag1 so in order to add flags to them both .. u have to Edit StatusFlag1 In Entity.cs
shadowman123 is offline  
Old 03/14/2013, 21:46   #4
 
elite*gold: 0
Join Date: Feb 2013
Posts: 51
Received Thanks: 22
Quote:
Originally Posted by |xabi| View Post
if it was flags problem so the problem would be from Tq Conquer but in my view the problem with your update 10017 flag3. [maybe right or wrong] i just guess.
Quote:
Originally Posted by shadowman123 View Post
Make sure of what u say b4 u post it cuz what u posted is Completely wrong ... when u Assign value to StatusFlag its Okay but when Xp List comes the Char StatusFlag3 will be gone cuz simply Xp List is StatusFlag1 so in order to add flags to them both .. u have to Edit StatusFlag1 In Entity.cs
i guess u both missed the point

all he needs to do is modify the SendUpdates function to receive and send the 3 values , i think when he sends flags1 or flags 2 he sends them through an update call that sends those only 2 vals , so he just needs to edit his update packet to send the 3 flags

ur code line tells that u uses Trinty based source as i think so u need to edit this void
Code:
public void UpdateEffects(bool screen)
and edit this line
Code:
update.AppendFull(25, StatusFlag, StatusFlag2);
to be like this
Code:
update.AppendFull(25, StatusFlag, StatusFlag2, StatusFlag3);
then just update the appendfull function
EgyptianMano is offline  
Old 03/14/2013, 22:21   #5
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
Quote:
Originally Posted by EgyptianMano View Post
i guess u both missed the point

all he needs to do is modify the SendUpdates function to receive and send the 3 values , i think when he sends flags1 or flags 2 he sends them through an update call that sends those only 2 vals , so he just needs to edit his update packet to send the 3 flags

ur code line tells that u uses Trinty based source as i think so u need to edit this void
Code:
public void UpdateEffects(bool screen)
and edit this line
Code:
update.AppendFull(25, StatusFlag, StatusFlag2);
to be like this
Code:
update.AppendFull(25, StatusFlag, StatusFlag2, StatusFlag3);
then just update the appendfull function
really that i talked about it last post i said update 10017 and now you proved what i said
|xabi| is offline  
Thanks
1 User
Old 03/14/2013, 23:19   #6
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
i think every one do this part
PHP Code:
update.AppendFull(25StatusFlagStatusFlag2StatusFlag3); 
5las ana 3reft el 7al
abdoumatrix is offline  
Old 03/15/2013, 01:07   #7
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by EgyptianMano View Post
i guess u both missed the point

all he needs to do is modify the SendUpdates function to receive and send the 3 values , i think when he sends flags1 or flags 2 he sends them through an update call that sends those only 2 vals , so he just needs to edit his update packet to send the 3 flags

ur code line tells that u uses Trinty based source as i think so u need to edit this void
Code:
public void UpdateEffects(bool screen)
and edit this line
Code:
update.AppendFull(25, StatusFlag, StatusFlag2);
to be like this
Code:
update.AppendFull(25, StatusFlag, StatusFlag2, StatusFlag3);
then just update the appendfull function
no i didnt miss .. i gave FULL Completely Right Explaination .. when u add flag u check what flag does it represent ... Xp List in StatusFlag1 so u have to add Value of StatusFlag3 in statsFlag1 method in order not to lose the Flag3 when u assign Flag1
shadowman123 is offline  
Thanks
1 User
Old 03/15/2013, 11:10   #8
 
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
you create :
private CMD.BitVector32 BitVector32 = new CMD.BitVector32(32 * 5);

Code:
public class BitVector32
    {
        public uint[] bits;

        public int Size { get { return 32 * bits.Length; } }

        public BitVector32(int BitCount)
        {
            int sections = BitCount / 32;
            if (BitCount % 32 != 0)
                sections += 1;
            bits = new uint[sections];
        }

        public void Add(int index)
        {
            if (index < Size)
            {
                int idx = index / 32;
                uint bites = (uint)(1 << (index % 32));
                bits[idx] |= bites;
            }
        }
        public void Remove(int index)
        {
            if (index < Size)
            {
                int idx = index / 32;
                uint bites = (uint)(1 << (index % 32));
                bits[idx] &= ~bites;
            }
        }
        public bool Contain(int index)
        {
            if (index > Size) return false;
            int idx = index / 32;
            uint bites = (uint)(1 << (index % 32));
            return ((bits[idx] & bites) == bites);
        }
        public void Clear()
        {
            ushort siz = (byte)(Size / 32);
            for (byte x = 0; x < siz; x++)
            {
                bits[x] = 0;
            }
        }
    }
objpos.BitVector32 = offset value .. = 22;
Code:
        public void AddFlag(int flag)
        {
            BitVector32.Add(flag);

            for (byte x = 0; x < BitVector32.bits.Length; x++)
                WriteUint(BitVector32.bits[x], (ushort)((byte)objpos.BitVector32 + x * 4));

            using (Client.GamePackets.Update updat = new Client.GamePackets.Update(0))
            {
                updat.UID = UID;
                updat.Append(Client.GamePackets.Update.StatusFlag, BitVector32.bits);
                View.SendView(updat.ToArray(), true);
            }
        }
        public bool ContainsFlag(int flag)
        {
           return BitVector32.Contain(flag);
        }
        public void RemoveFlag(int flag)
        {
            if (ContainsFlag(flag))
            {
                BitVector32.Remove(flag);

                for (byte x = 0; x < BitVector32.bits.Length; x++)
                    WriteUint(BitVector32.bits[x], (ushort)((byte)objpos.BitVector32 + x * 4));

                using (Client.GamePackets.Update updat = new Client.GamePackets.Update(0))
                {
                    updat.UID = UID;
                    updat.Append(Client.GamePackets.Update.StatusFlag, BitVector32.bits);
                    View.SendView(updat.ToArray(), true);
                }
            }
        }
In Update.cs
Code:
        public void Append(byte type, uint[] value)
        {
            UpdateCount = UpdateCount + 1;
            ushort offset = (ushort)(12 + (UpdateCount - 1) * 24);
            WriteUint(type, offset);
            for (byte x = 0; x < value.Length; x++)
                WriteUint(value[x], (ushort)((offset + 4) + x * 4));
        }
Code:
        public class Flags
        {
            public const int
                Normal = 0x0,
                FlashingName = 0,
                Poisoned = 1,
                Invisible = 2,
                XPList = 4,
                Dead = 5,
                TeamLeader = 6,
                StarOfAccuracy = 7,
                MagicShield = 8,
                Stigma = 9,
                Ghost = 10,
                FadeAway = 11,
                RedName = 14,
                BlackName = 15,
                ReflectMelee = 17,
                Superman = 18,
                Ball = 19,
                Ball2 = 20,
                Invisibility = 22,
                Cyclone = 23,
                Dodge = 26,
                Fly = 27,
                Intensify = 28,
                CastPray = 30,
                Praying = 31,
                HeavenBlessing = 33,
                TopGuildLeader = 34,
                TopDeputyLeader = 35,
                MonthlyPKChampion = 36,
                WeeklyPKChampion = 37,
                TopWarrior = 38,
                TopTrojan = 39,
                TopArcher = 40,
                TopWaterTaoist = 41,
                TopFireTaoist = 42,
                TopNinja = 43,
                ShurikenVortex = 46,
                FatalStrike = 47,
                Flashy = 48,
                Ride = 50,
                AzureShield = 92,
                SoulShackle = 110,
                Oblivion = 111,
                Shield = 128,
                RemoveName = 129,
                PurpleBall = 131,
                BlueBall = 132,
                PathOfShadow = 145,
                AssasinExpSkill = 146,
                KineticSpark = 147;
        }
teroareboss1 is offline  
Old 03/15/2013, 12:41   #9
 
Haary*Potter's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 29
Received Thanks: 1
Quote:
Originally Posted by |xabi| View Post
if it was flags problem so the problem would be from Tq Conquer but in my view the problem with your update 10017 flag3. [maybe right or wrong] i just guess.
thank xabi i missed some thing..
Quote:
Originally Posted by shadowman123 View Post
Make sure of what u say b4 u post it cuz what u posted is Completely wrong ... when u Assign value to StatusFlag its Okay but when Xp List comes the Char StatusFlag3 will be gone cuz simply Xp List is StatusFlag1 so in order to add flags to them both .. u have to Edit StatusFlag1 In Entity.cs
thanks abo hamdy you are rights
Quote:
Originally Posted by EgyptianMano View Post
i guess u both missed the point

all he needs to do is modify the SendUpdates function to receive and send the 3 values , i think when he sends flags1 or flags 2 he sends them through an update call that sends those only 2 vals , so he just needs to edit his update packet to send the 3 flags

ur code line tells that u uses Trinty based source as i think so u need to edit this void
Code:
public void UpdateEffects(bool screen)
and edit this line
Code:
update.AppendFull(25, StatusFlag, StatusFlag2);
to be like this
Code:
update.AppendFull(25, StatusFlag, StatusFlag2, StatusFlag3);
then just update the appendfull function
yes you are right i missed UpdateEffects so flags removed
Quote:
Originally Posted by abdoumatrix View Post
i think every one do this part
PHP Code:
update.AppendFull(25StatusFlagStatusFlag2StatusFlag3); 
5las ana 3reft el 7al
thanks alot abdo
Quote:
Originally Posted by teroareboss1 View Post
you create :
private CMD.BitVector32 BitVector32 = new CMD.BitVector32(32 * 5);

Code:
public class BitVector32
    {
        public uint[] bits;

        public int Size { get { return 32 * bits.Length; } }

        public BitVector32(int BitCount)
        {
            int sections = BitCount / 32;
            if (BitCount % 32 != 0)
                sections += 1;
            bits = new uint[sections];
        }

        public void Add(int index)
        {
            if (index < Size)
            {
                int idx = index / 32;
                uint bites = (uint)(1 << (index % 32));
                bits[idx] |= bites;
            }
        }
        public void Remove(int index)
        {
            if (index < Size)
            {
                int idx = index / 32;
                uint bites = (uint)(1 << (index % 32));
                bits[idx] &= ~bites;
            }
        }
        public bool Contain(int index)
        {
            if (index > Size) return false;
            int idx = index / 32;
            uint bites = (uint)(1 << (index % 32));
            return ((bits[idx] & bites) == bites);
        }
        public void Clear()
        {
            ushort siz = (byte)(Size / 32);
            for (byte x = 0; x < siz; x++)
            {
                bits[x] = 0;
            }
        }
    }
objpos.BitVector32 = offset value .. = 22;
Code:
        public void AddFlag(int flag)
        {
            BitVector32.Add(flag);

            for (byte x = 0; x < BitVector32.bits.Length; x++)
                WriteUint(BitVector32.bits[x], (ushort)((byte)objpos.BitVector32 + x * 4));

            using (Client.GamePackets.Update updat = new Client.GamePackets.Update(0))
            {
                updat.UID = UID;
                updat.Append(Client.GamePackets.Update.StatusFlag, BitVector32.bits);
                View.SendView(updat.ToArray(), true);
            }
        }
        public bool ContainsFlag(int flag)
        {
           return BitVector32.Contain(flag);
        }
        public void RemoveFlag(int flag)
        {
            if (ContainsFlag(flag))
            {
                BitVector32.Remove(flag);

                for (byte x = 0; x < BitVector32.bits.Length; x++)
                    WriteUint(BitVector32.bits[x], (ushort)((byte)objpos.BitVector32 + x * 4));

                using (Client.GamePackets.Update updat = new Client.GamePackets.Update(0))
                {
                    updat.UID = UID;
                    updat.Append(Client.GamePackets.Update.StatusFlag, BitVector32.bits);
                    View.SendView(updat.ToArray(), true);
                }
            }
        }
In Update.cs
Code:
        public void Append(byte type, uint[] value)
        {
            UpdateCount = UpdateCount + 1;
            ushort offset = (ushort)(12 + (UpdateCount - 1) * 24);
            WriteUint(type, offset);
            for (byte x = 0; x < value.Length; x++)
                WriteUint(value[x], (ushort)((offset + 4) + x * 4));
        }
Code:
        public class Flags
        {
            public const int
                Normal = 0x0,
                FlashingName = 0,
                Poisoned = 1,
                Invisible = 2,
                XPList = 4,
                Dead = 5,
                TeamLeader = 6,
                StarOfAccuracy = 7,
                MagicShield = 8,
                Stigma = 9,
                Ghost = 10,
                FadeAway = 11,
                RedName = 14,
                BlackName = 15,
                ReflectMelee = 17,
                Superman = 18,
                Ball = 19,
                Ball2 = 20,
                Invisibility = 22,
                Cyclone = 23,
                Dodge = 26,
                Fly = 27,
                Intensify = 28,
                CastPray = 30,
                Praying = 31,
                HeavenBlessing = 33,
                TopGuildLeader = 34,
                TopDeputyLeader = 35,
                MonthlyPKChampion = 36,
                WeeklyPKChampion = 37,
                TopWarrior = 38,
                TopTrojan = 39,
                TopArcher = 40,
                TopWaterTaoist = 41,
                TopFireTaoist = 42,
                TopNinja = 43,
                ShurikenVortex = 46,
                FatalStrike = 47,
                Flashy = 48,
                Ride = 50,
                AzureShield = 92,
                SoulShackle = 110,
                Oblivion = 111,
                Shield = 128,
                RemoveName = 129,
                PurpleBall = 131,
                BlueBall = 132,
                PathOfShadow = 145,
                AssasinExpSkill = 146,
                KineticSpark = 147;
        }
thanks bro i solve it
now what about lottery
Haary*Potter is offline  
Reply


Similar Threads Similar Threads
NPC flags problem
04/28/2012 - CO2 Programming - 2 Replies
Hello, epvp community! :) ... And the problem is : I can't open the warehouse, even though I have already setted up the NPC flags to 3. Question is, what to do? (Note : Other flags like item socketing and upgrading are working) Should I send an obscure general data packet to the client to force it to open the warehouse or I have a problem in my NPC spawn packet? Thanks in advance.
World quard flags problem
07/22/2011 - Minecraft - 1 Replies
Kann mir jemand genauer das verwenden der flags zeigen das man z.b in der stadt nicht mit tnt bauen kann oder creeper nicht explotieren ?
Problem for flags
04/04/2011 - Metin2 Private Server - 0 Replies
The problem is as follows. I can not use the flag of the clan. Anyone know it can be?
Event Capture The Flags(CTF)PROBLEM
12/28/2009 - Silkroad Online - 3 Replies
why event CTF always kick me from the game when i want go get the flag ?? :rtfm:
AB Flags
12/03/2007 - WoW Exploits, Hacks, Tools & Macros - 2 Replies
When you see someone taking the flag just do /wait. This will make them quit taking the flag. Than simply run up to the flag and grab it before they click on it again. I am not sure if this works with the opposing faction. 1) Go To AB 2) Find A Flag That Someone Is Taking 3) Click On The Person 4) Click "Enter" And Type In "/wait" Without The Quotes 5) Run Up And Take The Flag Before He Clicks On It Again



All times are GMT +1. The time now is 23: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.