ElitePK Tittle

05/30/2012 03:47 zakkwilde_17#1
hey guys, I have a probleme here. I need to know how to put the green tittles winners of Elite PK Tournament.

this tittles

[Only registered and activated users can see links. Click Here To Register...]

some one know how to add it? =S

tnks for help.
05/30/2012 04:01 Zeroxelli#2
It's most likely a status flag. No idea which, as I've never worked with newer patches (Not a fan of Co2)
05/30/2012 16:10 zakkwilde_17#3
Quote:
Originally Posted by Zeroxelli View Post
It's most likely a status flag. No idea which, as I've never worked with newer patches (Not a fan of Co2)
hmm.. I believe this source that I'm working have traces of that tittle. But i don't know how to do it show up. x.x
05/30/2012 20:19 pro4never#4
It's a title. If you look at albetros we have a fully working title system which you could use as an example to code it.

The actual halo is obviously a status effect.
05/31/2012 04:58 zakkwilde_17#5
Quote:
Originally Posted by pro4never View Post
It's a title. If you look at albetros we have a fully working title system which you could use as an example to code it.

The actual halo is obviously a status effect.
hmmmm
tanks man, i'll try it ^^


Edit______________________________________________ ____________________________


Well, i got work the tittle...
but it dont show to myself, just show to other players... :(

[Only registered and activated users can see links. Click Here To Register...]

and for players

[Only registered and activated users can see links. Click Here To Register...]

I have using this Packet
Code:
                case 1130:
                    {
                        if (client.Entity.TitlePacket != null)
                        {
                            if (packet[9] == 4)
                            {
                                if (client.Entity.TitlePacket.dwParam2 != 0)
                                    client.Entity.TitlePacket.Send(client);
                            }
                            if (packet[9] == 3)
                            {
                                client.Entity.TitleActivated = packet[8];
                                client.Send(packet);
                                client.SendScreen(client.Entity.SpawnPacket, false);
                            }
                        }
                        break;
                    }
Someone know what happened?
06/01/2012 14:38 zakkwilde_17#6
up
06/01/2012 15:22 Korvacs#7
You need to send the effect to other players surprisingly enough...
06/01/2012 17:26 zakkwilde_17#8
Quote:
Originally Posted by Korvacs View Post
You need to send the effect to other players surprisingly enough...
and... how to do it =S

here is my titlepacket

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Conquer_Online_Server.Network.GamePackets
{
    public class TitlePacket : Writer, Interfaces.IPacket
    {
        byte[] Buffer;
        public TitlePacket(bool Create)
        {
            if (Create)
            {
                Buffer = new byte[24];
                WriteUInt16((ushort)(Buffer.Length - 8), 0, Buffer);
                WriteUInt16(1130, 2, Buffer);
            }
            else
            {
                Buffer = new byte[20];
                WriteUInt16((ushort)(Buffer.Length - 8), 0, Buffer);
                WriteUInt16(1130, 2, Buffer);
            }
        }

        public uint UID
        {
            get { return BitConverter.ToUInt32(Buffer, 4); }
            set { WriteUInt32(value, 4, Buffer); }
        }

        public byte Title
        {
            get { return Buffer[8]; }
            set { Buffer[8] = value; }
        }

        public byte Type
        {
            get { return Buffer[9]; }
            set { Buffer[9] = value; }
        }

        public byte dwParam
        {
            get { return Buffer[10]; }
            set { Buffer[10] = value; }
        }

        public byte dwParam2
        {
            get { return Buffer[11]; }
            set { Buffer[11] = value; }
        }

        public void Deserialize(byte[] buffer)
        {
            Buffer = buffer;
        }
        public byte[] ToArray()
        {
            return Buffer;
        }
        public void Send(Client.GameState client)
        {
            client.Send(Buffer);
        }
    }
}
06/01/2012 20:37 Zeroxelli#9
Instead of doing Client.Send or whatever your enduser send method is, use your SendToLocal method (whatever it is.)
06/02/2012 15:40 pro4never#10
Quote:
Originally Posted by Zeroxelli View Post
Instead of doing Client.Send or whatever your enduser send method is, use your SendToLocal method (whatever it is.)
Actually my guess is he's not writing the players title in the spawn entity packet.

You send the packet to your own client to confirm the changes and update yourself.... but the title ID has an offset in the spawn entity packet.

Code:
                                client.SendScreen(client.Entity.SpawnPacket, false);
Make sure you update your SpawnPacket so that it is writing the proper title ID to the correct offset.


<edit>

To be clear here.... try sending the actual title packet to screen... it's more efficient then updating all screen players with your full spawn packet... but REGARDLESS you need to make sure the offset is being written properly in the packet so that NEW players will see your title.

The two are not mutually exclusive and I listed the entity packet simply because I KNOW it has the offset and is required and I cannot comment on if sending the title packet will work when sent to other players (although I assume it does)
06/04/2012 17:39 zakkwilde_17#11
Quote:
Originally Posted by pro4never View Post
Actually my guess is he's not writing the players title in the spawn entity packet.

You send the packet to your own client to confirm the changes and update yourself.... but the title ID has an offset in the spawn entity packet.

Code:
                                client.SendScreen(client.Entity.SpawnPacket, false);
Make sure you update your SpawnPacket so that it is writing the proper title ID to the correct offset.


<edit>

To be clear here.... try sending the actual title packet to screen... it's more efficient then updating all screen players with your full spawn packet... but REGARDLESS you need to make sure the offset is being written properly in the packet so that NEW players will see your title.

The two are not mutually exclusive and I listed the entity packet simply because I KNOW it has the offset and is required and I cannot comment on if sending the title packet will work when sent to other players (although I assume it does)
that's the SpawnPacket:

Code:
        public byte TitleActivated
        {
            get { return SpawnPacket[167]; }
            set { SpawnPacket[167] = value; }
        }
06/04/2012 19:24 Zeroxelli#12
That's an interesting way of doing packets.. A bit more information on the actual [class?] containing that method would be great.
06/04/2012 23:10 pro4never#13
Quote:
Originally Posted by Zeroxelli View Post
That's an interesting way of doing packets.. A bit more information on the actual [class?] containing that method would be great.
It's the way most trinity knockoffs handle packets.

It's... alright but makes it a hell of a mess to try to edit packets as so often these offsets are separated by hundreds of lines of code all jumbled in the damn class.
06/05/2012 01:51 Zeroxelli#14
Quote:
Originally Posted by pro4never View Post
It's the way most trinity knockoffs handle packets.

It's... alright but makes it a hell of a mess to try to edit packets as so often these offsets are separated by hundreds of lines of code all jumbled in the damn class.
Can't say I would even touch it. I don't like when people turn something simple into that much work, and on top of that, scattering redundant assignments/etc around a whole file..