Flags Problem ....

03/14/2013 17:38 Haary*Potter#1
hay

:D

i have some problem :confused:

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 :handsdown:
i what to know what is wrong :rtfm:

2- Lottery Stop Working I Want to know what changes happen :confused:
03/14/2013 19:04 |xabi|#2
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.
03/14/2013 20:27 shadowman123#3
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
03/14/2013 21:46 EgyptianMano#4
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
03/14/2013 22:21 |xabi|#5
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 :)
03/14/2013 23:19 abdoumatrix#6
i think every one do this part
PHP Code:
update.AppendFull(25StatusFlagStatusFlag2StatusFlag3); 
5las ana 3reft el 7al
03/15/2013 01:07 shadowman123#7
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
03/15/2013 11:10 teroareboss1#8
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;
        }
03/15/2013 12:41 Haary*Potter#9
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 :rolleyes: