Register for your free account! | Forgot your password?

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

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

Advertisement



Guards kill me when attacking ninja's shadow clones in jiang hu mode?

Discussion on Guards kill me when attacking ninja's shadow clones in jiang hu mode? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2015
Posts: 4
Received Thanks: 2
Guards kill me when attacking ninja's shadow clones in jiang hu mode?

- Please, no trolls. I'm completely aware that the source I'm using is trash, however it's only for my friends and I to play around on -

So as the title says, if a player in jiang hu mode attacks a ninjas shadow clones, the guards will kill them. Due to my inexperience in c#, I'm not really sure how to fix this (I have been at this for honestly about 4 hours and unfortunately no luck).

I'll post the codes below that I've found, maybe someone could help me fix this problem with the codes I provide.

Code:
case 12090:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            PrepareSpell(spell, attacker.Owner);
                                            SpellUse spellUse = new SpellUse(true);
                                            spellUse.Attacker = attacker.Owner.Entity.UID;
                                            spellUse.SpellID = spell.ID;
                                            spellUse.SpellLevel = spell.Level;
                                            spellUse.X = attacker.Owner.Entity.X;
                                            spellUse.Y = attacker.Owner.Entity.Y;
                                            attacker.Owner.SendScreen(spellUse, true);

                                            if (attacker.MyClones.Count > 0)
                                            {
                                                foreach (var item in attacker.MyClones.Values)
                                                {
                                                    Data data = new Data(true);
                                                    data.UID = item.UID;
                                                    data.ID = Network.GamePackets.Data.RemoveEntity;
                                                    attacker.Owner.SendScreen(data);
                                                    attacker.Owner.RemoveScreenSpawn(item, false);
                                                    attacker.Owner.Map.RemoveEntity(item);
                                                    attacker.Owner.Send(data);
                                                    attacker.Owner.SendScreen(data);
                                                    attacker.Owner.RemoveScreenSpawn(item, false);
                                                }
                                                attacker.MyClones.Clear();
                                                break;
                                            }

                                            attacker.AddClone("" + attacker.Name + "", 3);
                                            attacker.AddClone("" + attacker.Name + "", 10003);
                                        }
                                        break;
                                    }
