Register for your free account! | Forgot your password?

You last visited: Today at 01:30

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

Advertisement



help

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

Reply
 
Old   #1
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
help

Can Somone help me add wepskills such as rage snow and stuff.. tell me what i need to add where to add it and stuff i dont mean give me the code so i don't haft to do noting i mean guide me threw it so i can learn how and code the other weapon skills. some say for rage just copy Hercules. but i just don't see how that would work and do i code them in the same place or what.. plz help me if u can
taylor2846 is offline  
Old 07/28/2009, 04:21   #2
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
my way is pretty simple but not that good i think

step1- check the Right Hand weapon chance
step2- if the r8 hand chance returns false check the left hand chance

step3- if one of them returns true do the weapon skill , and here is my code for it ,u will need to add more weapons of course

at the Melee region (Handlers/Attack.cs) put this

Code:
#region R8 hand chances
                    byte WeaponChance = (byte)Nano.Rand.Next(255);
                    if (CSocket.Client.Equipment.ContainsKey(4))
                    {
                        
                        if (WeaponChance > 150)
                        {
                            switch (RightHand.ID)
                            {
                                
                                case 480://Club
                                    {
                                        if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Rage))
                                        {
                                            WeaponEffect = "RHFound";
                                            NoTargetMagic(CSocket, (int)Struct.SkillIds.Rage, CSocket.Client.X, CSocket.Client.Y);
                                        }
                                        break;
                                    }
                                case 510://Glaive 2Hand
                                    {
                                        if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.WideStrike))
                                        {
                                            WeaponEffect = "RHFound";
                                            NoTargetMagic(CSocket, (int)Struct.SkillIds.WideStrike, X, Y);
                                        }
                                        break;
                                    }
                                case 561://Wand 2Hand
                                    {
                                        if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Snow))
                                        {
                                            WeaponEffect = "RHFound";
                                            NoTargetMagic(CSocket, (int)Struct.SkillIds.Snow, CSocket.Client.X, CSocket.Client.Y);
                                        }
                                        break;
                                    }
                                case 560://Spear 2Hand
                                    {
                                        if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.SpeedGun))
                                        {
                                            WeaponEffect = "RHFound";
                                            NoTargetMagic(CSocket, (int)Struct.SkillIds.SpeedGun, X, Y);
                                        }
                                        break;
                                    }
                                case 530://Poleaxe 2Hand
                                    {
                                        if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Boreas))
                                        {
                                            WeaponEffect = "RHFound";
                                            NoTargetMagic(CSocket, (int)Struct.SkillIds.Boreas, X, Y);
                                        }
                                        break;
                                    }
                            }
                        }
                    }
                    #endregion
                    #region Left hand chances
                    if (CSocket.Client.Equipment.ContainsKey(5))
                    {
                        if (WeaponEffect == "")
                        {
                            WeaponChance = (byte)Nano.Rand.Next(255);
                            if (WeaponChance > 180)
                            {
                                switch (LeftHand.ID)
                                {
                                
                                    case 480://Club
                                        {
                                            if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Rage))
                                            {
                                                NoTargetMagic(CSocket, (int)Struct.SkillIds.Rage, CSocket.Client.X, CSocket.Client.Y);
                                            }
                                            break;
                                        }
                                    case 510://Glaive 2Hand
                                        {
                                            if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.WideStrike))
                                            {
                                                NoTargetMagic(CSocket, (int)Struct.SkillIds.WideStrike, X, Y);
                                            }
                                            break;
                                        }
                                    case 561://Wand 2Hand
                                        {
                                            if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Snow))
                                            {
                                                NoTargetMagic(CSocket, (int)Struct.SkillIds.Snow, CSocket.Client.X, CSocket.Client.Y);
                                            }
                                            break;
                                        }
                                    case 560://Spear 2Hand
                                        {
                                            if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.SpeedGun))
                                            {
                                                NoTargetMagic(CSocket, (int)Struct.SkillIds.SpeedGun, X, Y);
                                            }
                                            break;
                                        }
                                    case 530://Poleaxe 2Hand
                                        {
                                            if (Attacker.Skills.ContainsKey((int)Struct.SkillIds.Boreas))
                                            {
                                                NoTargetMagic(CSocket, (int)Struct.SkillIds.Boreas, X, Y);
                                            }
                                            break;
                                        }
                                }
                            }
                        }
                    }
                    #endregion
u will need to copy/paste this 2wice , once at the player attacking player and once again at player attacking mob if u can't know where exactly to put them , let me know

then u will need to add a case for every skill at NoTargetMagic Void ,it is in the same file .
under the Herc case add your other weapons skills let's say u want Rage for example

