Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 19:24

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

Advertisement



i need help in this ( 2 problem )

Discussion on i need help in this ( 2 problem ) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2009
Posts: 11
Received Thanks: 0
i need help in this ( 2 problem )

hey all

i have two big problem (for me ) with me source
prob number 1

in blowfish.cs file

Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace NewestCOServer.Main
{
    public class Cryptographer : object
    {
        ushort m_InCounter = 0;
        ushort m_OutCounter = 0;
        bool m_UseAlt = false;
        private byte[] m_Key1 = {
								  0x9D, 0x90, 0x83, 0x8A, 0xD1, 0x8C, 0xE7, 0xF6, 0x25, 0x28, 0xEB, 0x82, 0x99, 0x64, 0x8F, 0x2E,
								  0x2D, 0x40, 0xD3, 0xFA, 0xE1, 0xBC, 0xB7, 0xE6, 0xB5, 0xD8, 0x3B, 0xF2, 0xA9, 0x94, 0x5F, 0x1E, 
								  0xBD, 0xF0, 0x23, 0x6A, 0xF1, 0xEC, 0x87, 0xD6, 0x45, 0x88, 0x8B, 0x62, 0xB9, 0xC4, 0x2F, 0x0E, 
								  0x4D, 0xA0, 0x73, 0xDA, 0x01, 0x1C, 0x57, 0xC6, 0xD5, 0x38, 0xDB, 0xD2, 0xC9, 0xF4, 0xFF, 0xFE, 
								  0xDD, 0x50, 0xC3, 0x4A, 0x11, 0x4C, 0x27, 0xB6, 0x65, 0xE8, 0x2B, 0x42, 0xD9, 0x24, 0xCF, 0xEE, 
								  0x6D, 0x00, 0x13, 0xBA, 0x21, 0x7C, 0xF7, 0xA6, 0xF5, 0x98, 0x7B, 0xB2, 0xE9, 0x54, 0x9F, 0xDE, 
								  0xFD, 0xB0, 0x63, 0x2A, 0x31, 0xAC, 0xC7, 0x96, 0x85, 0x48, 0xCB, 0x22, 0xF9, 0x84, 0x6F, 0xCE, 
								  0x8D, 0x60, 0xB3, 0x9A, 0x41, 0xDC, 0x97, 0x86, 0x15, 0xF8, 0x1B, 0x92, 0x09, 0xB4, 0x3F, 0xBE, 
								  0x1D, 0x10, 0x03, 0x0A, 0x51, 0x0C, 0x67, 0x76, 0xA5, 0xA8, 0x6B, 0x02, 0x19, 0xE4, 0x0F, 0xAE, 
								  0xAD, 0xC0, 0x53, 0x7A, 0x61, 0x3C, 0x37, 0x66, 0x35, 0x58, 0xBB, 0x72, 0x29, 0x14, 0xDF, 0x9E, 
								  0x3D, 0x70, 0xA3, 0xEA, 0x71, 0x6C, 0x07, 0x56, 0xC5, 0x08, 0x0B, 0xE2, 0x39, 0x44, 0xAF, 0x8E, 
								  0xCD, 0x20, 0xF3, 0x5A, 0x81, 0x9C, 0xD7, 0x46, 0x55, 0xB8, 0x5B, 0x52, 0x49, 0x74, 0x7F, 0x7E, 
								  0x5D, 0xD0, 0x43, 0xCA, 0x91, 0xCC, 0xA7, 0x36, 0xE5, 0x68, 0xAB, 0xC2, 0x59, 0xA4, 0x4F, 0x6E, 
								  0xED, 0x80, 0x93, 0x3A, 0xA1, 0xFC, 0x77, 0x26, 0x75, 0x18, 0xFB, 0x32, 0x69, 0xD4, 0x1F, 0x5E, 
								  0x7D, 0x30, 0xE3, 0xAA, 0xB1, 0x2C, 0x47, 0x16, 0x05, 0xC8, 0x4B, 0xA2, 0x79, 0x04, 0xEF, 0x4E, 
								  0x0D, 0xE0, 0x33, 0x1A, 0xC1, 0x5C, 0x17, 0x06, 0x95, 0x78, 0x9B, 0x12, 0x89, 0x34, 0xBF, 0x3E};

        private byte[] m_Key2 = {
								  0x62, 0x4F, 0xE8, 0x15, 0xDE, 0xEB, 0x04, 0x91, 0x1A, 0xC7, 0xE0, 0x4D, 0x16, 0xE3, 0x7C, 0x49,
								  0xD2, 0x3F, 0xD8, 0x85, 0x4E, 0xDB, 0xF4, 0x01, 0x8A, 0xB7, 0xD0, 0xBD, 0x86, 0xD3, 0x6C, 0xB9,
								  0x42, 0x2F, 0xC8, 0xF5, 0xBE, 0xCB, 0xE4, 0x71, 0xFA, 0xA7, 0xC0, 0x2D, 0xF6, 0xC3, 0x5C, 0x29,
								  0xB2, 0x1F, 0xB8, 0x65, 0x2E, 0xBB, 0xD4, 0xE1, 0x6A, 0x97, 0xB0, 0x9D, 0x66, 0xB3, 0x4C, 0x99,
								  0x22, 0x0F, 0xA8, 0xD5, 0x9E, 0xAB, 0xC4, 0x51, 0xDA, 0x87, 0xA0, 0x0D, 0xD6, 0xA3, 0x3C, 0x09,
								  0x92, 0xFF, 0x98, 0x45, 0x0E, 0x9B, 0xB4, 0xC1, 0x4A, 0x77, 0x90, 0x7D, 0x46, 0x93, 0x2C, 0x79,
								  0x02, 0xEF, 0x88, 0xB5, 0x7E, 0x8B, 0xA4, 0x31, 0xBA, 0x67, 0x80, 0xED, 0xB6, 0x83, 0x1C, 0xE9,
								  0x72, 0xDF, 0x78, 0x25, 0xEE, 0x7B, 0x94, 0xA1, 0x2A, 0x57, 0x70, 0x5D, 0x26, 0x73, 0x0C, 0x59,
								  0xE2, 0xCF, 0x68, 0x95, 0x5E, 0x6B, 0x84, 0x11, 0x9A, 0x47, 0x60, 0xCD, 0x96, 0x63, 0xFC, 0xC9,
								  0x52, 0xBF, 0x58, 0x05, 0xCE, 0x5B, 0x74, 0x81, 0x0A, 0x37, 0x50, 0x3D, 0x06, 0x53, 0xEC, 0x39,
								  0xC2, 0xAF, 0x48, 0x75, 0x3E, 0x4B, 0x64, 0xF1, 0x7A, 0x27, 0x40, 0xAD, 0x76, 0x43, 0xDC, 0xA9,
								  0x32, 0x9F, 0x38, 0xE5, 0xAE, 0x3B, 0x54, 0x61, 0xEA, 0x17, 0x30, 0x1D, 0xE6, 0x33, 0xCC, 0x19,
								  0xA2, 0x8F, 0x28, 0x55, 0x1E, 0x2B, 0x44, 0xD1, 0x5A, 0x07, 0x20, 0x8D, 0x56, 0x23, 0xBC, 0x89,
								  0x12, 0x7F, 0x18, 0xC5, 0x8E, 0x1B, 0x34, 0x41, 0xCA, 0xF7, 0x10, 0xFD, 0xC6, 0x13, 0xAC, 0xF9,
								  0x82, 0x6F, 0x08, 0x35, 0xFE, 0x0B, 0x24, 0xB1, 0x3A, 0xE7, 0x00, 0x6D, 0x36, 0x03, 0x9C, 0x69,
								  0xF2, 0x5F, 0xF8, 0xA5, 0x6E, 0xFB, 0x14, 0x21, 0xAA, 0xD7, 0xF0, 0xDD, 0xA6, 0xF3, 0x8C, 0xD9};
        private byte[] m_Key3;
        private byte[] m_Key4;

        public Cryptographer()
        {
        }
        public void SetKeys(byte[] InKey1, byte[] InKey2)
        {
            byte[] addKey1 = new byte[4];
            byte[] addKey2 = new byte[4];
            byte[] addResult = new byte[4];
            //addKey1.i = 0;
            //addKey2.i = 0;
            byte[] tempKey = new byte[4];

            long LMULer;
            //			InKey1[0] = 0x20;
            //			InKey1[1] = 0x5c;
            //			InKey1[2] = 0x48;
            //			InKey1[3] = 0xf4;
            //			InKey2[0] = 0x00;
            //			InKey2[1] = 0x44;
            //			InKey2[2] = 0xa6;
            //			InKey2[3] = 0x2e;

            //if (Key3) delete [] Key3;
            //if (Key4) delete [] Key4;
        System.Threading.Monitor.Enter(this);
            m_Key3 = new Byte[256];
            m_Key4 = new Byte[256];
            for (int x = 0; x < 4; x++)
            {
                addKey1[x] = InKey1[3 - x];
                addKey2[x] = InKey2[3 - x];
            }
            //cout << "Key1: " << addKey1.i << endl;
            //cout << "Key2: " << addKey2.i << endl;
            uint Adder1;
            uint Adder2;
            uint Adder3;
            Adder1 = (uint)((addKey1[3] << 24) | (addKey1[2] << 16) | (addKey1[1] << 8) | (addKey1[0]));
            Adder2 = (uint)((addKey2[3] << 24) | (addKey2[2] << 16) | (addKey2[1] << 8) | (addKey2[0]));
            Adder3 = Adder1 + Adder2;
            addResult[0] = (byte)(Adder3 & 0xff);
            addResult[1] = (byte)((Adder3 >> 8) & 0xff);
            addResult[2] = (byte)((Adder3 >> 16) & 0xff);
            addResult[3] = (byte)((Adder3 >> 24) & 0xff);
            for (int b = 3; b >= 0; b--)
            {
                //	printf("%.2x ", addResult.c[b]);
                tempKey[3 - b] = addResult[b];
            }
            tempKey[2] = (byte)(tempKey[2] ^ (byte)0x43);
            tempKey[3] = (byte)(tempKey[3] ^ (byte)0x21);

            for (int b = 0; b < 4; b++)
            {
                tempKey[b] = (byte)(tempKey[b] ^ InKey1[b]);
            }

            //Build the 3rd Key
            for (int b = 0; b < 256; b++)
            {
                m_Key3[b] = (byte)(tempKey[3 - (b % 4)] ^ m_Key1[b]);
            }


            for (int x = 0; x < 4; x++)
            {
                addResult[x] = tempKey[3 - x];
            }
            Adder3 = (uint)((addResult[3] << 24) | (addResult[2] << 16) | (addResult[1] << 8) | (addResult[0]));
            LMULer = Adder3 * Adder3;
            LMULer = LMULer << 32;
            LMULer = LMULer >> 32;

            Adder3 = Convert.ToUInt32(LMULer & 0xffffffff);

            addResult[0] = (byte)(Adder3 & 0xff);
            addResult[1] = (byte)((Adder3 >> 8) & 0xff);
            addResult[2] = (byte)((Adder3 >> 16) & 0xff);
            addResult[3] = (byte)((Adder3 >> 24) & 0xff);

            for (int b = 3; b >= 0; b--)
            {
                tempKey[3 - b] = addResult[b];
            }
            //Build the 4th Key
            for (int b = 0; b < 256; b++)
            {
                m_Key4[b] = Convert.ToByte(tempKey[3 - (b % 4)] ^ m_Key2[b]);
            }
            System.Threading.Monitor.Exit(this);

            //cout << "Int representation: " << charadd.i << endl;
        }

        public void ResetCounter()
        {
            //Monitor.Enter(this);
            m_OutCounter = 0;
            m_InCounter = 0;
            //Monitor.Exit(this);
        }

        public void EnableAlternateKeys()
        {
            //Monitor.Enter(this);
            m_UseAlt = true;
            //m_InCounter = 0;
            m_OutCounter = 0;
            //Monitor.Exit(this);
        }

        public void DisableAlternateKeys()
        {
            //Monitor.Enter(this);
            m_UseAlt = false;
            m_InCounter = 0;
            m_OutCounter = 0;
            //Monitor.Exit(this);
        }

        public void Encrypt(ref byte[] Data)
        {
            try
            {
                //Monitor.Enter(this);
                for (int b = 0; b < Data.Length; b++)
                {
                    Data[b] = (byte)(Data[b] ^ 0xab);
                    Data[b] = (byte)(Data[b] << 4 | Data[b] >> 4);
                    Data[b] = (byte)(m_Key2[m_OutCounter >> 8] ^ Data[b]);
                    Data[b] = (byte)(m_Key1[m_OutCounter & 0x00ff] ^ Data[b]);
                    m_OutCounter++;
                }
                //Console.WriteLine("OutCounter = " + m_OutCounter);
                //Monitor.Exit(this);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
        public int Decrypt(ref byte[] Data)
        {
            try
            {

                byte[] Key1;
                byte[] Key2;
                if (m_UseAlt)
                {
                    Key1 = m_Key3;
                    Key2 = m_Key4;
                }
                else
                {
                    Key1 = m_Key1;
                    Key2 = m_Key2;
                }
                //Monitor.Enter(this);
                for (int b = 0; b < Data.Length; b++)
                {
                    Data[b] = (byte)(Data[b] ^ 0xab);
                    Data[b] = (byte)(Data[b] << 4 | Data[b] >> 4);
                    Data[b] = (byte)(Key2[m_InCounter >> 8] ^ Data[b]);
                    Data[b] = (byte)(Key1[(m_InCounter & 0x00ff)] ^ Data[b]);
                    m_InCounter++;
                }



                int idi = Data[0x01];
                idi = (idi << 8) | Data[0x00];




                return m_InCounter;




                //Monitor.Exit(this);
            }
            catch (Exception)
            {
                //   Console.WriteLine(e.ToString());
                return 0;
            }
        }
        public void PeekDecrypt(ref byte[] Data)
        {
            //Monitor.Enter(this);
            for (int b = 0; b < Data.Length; b++)
            {
                Data[b] = (byte)(m_Key1[((m_InCounter + b) & 0x00ff)] ^ Data[b]);
                Data[b] = (byte)(m_Key2[(m_InCounter + b) >> 8] ^ Data[b]);
                Data[b] = (byte)(Data[b] << 4 | Data[b] >> 4);
                Data[b] = (byte)(Data[b] ^ 0xab);
            }
            //Monitor.Exit(this);
        }
    }
  public class GameCrypto
    {
        Blowfish _blowfish;
        public GameCrypto(byte[] key)
        {
            _blowfish = new Blowfish(BlowfishAlgorithm.CFB64);
            _blowfish.SetKey(key);
        }
        public void Decrypt(byte[] packet)
        {
            byte[] buffer = _blowfish.Decrypt(packet);
            System.Buffer.BlockCopy(buffer, 0, packet, 0, buffer.Length);
        }
        public void Encrypt(byte[] packet)
        {
            byte[] buffer = _blowfish.Encrypt(packet);
            System.Buffer.BlockCopy(buffer, 0, packet, 0, buffer.Length);
        }
        public byte[] Decrypts(byte[] packet)
        {
            byte[] buffer = _blowfish.Decrypt(packet);
            System.Buffer.BlockCopy(buffer, 0, packet, 0, buffer.Length);
            return buffer;
        }
        public byte[] Encrypts(byte[] packet)
        {
            byte[] buffer = _blowfish.Encrypt(packet);
               System.Buffer.BlockCopy(buffer, 0, packet, 0, buffer.Length);
            return buffer;
        }
        public Blowfish Blowfish
        {
            get { return _blowfish; }
        }
    }    
    public enum BlowfishAlgorithm
    {
        ECB,
        CBC,
        CFB64,
        OFB64,
    };
    public class Blowfish : IDisposable
    {
        [StructLayout(LayoutKind.Sequential)]
        struct bf_key_st
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 18)]
            public UInt32[] P;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
            public UInt32[] S;
        }
        private BlowfishAlgorithm _algorithm;
        private IntPtr _key;
        private byte[] _encryptIv;
        private byte[] _decryptIv;
        private int _encryptNum;
        private int _decryptNum;
        public Blowfish(BlowfishAlgorithm algorithm)
        {
            _algorithm = algorithm;
            _encryptIv = new byte[8] { 0, 0, 0, 0, 0, 0, 0, 0 };
            _decryptIv = new byte[8] { 0, 0, 0, 0, 0, 0, 0, 0 };
            bf_key_st key = new bf_key_st();
            key.P = new UInt32[16 + 2];
            key.S = new UInt32[4 * 256];
            _key = Marshal.AllocHGlobal(key.P.Length * sizeof(UInt32) + key.S.Length * sizeof(UInt32));
            Marshal.StructureToPtr(key, _key, false);
            _encryptNum = 0;
            _decryptNum = 0;
        }

        public void Dispose()
        {
            Marshal.FreeHGlobal(_key);
        }
        public void SetKey(byte[] data)
        {
            _encryptNum = 0;
            _decryptNum = 0;
            [COLOR="Red"]Native.BF_set_key(_key, data.Length, data);[/COLOR]
        }
        public byte[] Encrypt(byte[] buffer)
        {
            byte[] ret = new byte[buffer.Length];
            switch (_algorithm)
            {
                case BlowfishAlgorithm.ECB:
                    Native.BF_ecb_encrypt(buffer, ret, _key, 1);
                    break;
                case BlowfishAlgorithm.CBC:
                    Native.BF_cbc_encrypt(buffer, ret, buffer.Length, _key, _encryptIv, 1);
                    break;
                case BlowfishAlgorithm.CFB64:
                    Native.BF_cfb64_encrypt(buffer, ret, buffer.Length, _key, _encryptIv, ref _encryptNum, 1);
                    break;
                case BlowfishAlgorithm.OFB64:
                    Native.BF_ofb64_encrypt(buffer, ret, buffer.Length, _key, _encryptIv, out _encryptNum);
                    break;
            }
            return ret;
        }
        public byte[] Decrypt(byte[] buffer)
        {
            byte[] ret = new byte[buffer.Length];
            switch (_algorithm)
            {
                case BlowfishAlgorithm.ECB:
                    Native.BF_ecb_encrypt(buffer, ret, _key, 0);
                    break;
                case BlowfishAlgorithm.CBC:
                    Native.BF_cbc_encrypt(buffer, ret, buffer.Length, _key, _decryptIv, 0);
                    break;
                case BlowfishAlgorithm.CFB64:
                    Native.BF_cfb64_encrypt(buffer, ret, buffer.Length, _key, _decryptIv, ref _decryptNum, 0);
                    break;
                case BlowfishAlgorithm.OFB64:
                    Native.BF_ofb64_encrypt(buffer, ret, buffer.Length, _key, _decryptIv, out _decryptNum);
                    break;
            }
            return ret;
        }
        public byte[] EncryptIV
        {
            get { return _encryptIv; }
            set { System.Buffer.BlockCopy(value, 0, _encryptIv, 0, 8); }
        }
        public byte[] DecryptIV
        {
            get { return _decryptIv; }
            set { System.Buffer.BlockCopy(value, 0, _decryptIv, 0, 8); }
        }
    }
}