Code:
case 2812:
                    {
                        var attackedUID = BitConverter.ToUInt32(packet, 4);
                        var type = packet[8];
                        var attackerUID = BitConverter.ToUInt32(packet, 9);
                        var attackerUID2 = BitConverter.ToUInt32(packet, 13);
                        uint[] attackers = new uint[] { attackerUID, attackerUID2 };
                        foreach (var attacker in attackers)
                        {
                            {
                                Entity Clone = null;
                                if (client.Entity.MyClones.TryGetValue(attacker, out Clone))
                                {
                                    Entity attacked = null;
                                    SobNpcSpawn attackedsob = null;
                                    if (client.Screen.TryGetValue(attackedUID, out attacked))
                                    {
                                        var attack = new Attack(true);
                                        attack.Attacked = attackedUID;
                                        attack.Attacker = attacker;
                                        attack.AttackType = type;
                                        attack.X = attacked.X;
                                        attack.Y = attacked.Y;
                                        if (Time64.Now > client.Entity.MyClones[attacker].AttackStamp.AddMilliseconds(1500))
                                        {
                                            if (Game.Attacking.Handle.CanAttack(client.Entity, attacked, null,
                                                attack.AttackType == GamePackets.Attack.Melee))
                                            {
                                                client.Entity.MyClones[attacker].AttackStamp = Time64.Now;
                                                uint damage = 0;
                                                if (attack.AttackType == GamePackets.Attack.Melee)
                                                    damage = Game.Attacking.Calculate.Melee(client.Entity, attacked, ref attack);
                                                damage = damage * 35 / 100;
                                                Game.Attacking.Handle.ReceiveAttack(Clone, attacked, attack, damage, null);
                                                attack.Damage = damage;
                                                // client.Send(attack);
                                                client.SendScreen(attack, true);
                                            }
                                        }
                                    }
                                    else
                                    {
                                        if (client.Screen.TryGetSob(attackedUID, out attackedsob))
                                        {
                                            var attack = new Attack(true);
                                            attack.Attacked = attackedUID;
                                            attack.Attacker = attacker;
                                            attack.AttackType = 2;
                                            attack.X = attackedsob.X;
                                            attack.Y = attackedsob.Y;
                                            client.Entity.MyClones[attacker].AttackPacket = attack;
                                            if (Time64.Now >
                                                client.Entity.MyClones[attacker].AttackStamp.AddMilliseconds(1500))
                                            {
                                                if (Game.Attacking.Handle.CanAttack(client.Entity, attackedsob, null))
                                                {
                                                    client.Entity.MyClones[attacker].AttackStamp = Time64.Now;
                                                    uint damage = 0;
                                                    if (attack.AttackType == GamePackets.Attack.Melee)
                                                        damage = Game.Attacking.Calculate.Melee(client.Entity, attackedsob,
                                                            ref attack);
                                                    Game.Attacking.Handle.ReceiveAttack(Clone, attackedsob, attack, damage,
                                                        null);
                                                    attack.Damage = damage;
                                                    // client.Send(attack);
                                                    client.SendScreen(attack, true);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }
Code:
if (client.Entity.MyClones.Count > 0)
                                    {
                                        foreach (var clone in client.Entity.MyClones.Values)
                                        {
                                            if (clone.AttackPacket != null)
                                            {
                                                if (Now >
                                                    client.Entity.AttackStamp.AddMilliseconds(1000 -
                                                                                              client.Entity.Agility))
                                                {
                                                    SobNpcSpawn attacked = null;

                                                    if (client.Screen.TryGetSob(clone.AttackPacket.Attacked,
                                                        out attacked))
                                                    {
                                                        var attacker = clone;
                                                        attacker.EntityFlag = EntityFlag.Player;
                                                        new Game.Attacking.Handle(clone.AttackPacket, attacker, null);
                                                    }
                                                }
                                            }
                                        }
                                    }
I'm not asking to be spoonfed, but any help would be great. Thanks!
frogsmash is offline  
Old 08/15/2015, 11:53   #2
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
I haven't seent he source, nor did I ever work on a patch past 5200;

Do you have any way to check if your target is a clone in the attack handler? If you do, simply bypass the BlueName/Flashing flag/statuseffect.
Xio. is offline  
Reply


Similar Threads Similar Threads
Guards attacking white named players
03/06/2015 - CO2 Private Server - 3 Replies
I've fixed this issue before but I can't seem to remember how. Its been a while. Any ideas on why the guards are attacking white named players, let me know! Thanks! P.S. What is the guard's skill ID? Right now they are meleeing -.-
Guards attacking dead peoples Action view?
05/22/2012 - CO2 Private Server - 0 Replies
well am just done with a revival guards and when i did the whole works but when the guard revive the dead guy he dont move his sword to the target his attack action that what i mean so am wondering if its based like that way on TQ clients? and yeah if somebody got the revive effect name would be glad too regards
Error when guards are attacking monsters...
09/05/2011 - CO2 Private Server - 7 Replies
i have a problem, when guards are attacking monsters, this error appears in my console, every time a guard attacks a monster, this error shows up on my console... i think its something wrong with the cps drop, like when guards are attacking, they earn cps or something like that, this is what i think... Any clue? thanks. http://i54.tinypic.com/34r9lzd.png
Ninja Saga Cheat Pet God Hack Mode, One Hit kill Hunting House, All Mission Is dummy
05/31/2011 - Facebook - 5 Replies
Tools : Fiddler2 - SWF File Pet God Mode Hack FileCopter | Free File Hosting - Upload Files, Earn Cash ] SWF File One Hit Kill Hunting House FileCopter | Free File Hosting - Upload Files, Earn Cash ] SWF File All Mission Is Dummy AdF.ly - shrink your URLs and get paid! ] His Way : 1. Download Database from the links above.
Guards Kill Everyone
03/04/2010 - CO2 Private Server - 13 Replies
Hey all, I'm having a problem on my server. I'm sure it will be easy to fix if you know whats wrong. I have no clue so that's why I ask =) Problem: Guards kill everyone even if they are not flashing.



All times are GMT +1. The time now is 22:20.


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