[Help]Need Info....

01/23/2009 17:59 $HaDoW#1
Hey guys !

I posted this because I need some info :(

The problem is that Archer and others dmg are to high
and I need to normalize it !
Where can I find the corect code that would set the dmg ?
because I'v searched all the Character.cs and found nothing !
I know that Others.cs is only for skills
so I need to know wheere to set the damage...

So Plz Help me :(
01/23/2009 18:14 PeTe Ninja#2
somewhere in here you can find it =]

[Only registered and activated users can see links. Click Here To Register...]
01/23/2009 19:37 $HaDoW#3
nop thats not what I'm searching for.....
Didint find anything good
01/23/2009 19:45 PeTe Ninja#4
its people like you who i hate, you dont even using CONTROL + F to look up something or even take 3 minutes to look for it , here are two links which i found in

[Only registered and activated users can see links. Click Here To Register...]

- [Only registered and activated users can see links. Click Here To Register...]

- [Only registered and activated users can see links. Click Here To Register...]

remember to thank me if i helped you, and thank them if they helped you, if you take something from others always thank them =] or give it back if its not something they posted
01/23/2009 19:57 $HaDoW#5
yes dude I did it ! I searched for dmg and damage -_-
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

these 2 only fix skill dmg I already tryed that !
Btw dont forget that I'm here for more then a year mabye 2 :P

I Know that the code is in Character.cs but I cant find it :P
01/23/2009 20:21 PeTe Ninja#6
what code?
01/23/2009 20:22 $HaDoW#7
the dmg code is in Character.cs the one that sets PvP Dmg whne you attack other player !
because now max lvl archer hits 10k to max trojan ! thats shit !!!
01/23/2009 20:24 tao4229#8
Learn2math and divide the damage to make it lower?
Not that complex.

If you're looking for the actual location, it's in Character.cs->Attack()
01/23/2009 20:35 PeTe Ninja#9
i think this is what your looking for