Code:
#region Rage
                    case 7020:
                        {
                            int Distance = 2;
                            Dictionary<int, Monster> ToDo = new Dictionary<int, Monster>();
                            Dictionary<int, int> Targets = new Dictionary<int, int>();
                            try
                            {
                                Monitor.Enter(Nano.Monsters);
                                foreach (KeyValuePair<int, Monster> Mob in Nano.Monsters)
                                {
                                    if ((int)CSocket.Client.Map == Mob.Value.Map)
                                    {
                                        if (Calculation.InRange(Mob.Value.X, Mob.Value.Y, CSocket.Client.X, CSocket.Client.Y, Distance))
                                        {
                                            if (Mob.Value.Info.Name == "Guard" || Mob.Value.Info.Name == "Patrol" || Mob.Value.Info.Name == "GuardReviver")
                                            {
                                                if (CSocket.Client.PKMode == Struct.PkType.PK)
                                                {
                                                    if (!ToDo.ContainsKey(Mob.Value.UID))
                                                        ToDo.Add(Mob.Key, Mob.Value);
                                                }
                                            }
                                            else
                                            {
                                                if (!ToDo.ContainsKey(Mob.Value.UID))
                                                    ToDo.Add(Mob.Key, Mob.Value);
                                            }
                                        }
                                    }
                                }
                                //}
                            }
                            catch (Exception e)
                            {
                                Console.WriteLine(e.ToString());
                            }
                            finally
                            {
                                Monitor.Exit(Nano.Monsters);
                            }
                            try
                            {
                                Monitor.Enter(Nano.ClientPool);
                                foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
                                {
                                    ClientSocket ASocket = Clients.Value;
                                    if ((int)CSocket.Client.Map == (int)ASocket.Client.Map && CSocket.Client.ID != ASocket.Client.ID)
                                    {
                                        if (Calculation.InRange(ASocket.Client.X, ASocket.Client.Y, CSocket.Client.X, CSocket.Client.Y, Distance) && !ASocket.Client.Dead)
                                        {
                                            if (CheckMode(CSocket, ASocket))
                                            {
                                                int Damage = Calculation.Damage(CSocket.Client, ASocket.Client, 2, 0, 0);
                                                Damage = (Damage / 3);
                                                Calculation.doPlayer(CSocket, ASocket, Damage, 21);
                                                if (!Targets.ContainsKey(ASocket.Client.ID))
                                                {
                                                    Targets.Add(ASocket.Client.ID, Damage);
                                                    Calculation.SkillExp(Skill.ID, CSocket, (int)(Damage / 15));
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            catch (Exception e)
                            {
                                Console.WriteLine(e.ToString());
                            }
                            finally
                            {
                                Monitor.Exit(Nano.ClientPool);
                            }
                            foreach (KeyValuePair<int, Struct.TerrainNPC> TNPCS in Nano.TerrainNpcs)
                            {
                                Struct.TerrainNPC Tnpc = TNPCS.Value;
                                if ((int)CSocket.Client.Map == Tnpc.Map)
                                {
                                    if (Calculation.InRange(Tnpc.X, Tnpc.Y, CSocket.Client.X, CSocket.Client.Y, Distance))
                                    {
                                        int Damage = 0;
                                        if (CSocket.Client.MinAttack < CSocket.Client.MaxAttack)
                                        {
                                            Damage = Nano.Rand.Next(CSocket.Client.MinAttack, CSocket.Client.MaxAttack);
                                            Damage = (Damage / 3);
                                        }
                                        Calculation.doTNpc(CSocket, Tnpc, Damage, 21);
                                        if (!Targets.ContainsKey(Tnpc.UID))
                                        {
                                            Targets.Add(Tnpc.UID, Damage);
                                            Calculation.SkillExp(Skill.ID, CSocket, (int)(Damage / 25));
                                        }
                                    }
                                }
                            }
                            foreach (KeyValuePair<int, Monster> Mob in ToDo)
                            {
                                int Damage = Calculation.Damage(CSocket.Client, Mob.Value, 2, 0, 0);
                                Damage = (Damage / 3);
                                Calculation.doMonster(Mob.Value, Damage, 21, CSocket);
                                if (!Targets.ContainsKey(Mob.Value.UID))
                                {
                                    Targets.Add(Mob.Key, Damage);
                                    Calculation.SkillExp(Skill.ID, CSocket, (int)(Damage / 12));
                                }
                            }
                            ToDo.Clear();
                            ConquerPacket.ToLocal(ConquerPacket.MagicAttack(CSocket.Client.ID, Skill.ID, Skill.Level, Targets, CSocket.Client.X, CSocket.Client.Y), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
                            Targets.Clear();
                            break;
                        }

                    #endregion
hope that helped
samehvan is offline  
Thanks
2 Users
Old 07/28/2009, 04:49   #3
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
ty this helps
taylor2846 is offline  
Old 07/28/2009, 19:43   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 119
Received Thanks: 3
is it for lotf or coemu?
Arcotemple:] is offline  
Old 07/28/2009, 19:53   #5
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
Coemu
samehvan is offline  
Old 07/28/2009, 20:07   #6
 
elite*gold: 0
Join Date: Jul 2009
Posts: 119
Received Thanks: 3
oh well nvm then i coulda helped you if it was lotf
Arcotemple:] is offline  
Old 07/29/2009, 10:54   #7
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
ya lol lotf is easier to code skills i thank but thats just becaz i under stand how thay are codded there thers not much to look at for coemu xD
taylor2846 is offline  
Reply




All times are GMT +1. The time now is 01:31.


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.