Register for your free account! | Forgot your password?

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

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

Advertisement



Help Me For Replace Skill !!

Discussion on Help Me For Replace Skill !! within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Unhappy Help Me For Replace Skill !!

can anyone help me for replace this skill from kimo source

Code:
 case 0x288d:
                    if (CanUseSpell(spell, this.attacker.Owner))
                    {
                        ushort num29;
                        ushort num30;
                        if (attacker != null)
                        {
                            num29 = attacker.X;
                            num30 = attacker.Y;
                        }
                        else
                        {
                            num29 = sob.X;
                            num30 = sob.Y;
                        }
                        if (Kernel.GetDistance(this.attacker.X, this.attacker.Y, num29, num30) <= spell.Range)
                        {
                            if (((sob == null) && attacker.ContainsFlag(0x8000000L)) || this.attacker.ContainsFlag(0x8000000L))
                            {
                                return;
                            }
                            PrepareSpell(spell, this.attacker.Owner);
                            use = new SpellUse(true)
                            {
                                Attacker = this.attacker.UID,
                                SpellID = spell.ID,
                                SpellLevel = spell.Level,
                                X = x,
                                Y = y
                            };
                            bool flag8 = false;
                            if (sob == null)
                            {
                                if (CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
                                {
                                    this.attack.Effect1 = Attack.AttackEffects1.None;
                                    power = Calculate.Melee(this.attacker, attacker, spell, ref this.attack);
                                    power = (power * 100) / 100;
                                    use.Effect1 = this.attack.Effect1;
                                    ReceiveAttack(this.attacker, attacker, this.attack, power, spell);
                                    use.Targets.Add(attacker.UID, power);
                                    flag8 = true;
                                }
                            }
                            else if (CanAttack(this.attacker, sob, spell))
                            {
                                this.attack.Effect1 = Attack.AttackEffects1.None;
                                power = (uint)(Calculate.Melee(this.attacker, sob, ref this.attack) * spell.PowerPercent);
                                ReceiveAttack(this.attacker, sob, this.attack, power, spell);
                                use.Effect1 = this.attack.Effect1;
                                use.Targets.Add(sob.UID, power);
                                flag8 = true;
                            }
                            if (flag8)
                            {
                                this.attacker.Owner.SendScreen(use, true);
                            }
                        }
                        else
                        {
                            this.attacker.AttackPacket = null;
                        }
                    }
                    goto Label_C19A;

to my source
Code:
//Radiant Palm 
                                case 10381:
                                    // case 10315:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            PrepareSpell(spell, attacker.Owner);
                                            Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X,
                                        X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
                                            SpellUse suse = new SpellUse(true);
                                            suse.Attacker = attacker.UID;
                                            suse.SpellID = SpellID;
                                            suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
                                            suse.X = X;
                                            suse.Y = Y;
                                            for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++)
                                            {
                                                //For a multi threaded application, while we go through the collection
                                                //the collection might change. We will make sure that we wont go off
                                                //the limits with a check.
                                                if (c >= attacker.Owner.Screen.Objects.Length)
                                                    break;
                                                Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c];
                                                if (_obj == null)
                                                    continue;
                                                if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                {
                                                    attacked = _obj as Entity;
                                                    if (ila.InLine(attacked.X, attacked.Y))
                                                    {
                                                        if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell);

                                                        attack.Damage = damage;
                                                        // damage = ReceiveAttack(attacker, attacked, attack, damage, spell);
                                                        ReceiveAttack( attacker, attacked, attack, damage, spell);

                                                        suse.Targets.Add(attacked.UID, damage);
                                                    }
                                                }
                                                else if (_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    attackedsob = _obj as SobNpcSpawn;

                                                    if (ila.InLine(attackedsob.X, attackedsob.Y))
                                                    {
                                                        if (!CanAttack(attacker, attackedsob, spell))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob);
                                                        damage = (uint)(damage * spell.PowerPercent);
                                                        attack.Damage = damage;

                                                        ReceiveAttack( attacker, attackedsob, attack, damage, spell);

                                                        suse.Targets.Add(attackedsob.UID, damage);
                                                    }
                                                }
                                            }

                                            attacker.Owner.SendScreen(suse, true);
                                        }
                                        attacker.AttackPacket = null;
                                        break;
                                    }
cuz when i try i got alot of Error
magnon is offline  
Old 02/05/2013, 13:26   #2
 
elite*gold: 0
Join Date: Feb 2013
Posts: 1
Received Thanks: 0
Nc
benjaminblas is offline  
Old 02/05/2013, 15:00   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
no can help me for that it's bad thing for me can anyone help me
magnon is offline  
Old 02/05/2013, 18:03   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
You cannot expect to just copy and paste entire sections of code and have them work.


Every single method is going to be different when you switch between sources and as such you'll have to change all of them to what exists already in your source or transfer over methods as needed to make the new code work.


FAR better off just reading through your own source to understand how it works, then looking at a working example in other sources to give you an idea of how to re-code the feature yourself using what's provided already in your source.


This is kinda like saying "I copy/pasted my chemistry textbook into my biology final exam... why did my teacher fail me?". They both might be conquer sources but that doesn't mean they contain similar information or formatting.
pro4never is offline  
Reply


Similar Threads Similar Threads
[C#] How Can I replace it .
12/09/2012 - .NET Languages - 6 Replies
Fixed .
Working Replace SKill + Map Hack and Help at Item Slot
08/21/2011 - General Gaming Discussion - 19 Replies
Replace Skill (For Rogue Type) 1. Learn Dusk Slashing lvl 5 this will be gone stay with rogue don't change job yet stay first at rogue. 2. Open CE - proccess luna.exe Scan Dusk Slashing lvl 5 select all and bring
[discuss]Skill animation replace
07/20/2011 - Cabal Online - 0 Replies
About 1 year ago This video appeared at youtube I know the mechanics of skill animation replacing(same with weapon modding),but there are some points,what i really don't know. I want to ask - anybody know the list of this animations,except patren atack(replaced with collapse at this video)?
[C++]str.replace();
11/16/2010 - C/C++ - 5 Replies
-
Why cant I replace the pk2?
07/25/2009 - SRO Private Server - 2 Replies
Whenever I download babbes english sunsro pk2 and replace it, it always replaces it self to an older version and has to update back to 2.020 again, it does this with any other pk2..



All times are GMT +2. The time now is 03:55.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.