Quote:
if (AttackType == 0 || AttackType == 1) // Direct Attack
like i said again LOOK DEEPLY not just a quick look
01/23/2009 20:35 $HaDoW#10
did that already :( tested by removing some lines and otehr shit but still :(
Heres the code:
Code:
#region attack
        public void Attack()
        {
            LastAttack = DateTime.Now;
            if (!Alive)
            {
                MobTarget = null;
                SkillLoopingTarget = 0;
                TGTarget = null;
                PTarget = null;
                return;
            }
            Ready = false;
            try
            {
                if (AtkType == 25 || AtkType == 2)
                {
                    if (!WeaponSkill())
                    {
                        if (MobTarget != null)
                        {
                            if (MobTarget.Alive)
                                if (MobTarget.Map == LocMap)
                                    if (MyMath.PointDistance(LocX, LocY, MobTarget.PosX, MobTarget.PosY) < 6 || AtkType == 25)
                                    {
                                        if (!SMOn && !AccuracyOn)
                                        {
                                            if (!Other.ChanceSuccess(RealAgi / 2 + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(MobTarget);
                                                return;
                                            }
                                        }
                                        else if (SMOn)
                                        {
                                            if (!Other.ChanceSuccess(RealAgi + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(MobTarget);
                                                return;
                                            }
                                        }
                                        else
                                        {
                                            if (!Other.ChanceSuccess(RealAgi * 1.2 + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(MobTarget);
                                                return;
                                            }
                                        }

                                        double LDF = (Level - MobTarget.Level + 7) / 5;
                                        LDF = Math.Max(LDF, 1);
                                        double eDMG = ((Convert.ToUInt32(LDF) - 1) * .8) + 1;

                                        double AttackDMG = (double)General.Rand.Next((int)MinAtk, (int)MaxAtk) * eDMG;

                                        if (StigBuff)
                                            AttackDMG = (int)(AttackDMG * (double)(1 + ((double)(10 + StigLevel) / 100)));

                                        AttackDMG = ((double)AttackDMG * AddAtkPc);

                                        if (SMOn)
                                            AttackDMG *= 10;

                                        double ProfExpAdd = 0;

                                        double ExpQuality = 0;

                                        if (MobTarget.Level + 4 < Level)
                                            ExpQuality = 0.1;
                                        if (MobTarget.Level + 4 >= Level)
                                            ExpQuality = 1;
                                        if (MobTarget.Level >= Level)
                                            ExpQuality = 1.1;
                                        if (MobTarget.Level - 4 > Level)
                                            ExpQuality = 1.3;

                                        double EAddExp = 0;
                                        ulong UAddExp = 0;
                                        uint MobCurHP = MobTarget.CurHP;

                                        if (MobTarget.MType == 1)
                                            AttackDMG /= 100;

                                        if (MobTarget.MType == 1)
                                        {
                                            BlueName = true;
                                            GotBlueName = DateTime.Now;
                                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                                            World.UpdateSpawn(this);
                                        }
                                        if (!Praying && !CastingPray == true && Other.ChanceSuccess(9.7) && Stamina < 100)
                                        {
                                            Stamina = 100;
                                            MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina));
                                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "System", Name, "You got lucky and got your stamina refilled!", 2005));
                                            MyClient.SendPacket(General.MyPackets.String(UID, 10, "LuckyGuy"));
                                        }
                                        if (!Praying && !CastingPray == true && Other.ChanceSuccess(6.7))
                                        {
                                            XpCircle = 100;
                                            XpList = true;
                                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                                            XpCircle = 0;
                                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "System", Name, "You got lucky and your XP skill activated!", 2005));
                                            MyClient.SendPacket(General.MyPackets.String(UID, 10, "LuckyGuy"));
                                        }


                                        if (!Praying && !CastingPray == true && Other.ChanceSuccess(6.9))
                                        {
                                            AttackDMG *= 2;
                                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "System", Name, "You got lucky and attacked double damage!", 2005));
                                            MyClient.SendPacket(General.MyPackets.String(UID, 10, "LuckyGuy"));
                                        }
                                        if (MobTarget.GetDamage((uint)AttackDMG))
                                        {
                                            if (MobTarget.Name == QuestMob)
                                            {
                                                QuestKO++;
                                                if (QuestKO >= 300)
                                                {
                                                    MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You have killed enough monsters for the quest. Go report to the captain.", 2005));
                                                }
                                            }
                                            Attacking = false;
                                            if (Level >= 70)
                                            {
                                                foreach (Character Member in Team)
                                                {
                                                    if (!Member.Alive)
                                                        continue;
                                                    double PlvlExp = 1;
                                                    if (MobTarget.Level - 20 <= Member.Level)
                                                        PlvlExp = 0.1;
                                                    if (Member != null)
                                                        if (Member.Level + 20 < Level)
                                                            if (Member.LocMap == LocMap)
                                                                if (MyMath.PointDistance(Member.LocX, Member.LocY, LocX, LocY) < 30)
                                                                    if (Member.AddExp((ulong)((double)(52 + (Member.Level * 30)) * PlvlExp), true))
                                                                    {
                                                                        VP += (uint)((Member.Level * 17 / 13 * 12 / 2) + Member.Level * 3);
                                                                        Member.MyTeamLeader.MyClient.SendPacket(General.MyPackets.SendMsg(Member.MyClient.MessageId, "SYSTEM", Member.Name, Name + " has gained " + ((Member.Level * 17 / 13 * 12 / 2) + Member.Level * 3) + " virtue points.", 2003));
                                                                        foreach (Character Member2 in Team)
                                                                        {
                                                                            if (Member2 != null)
                                                                                Member2.MyClient.SendPacket(General.MyPackets.SendMsg(Member2.MyClient.MessageId, "SYSTEM", Member2.Name, Name + " has gained " + ((Member.Level * 17 / 13 * 12 / 2) + Member.Level * 3) + " virtue points.", 2003));
                                                                        }
                                                                    }
                                                }
                                            }
                                            XpCircle++;
                                            if (CycloneOn || SMOn)
                                                ExtraXP += 820;
                                            TargetUID = 0;
                                            EAddExp = MobCurHP * ExpQuality;
                                            UAddExp = Convert.ToUInt64(EAddExp);
                                            AddExp(UAddExp, true);
                                            ProfExpAdd = MobCurHP;
                                            MobTarget.Death = DateTime.Now;

                                            if (Equips[4] != null && Equips[4] != "0")
                                            {
                                                string[] Splitter2 = Equips[4].Split('-');
                                                if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                    AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                            }
                                            if (Equips[5] != null && Equips[5] != "0")
                                            {
                                                string[] Splitter2 = Equips[5].Split('-');
                                                if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                    AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                            }

                                            World.AttackMob(this, MobTarget, AtkType, (uint)AttackDMG);
                                            World.AttackMob(this, MobTarget, 14, 0);

                                            World.MobDissappear(MobTarget);
                                            MobTarget.Death = DateTime.Now;

                                            MobTarget = null;
                                        }
                                        else
                                        {
                                            EAddExp = AttackDMG * ExpQuality;
                                            UAddExp = Convert.ToUInt64(EAddExp);
                                            AddExp(UAddExp, true);

                                            ProfExpAdd = AttackDMG;

                                            if (Equips[4] != null && Equips[4] != "0")
                                            {
                                                string[] Splitter2 = Equips[4].Split('-');
                                                if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                    AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                            }
                                            if (Equips[5] != null && Equips[5] != "0")
                                            {
                                                string[] Splitter2 = Equips[5].Split('-');
                                                if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                    AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                            }

                                            World.AttackMob(this, MobTarget, AtkType, (uint)AttackDMG);

                                        }
                                    }
                                    else
                                    {
                                        MobTarget = null;
                                    }
                        }
                        else if (PTarget != null && (PKMode == 2 || PKMode == 0) && !Other.NoPK(LocMap) && PTarget.Alive)
                        {
                            if (PTarget.Alive)
                                if (LocMap == PTarget.LocMap)
                                    if (AtkType == 2 && MyMath.PointDistance(LocX, LocY, PTarget.LocX, PTarget.LocY) < 5 || AtkType == 25 && MyMath.PointDistance(LocX, LocY, PTarget.LocX, PTarget.LocY) < 16)
                                    {
                                        int Damage = General.Rand.Next((int)MinAtk, (int)MaxAtk);

                                        if (!SMOn && !AccuracyOn)
                                        {
                                            if (!Other.ChanceSuccess(RealAgi / 1.7 + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(PTarget);
                                                return;
                                            }
                                        }
                                        else if (SMOn)
                                        {
                                            if (!Other.ChanceSuccess(RealAgi + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(PTarget);
                                                return;
                                            }
                                        }
                                        else
                                        {
                                            if (!Other.ChanceSuccess(RealAgi * 1.2 + Math.Abs((110 - Level) / 2)))
                                            {
                                                MissAttack(PTarget);
                                                return;
                                            }
                                        }
                                        double reborn = 1;

                                        int Atk = General.Rand.Next((int)MyClient.MyChar.MinAtk, (int)MyClient.MyChar.MaxAtk);

                                        Atk = (int)((double)Atk * MyClient.MyChar.AddAtkPc);

                                        if (SMOn)
                                            Atk *= 2;
                                        if (StigBuff)
                                            Atk = (int)(Atk * (double)(1 + ((double)(10 + MyClient.MyChar.StigLevel) / 100)));

                                        if (PTarget.RBCount == 1)
                                            reborn = 0.7;
                                        else if (PTarget.RBCount == 2)
                                            reborn = 0.4;
                                        double Dodge = (double)(PTarget.Dodge / 100);
                                        if (Dodge == 0)
                                            Dodge = 1;
                                        Damage = (int)(((Atk - PTarget.Defense) * reborn) * Dodge);

                                        if (Damage < 1)
                                            Damage = 1;

                                        if (PTarget.PKPoints < 100)
                                            if (!PTarget.BlueName)
                                                if (!Other.CanPK(LocMap))
                                                    if (LocMap != 1005 && LocMap != 6000 && LocMap != 1038)
                                                    {
                                                        PKPoints += 0;
                                                        GotBlueName = DateTime.Now;
                                                        BlueName = false;
                                                        MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                                                        World.UpdateSpawn(this);
                                                    }

                                        World.PVP(this, PTarget, AtkType, (uint)Damage);

                                        if (PTarget.GetHitDie((uint)Damage))
                                        {
                                            Attacking = false;
                                            if (!Other.CanPK(LocMap))
                                                if (!PTarget.BlueName)
                                                    if (PTarget.PKPoints < 100)
                                                    {
                                                        GotBlueName = DateTime.Now;
                                                        BlueName = false;
                                                        PKPoints += 0;
                                                        MyClient.SendPacket(General.MyPackets.Vital(UID, 6, PKPoints));
                                                        if ((PKPoints > 29 && PKPoints - 10 < 30) || (PKPoints > 99 && PKPoints - 10 < 100))
                                                        {
                                                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                                                            World.UpdateSpawn(this);
                                                        }
                                                    }
                                            World.PVP(this, PTarget, 14, 0);
                                            PTarget.PTarget = null;
                                            PTarget.MobTarget = null;
                                            PTarget = null;
                                        }
                                    }
                                    else
                                        PTarget = null;
                        }
                        else if (TGTarget != null)
                            if (Level >= TGTarget.Level)
                            {
                                {
                                    if (!SMOn && !AccuracyOn)
                                    {
                                        if (!Other.ChanceSuccess(RealAgi / 1.7 + Math.Abs((110 - Level) / 2)))
                                        {
                                            MissAttack(TGTarget);
                                            return;
                                        }
                                    }
                                    else if (SMOn)
                                    {
                                        if (!Other.ChanceSuccess(RealAgi + Math.Abs((110 - Level) / 2)))
                                        {
                                            MissAttack(TGTarget);
                                            return;
                                        }
                                    }
                                    else
                                    {
                                        if (!Other.ChanceSuccess(RealAgi * 1.2 + Math.Abs((110 - Level) / 2)))
                                        {
                                            MissAttack(TGTarget);
                                            return;
                                        }
                                    }

                                    uint Damage = (uint)General.Rand.Next((int)MinAtk, (int)MaxAtk);
                                    uint THP = TGTarget.CurHP;
                                    Damage = (uint)((double)Damage * AddAtkPc);
                                    if (StigBuff)
                                        Damage = (uint)(Damage * (double)(1 + ((double)(10 + StigLevel) / 100)));

                                    double ExpQuality = 1;

                                    if (TGTarget.Level + 5 < Level)
                                        ExpQuality = 0.1;

                                    if (TGTarget.GetDamageDie((uint)Damage, this))
                                    {
                                        AddExp((ulong)(THP / 10 * ExpQuality), true);
                                        uint ProfExpAdd = THP / 10;
                                        if (Equips[4] != null && Equips[4] != "0")
                                        {
                                            string[] Splitter2 = Equips[4].Split('-');
                                            if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                        }
                                        if (Equips[5] != null && Equips[5] != "0")
                                        {
                                            string[] Splitter2 = Equips[5].Split('-');
                                            if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                        };

                                        World.PlAttacksTG(TGTarget, this, (byte)AtkType, (uint)Damage);
                                        World.PlAttacksTG(TGTarget, this, 14, (uint)Damage);

                                    }
                                    else
                                    {
                                        AddExp((ulong)(Damage / 10 * ExpQuality), true);
                                        uint ProfExpAdd = Damage / 10;

                                        if (Equips[4] != null && Equips[4] != "0")
                                        {
                                            string[] Splitter2 = Equips[4].Split('-');
                                            if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                        }
                                        if (Equips[5] != null && Equips[5] != "0")
                                        {
                                            string[] Splitter2 = Equips[5].Split('-');
                                            if (Other.ItemType(uint.Parse(Splitter2[0])) == 4 || Other.ItemType(uint.Parse(Splitter2[0])) == 5)
                                                AddProfExp((short)Other.WeaponType(uint.Parse(Splitter2[0])), (uint)(ProfExpAdd * AddProfPc));
                                        };

                                        World.PlAttacksTG(TGTarget, this, (byte)AtkType, (uint)Damage);


                                    }
                                }
                            }
                            else
                                MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You can't attack this, you are not high level enough. Find a lower level one.", 2000));

                        Ready = true;
                    }
                }
                else if (AtkType == 21)
                {
                    if (SkillLooping != 0)
                    {
                        if (SkillLoopingTarget != 0)
                        {
                            if (SkillLoopingTarget > 400000 && SkillLoopingTarget < 500000)
                            {
                                SingleMob Targ = (SingleMob)Mobs.AllMobs[SkillLoopingTarget];
                                if (Targ == null || !Targ.Alive)
                                    return;
                                else
                                    UseSkill(SkillLooping, (ushort)Targ.PosX, (ushort)Targ.PosY, SkillLoopingTarget);

                            }
                            else if (SkillLoopingTarget < 7000 && SkillLoopingTarget >= 5000)
                            {
                                SingleNPC Targ = (SingleNPC)NPCs.AllNPCs[SkillLoopingTarget];
                                if (Targ == null)
                                    return;
                                else
                                    UseSkill(SkillLooping, (ushort)Targ.X, (ushort)Targ.Y, SkillLoopingTarget);

                            }
                            else
                            {
                                Character Targ = (Character)World.AllChars[SkillLoopingTarget];
                                if (Targ == null || !Targ.Alive)
                                    return;
                                else
                                    UseSkill(SkillLooping, Targ.LocX, Targ.LocY, SkillLoopingTarget);
                            }
                        }
                        else
                        {
                            UseSkill(SkillLooping, SkillLoopingX, SkillLoopingY, 0);
                        }
                    }
                    else
                    {
                        SkillLooping = 0;
                    }
                }
                Ready = true;

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
        #endregion
01/24/2009 06:20 HellCo#11
Quote:
Originally Posted by PeTe Ninja View Post
somewhere in here you can find it =]

[Only registered and activated users can see links. Click Here To Register...]
by telling every1 that url, is not gunna solve anything peter.
01/24/2009 11:37 PeTe Ninja#12
there is about 10 guides on how to create a server and about 5 source LInks which take to more sources on it. i think it will help if they know how to look, so stop flaming for people who help <<

#request ban for Hell Co ( post counts ? )
01/24/2009 22:44 $HaDoW#13
so anyone can help me ?
01/24/2009 23:03 kinshi88#14
Learn some Math.
01/25/2009 00:43 damianpesta#15
else if (PTarget.Dodge >= 1)
{
Random rand = new Random();
uint Atk = (uint)rand.Next((int)MinAtk, (int)MaxAtk);
Damage = (int)(((1 - (PTarget.Dodge / 700)) * Atk) * 0.04);
}

I think that this one is not bad , I wasted 20 mins doing it. Now all you gotta do is Find out where to Copy + paste it.Its Really Close To Qonquer's One.I asked friend To attack hes own warr... So I know how much damage it should do.You can still Make it better...

Credits to Tao .. he posted the calculations somewhere else , I just Got em to work right :P