[Release]Pk Event

07/01/2009 18:29 alexbigfoot#31
Quote:
Originally Posted by ~RapidBlade~ View Post
I haven't been able to figure out the flags for capture the flag yet, sorry. If i find it out i probably won't release it anyway tho, gotta keep some stuff for myself =)
PHP Code:
  public byte[] CaptureTheFlag(SingleNPC NPC)//1080
        
{
            
string Ctf "CaptureTheFlag";
            
ushort PacketType 1109;
            
byte[] Packet = new byte[28 Ctf.Length];
            if (
World.CaptureTheFlag != "None")
                
Packet = new byte[28 World.CaptureTheFlag.Length];

            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = (ushort)PacketType;
                *((
uint*)(4)) = (uint)NPC.UID;
                *((
uint*)(8)) = (uint)NPC.MaxHP;
                *((
uint*)(12)) = (uint)NPC.CurHP;
                *((
ushort*)(16)) = (ushort)NPC.X;
                *((
ushort*)(18)) = (ushort)NPC.Y;
                *((
ushort*)(20)) = (ushort)(1086);
                *((
ushort*)(22)) = (ushort)NPC.Flags;
                *(
24) = 11;
                *(
26) = 1;
                if (
World.CaptureTheFlag != "None")
                {
                    *(
27) = (byte)World.CaptureTheFlag.Length;
                    for (
int i 0World.CaptureTheFlag.Lengthi++)
                    {
                        *(
28 i) = Convert.ToByte(World.CaptureTheFlag[i]);
                    }
                }
                else
                {
                    *(
27) = (byte)Ctf.Length;
                    for (
int i 04i++)
                    {
                        *(
28 i) = Convert.ToByte(Ctf[i]);
                    }
                }
            }
            return 
Packet;
        } 
Have Fun.
07/01/2009 18:46 ~RapidBlade~#32
That cant be the whole Capture the flag, and i actually did make it after a bit... pretty old post lol. Mine runs by NPCS and commands and stuff
07/01/2009 18:59 danielachraf#33
@Rapid .. make timers , it is really easy and better
07/01/2009 19:18 ~RapidBlade~#34
daniel, i know thats what im working on now, if youve seen my latest post asking for some1 to help me with my allowing and disabling pking, thats all thats left and my official pk event is a ton better.
07/01/2009 20:54 alexbigfoot#35
no, i gave u the most important thing in ctf, the flag. u have to figure out the rest