Register for your free account! | Forgot your password?

You last visited: Today at 09:58

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

Advertisement



[Help]Scatter skill

Discussion on [Help]Scatter skill within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 84
Received Thanks: 1
[Help]Scatter skill

I had read few threads ago and didn't find same of my problem now.
Scatter skill doesn't work.
Please help me I already set up my source on vps so I really need your help guys.

Code:
                                    #region Scatter
                                    case 8001:
                                        {
                                            if (CanUseSpell(spell, attacker.Owner))
                                            {
                                                PrepareSpell(spell, attacker.Owner);

                                                SpellUse suse = new SpellUse(true);
                                                suse.Attacker = attacker.UID;
                                                suse.SpellID = spell.ID;
                                                suse.SpellLevel = spell.Level;
                                                suse.X = X;
                                                suse.Y = Y;
                                                if (attacker.xx == attacker.X && attacker.yy == attacker.Y)
                                                {
                                                    attacker.scatter += 1;
                                                    if (attacker.scatter > 30)
                                                    {
                                                        attacker.Owner.Disconnect();
                                                    }
                                                }
                                                else
                                                {
                                                    attacker.xx = attacker.X;
                                                    attacker.yy = attacker.Y;
                                                    attacker.scatter = 0;
                                                }

                                                Sector sector = new Sector(attacker.X, attacker.Y, X, Y);
                                                sector.Arrange(spell.Sector, spell.Distance);
                                                foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                                {
                                                    if (_obj == null)
                                                        continue;
                                                    if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                    {
                                                        attacked = _obj as Entity;

                                                        if (sector.Inside(attacked.X, attacked.Y))
                                                        {
                                                            if (CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                            {
                                                                attack.Effect1 = Attack.AttackEffects1.None;
                                                                uint damage = Game.Attacking.Calculate.Ranged(attacker, attacked, spell, ref attack);

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

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

                                                        if (sector.Inside(attackedsob.X, attackedsob.Y))
                                                        {
                                                            if (CanAttack(attacker, attackedsob, spell))
                                                            {
                                                                attack.Effect1 = Attack.AttackEffects1.None;
                                                                uint damage = Game.Attacking.Calculate.Ranged(attacker, attackedsob, ref attack);
                                                                suse.Effect1 = attack.Effect1;
                                                                if (damage == 0)
                                                                    damage = 1;
                                                                damage = Game.Attacking.Calculate.Percent((int)damage, spell.PowerPercent);

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

                                                                suse.Targets.Add(attackedsob.UID, damage);
                                                            }
                                                        }
                                                    }
                                                }
                                                attacker.Owner.SendScreen(suse, true);
                                            }
                                            break;
                                        }
                                    #endregion
akosicamar2 is offline  
Old 02/05/2014, 20:01   #2
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
Arrow Problem

search for

and u will find in his codes
comment this codes like this

abdoumatrix is offline  
Old 02/05/2014, 20:35   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 84
Received Thanks: 1
so you mean I will replace the
Code:
if (CanUseSpell(spell, attacker.Owner))
                                            {
                                                PrepareSpell(spell, attacker.Owner);

                                                SpellUse suse = new SpellUse(true);
                                                suse.Attacker = attacker.UID;
                                                suse.SpellID = spell.ID;
                                                suse.SpellLevel = spell.Level;
                                                suse.X = X;
                                                suse.Y = Y;
to
Code:
/* if (spell.UseArrows > 0 && isArcherSkill(spell.ID))
{
var weapons = client.Weapons;
if (weapons.Item2 != null)
if (!client.Entity.ContainsFlag3(Update.Flags3.Assass in))
if (!PacketHandler.IsArrow(weapons.Item2.ID))
return false;

return true;
}*/
akosicamar2 is offline  
Old 02/05/2014, 20:52   #4
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
Quote:
Originally Posted by abdoumatrix View Post
Arrow Problem

search for

and u will find in his codes
comment this codes like this


Edited
abdoumatrix is offline  
Old 02/05/2014, 21:04   #5
 
elite*gold: 0
Join Date: Nov 2011
Posts: 84
Received Thanks: 1
here bro.
Code:
public static bool CanUseSpell(Database.SpellInformation spell, Client.GameState client)
        {
            if (client.WatchingGroup != null)
                return false;
            if (spell == null)
                return false;
            if (client.Entity.Mana < spell.UseMana)
                return false;
            if (client.Entity.Stamina < spell.UseStamina)
                return false;
            if (!client.AlternateEquipment)
            {
                if (spell.UseArrows > 0 && isArcherSkill(spell.ID))
                {
                    if (!client.Equipment.Free((byte)ConquerItem.LeftWeapon))
                    {
                        Interfaces.IConquerItem arrow = client.Equipment.TryGetItem(ConquerItem.LeftWeapon);
                        if (arrow.Durability <= spell.UseArrows)
                        {
                            return false;
                        }
                        return arrow.Durability >= spell.UseArrows;
                    }
                    return false;
                }
            }
            else
            {
                if (spell.UseArrows > 0 && isArcherSkill(spell.ID))
                {
                    if (!client.Equipment.Free((byte)ConquerItem.AltLeftHand))
                    {
                        Interfaces.IConquerItem arrow = client.Equipment.TryGetItem(ConquerItem.AltLeftHand);
                        if (arrow.Durability <= spell.UseArrows)
                        {
                            return false;
                        }
                        return arrow.Durability >= spell.UseArrows;
                    }
                    return false;
                }
            }
            if (spell.NeedXP == 1 && !client.Entity.ContainsFlag(Update.Flags.XPList) && !ServerBase.Constants.AllowSkillsonXp.Contains(spell.ID))
                return false;
            return true;
akosicamar2 is offline  
Old 02/05/2014, 21:21   #6
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238

remove this
abdoumatrix is offline  
Old 02/05/2014, 21:49   #7
 
elite*gold: 0
Join Date: Nov 2011
Posts: 84
Received Thanks: 1
It works!

Now I know ! Thank you bro. <3
akosicamar2 is offline  
Reply


Similar Threads Similar Threads
Scatter
03/10/2013 - CO2 Private Server - 1 Replies
Hello pvpers Can someone englighten me here about the scatter issue. When i scatter on huge spawn i get dced.. Heres the code: case 8001: { if (CanUseSpell(spell, attacker.Owner)) {
12 talis source archer Scatter skill speed
05/31/2011 - CO2 Private Server - 7 Replies
I found Scatter bug in source its attack speed to fast how control it? i cant find way..... Still cant find Wat wrong in attack speed..... :(
scatter bug
01/09/2011 - CO2 Private Server - 9 Replies
im using 5165 NewestCoServer source. i fixed the damage bug with regualar archer attacks, but ive been trying to fix the damage bug when they use scatter. at the moment i hit 210kk from people when i scatter. ive tried differrent things to fix this bug now idk what to do. any ideas?
TG Scatter & Bow LVL
06/02/2008 - CO2 Bots & Macros - 24 Replies
Hello Every1. I think this is my 1 post on this acc ;) and my 1 home made macro :) I dunno if any1 already made a macro for TG scatter+bow lvler, but here is mine hope it will be usefull. U will need: 1. MacroScheduler (google it :D) 2. To have CO 1024- 768 FULL Screen 3. Use PEACE mode in tg 4. Download the Macro (its rar. u will also have the EXE for the macro in it) 5. Have Fun



All times are GMT +1. The time now is 09:59.


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.