i think my problem in red code when i try to log in while debugging my source
i see there is problem with this .
this problem make account freez in login


problem number 2


npc of guild war prize

Code:
 #region GuildArena
                            case 380:
                                {
                                    if (Game.World.Gw == false)
                                    {
                                        if (option == 0)
                                        {
                                            OptionText("Do you wish to enter the guild area?", GC);
                                            OptionLink("Yes.", 1, GC);
                                            OptionLink("Your guild won the guild war??", 2, GC);
                                            OptionLink("Just passing by.", 255, GC);
                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                            GC.SendPacket(Packets.NPCFinish());
                                        }
                                        else if (option == 2)
                                        {

                                            OptionText("Your guild Won the GuildWar?if so,you are rewarded with CPs and the special Aura.", GC);
                                            OptionLink("Yes.", 3, GC);
                                            OptionLink("Ah, sorry my guild lost.", 255, GC);
                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                            GC.SendPacket(Packets.NPCFinish());

                                        }
                                        else if (option == 3)
                                        {
                                            if (Game.World.Gw == true)
                                            {
                                                if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner)
                                                {
                                                    if (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader)
                                                    {
                                                        if (GC.MyChar.TopGuildLeader < 1)
                                                        {
                                                            GC.MyChar.CPs += 60000;
                                                            GC.MyChar.TopGuildLeader = 1;
                                                            GC.MyChar.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopGuildLeader);
                                                            OptionText("Cogration!You have Top GuilLider and 60.000Cps ,thx for you participation", GC);
                                                            OptionLink("Ah..Ok i see.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                            GC.MyChar.AddItem(723467);
                                                        }
                                                        else
                                                        {
                                                            OptionText("Sorry, but i already gave you the reward!", GC);
                                                            OptionLink("OK thx.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                    }
                                                    else if (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.DeputyManager)
                                                    {
                                                        if (GC.MyChar.TopDeputyLeader < 1)
                                                        {
                                                            GC.MyChar.TopDeputyLeader = 1;
                                                            GC.MyChar.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopDeputyLeader);
                                                            OptionText("Cogration!You have Top DeuputiLider ,thx for you participation", GC);
                                                            OptionLink("Ah..Ok i see.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                        else
                                                        {
                                                            OptionText("Sorry, but i already gave you the reward!", GC);
                                                            OptionLink("OK thx.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                    }
                                                    else
                                                    {
                                                        OptionText("Sorry, but i already gave you the reward!", GC);
                                                        OptionLink("Ah..Ok i see.", 255, GC);
                                                        GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                        GC.SendPacket(Packets.NPCFinish());
                                                    }
                                                }
                                                else
                                                {
                                                    OptionText("Sorry,you are not a winner!", GC);
                                                    OptionLink("Ah..Ok i see.", 255, GC);
                                                    GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                    GC.SendPacket(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                OptionText("The guildwar is already on", GC);
                                                OptionLink("Ah..Ok i see.", 255, GC);
                                                GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                GC.SendPacket(Packets.NPCFinish());
                                            }

                                        }
                                        else if (option == 1)
                                            GC.MyChar.Teleport(1038, 350, 350);
                                    }
                                    else
                                    {
                                        if (option == 0)
                                        {
                                            OptionText("Do you wish to enter the guild arena?", GC);
                                            OptionLink("Yes.", 1, GC);
                                            OptionLink("Your Guild Won Guild War?", 2, GC);
                                            OptionLink("Just passing by.", 255, GC);
                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                            GC.SendPacket(Packets.NPCFinish());
                                        }
                                        else if (option == 2)
                                        {

                                            OptionText("Your guild Won the GuildWar?here are your rewards then", GC);
                                            OptionLink("Yes we won.", 3, GC);
                                            OptionLink("Ah, sorry ,i lossed.", 255, GC);
                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                            GC.SendPacket(Packets.NPCFinish());

                                        }
                                        else if (option == 3)
                                        {
                                            if (Game.World.Gw == false)
                                            {
                                                if (GC.MyChar.MyGuild == Features.GuildWars.LastWinner)
                                                {
                                                    if (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.GuildLeader)
                                                    {
                                                        if (GC.MyChar.TopGuildLeader < 1)
                                                        {
                                                            GC.MyChar.AddItem(723467);
                                                            GC.MyChar.CPs += 60000;
                                                            GC.MyChar.TopGuildLeader = 1;
                                                            GC.MyChar.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopGuildLeader);
                                                            OptionText("Cogration!You have Top GuilLider and 60.000Cps ,thx for you participation", GC);
                                                            OptionLink("Ah..Ok i see.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                        else
                                                        {
                                                            OptionText("Sorry, you got them", GC);
                                                            OptionLink("OK thx.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                    }
                                                    else if (GC.MyChar.GuildRank == NewestCOServer.Features.GuildRank.DeputyManager)
                                                    {
                                                        if (GC.MyChar.TopDeputyLeader < 1)
                                                        {
                                                            GC.MyChar.TopDeputyLeader = 1;
                                                            GC.MyChar.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopDeputyLeader);
                                                            OptionText("Cogration!You have Top DeuputiLider ,thx for you participation", GC);
                                                            OptionLink("Ah..Ok i see.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                        else
                                                        {
                                                            OptionText("You got them i think", GC);
                                                            OptionLink("OK thx.", 255, GC);
                                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                            GC.SendPacket(Packets.NPCFinish());
                                                        }
                                                    }
                                                    else
                                                    {
                                                        OptionText("i think you got them already", GC);
                                                        OptionLink("Ah..Ok i see.", 255, GC);
                                                        GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                        GC.SendPacket(Packets.NPCFinish());
                                                    }
                                                }
                                                else
                                                {
                                                    OptionText("Sorry,your not a winner", GC);
                                                    OptionLink("Ah..Ok i see.", 255, GC);
                                                    GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                    GC.SendPacket(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                OptionText("Guildwar is on", GC);
                                                OptionLink("Ah..Ok i see.", 255, GC);
                                                GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                                GC.SendPacket(Packets.NPCFinish());
                                            }

                                        }
                                        else if (option == 1)
                                        {

                                            OptionText("Guildwar on,your ready to be warped?", GC);
                                            OptionLink("Yes.", 6, GC);
                                            OptionLink("No ty", 255, GC);
                                            GC.SendPacket(Packets.NPCSetFace(N.Avatar));
                                            GC.SendPacket(Packets.NPCFinish());

                                        }
                                        else if (option == 6)
                                        {

                                            Random R = new Random(); // New Random
                                            int Nr = R.Next(1, 10); // "Randomally" Picks a number 1-10 
                                            if (Nr == 1) //Random Spot 1
                                            {
                                                GC.MyChar.Teleport(1038, 351, 341);
                                            }
                                            if (Nr == 2) //Random Spot 2
                                            {
                                                GC.MyChar.Teleport(1038, 335, 345);
                                            }
                                            if (Nr == 3) //Random Spot 3
                                            {
                                                GC.MyChar.Teleport(1038, 309, 369);
                                            }
                                            if (Nr == 4) //Random Spot 4
                                            {
                                                GC.MyChar.Teleport(1038, 283, 340);
                                            }
                                            if (Nr == 5) //Random Spot 5
                                            {
                                                GC.MyChar.Teleport(1038, 310, 327);
                                            }
                                            if (Nr == 6) //Random Spot 6
                                            {
                                                GC.MyChar.Teleport(1038, 318, 297);
                                            }
                                            if (Nr == 7) //Random Spot 7
                                            {
                                                GC.MyChar.Teleport(1038, 347, 309);
                                            }
                                            if (Nr == 8) //Random Spot 8
                                            {
                                                GC.MyChar.Teleport(1038, 337, 320);
                                            }
                                            if (Nr == 9) //Random Spot 9
                                            {
                                                GC.MyChar.Teleport(1038, 309, 293);
                                            }
                                            if (Nr == 10) //Random Spot 10
                                            {
                                                GC.MyChar.Teleport(1038, 371, 300);
                                            }

                                        }
                                    }

                                    break;
                                }
                            #endregion

when i win the war this npc give me prize as possible as i can

i need this fixed plz
elsayed963 is offline  
Old 04/08/2011, 14:12   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 11
Received Thanks: 0
can anyone answer me plz , i see all read and out so i have no help untill now
elsayed963 is offline  
Old 04/08/2011, 14:21   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
The blowfish is generally an issue with 32 bit os vs 64 bit iirc. Search for korvac's guide to force your project to 32 bit mode.

As for the npc it's not very well coded but I don't see any large issues with it. What's going wrong with it?
pro4never is offline  
Old 04/09/2011, 00:20   #4
 
elite*gold: 0
Join Date: Mar 2009
Posts: 11
Received Thanks: 0
first i should thnx you for your answer , ty

i will see korvac's guide

my npc should give guild war winner cps just one time but this give winner cps every time winner talk to it so npc can give me my cps 10000000000000 times untill war start agian
elsayed963 is offline  
Reply


Similar Threads Similar Threads
[Hilfe]Ungelöstes Server Erstell Problem, ausführliche Problem Schilderung
09/15/2011 - Flyff Private Server - 8 Replies
Hey Com! Ich hoffe, dass dieser Thread nicht als Spamthread angesehen wird, da ich ja gestern schon einen zu diesem Thema eröffnet habe. Sorry wenn ich euch mit dem Thema nerve, aber ich sitze nun schon 4 Tage über dem Problem, und finde einfach keine Lösung. Nun werde ich hier allerdings eine ausführlichere Beschreibung des Problems geben. Mein Problem ist, dass ich den Windows Mssql Server 2008/2005 aus Sedrika's TuT nicht installieren kann, da sobald ich ihn immer installiere...
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +1. The time now is 19:27.


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.