Slinger Mob Change Attributes

07/02/2011 02:23 Sythen#1
I'm trying to make it where Slingers are higher level, more hp, higher attack and defense, and give more exp so lvl 130's can level up to 138. Anyone have idea's? I've tried changing a few things in mobinfo.txt . I'm using 5165.
07/02/2011 04:15 zTek#2
In the source should be this to look off of:
Code:
public Mob(string Line)
        {
            LastMove = DateTime.Now;
            string[] Info = Line.Split(' ');
            MobID = int.Parse(Info[0]);
            Name = Info[1];
            Type = (MobBehaveour)byte.Parse(Info[2]);
            Mesh = ushort.Parse(Info[3]);
            Level = byte.Parse(Info[4]);
            MaxHP = uint.Parse(Info[5]);
            Defense = ushort.Parse(Info[6]);
            MDef = ushort.Parse(Info[7]);
            MAttack = ushort.Parse(Info[8]);
            MinAttack = ushort.Parse(Info[9]);
            MaxAttack = ushort.Parse(Info[10]);
            DmgReduceTimes = byte.Parse(Info[11]);
            Dodge = byte.Parse(Info[12]);
            AtkType = (AttackType)byte.Parse(Info[13]);
            if (AtkType == AttackType.Magic)
            {
                MagicSkill = ushort.Parse(Info[14]);
                MagicLvl = byte.Parse(Info[15]);
                Gives = bool.Parse(Info[16]);
                AttackDist = byte.Parse(Info[17]);
                MinSilvers = int.Parse(Info[18]);
                MaxSilvers = int.Parse(Info[19]);
                MoveSpeed = ushort.Parse(Info[20]);
                SpawnSpeed = uint.Parse(Info[21]);
                LevDifDmg = bool.Parse(Info[22]);
            }
            else
            {
                Gives = bool.Parse(Info[14]);
                AttackDist = byte.Parse(Info[15]);
                MinSilvers = int.Parse(Info[16]);
                MaxSilvers = int.Parse(Info[17]);
                MoveSpeed = ushort.Parse(Info[18]);
                SpawnSpeed = uint.Parse(Info[19]);
                LevDifDmg = bool.Parse(Info[20]);
            }

            CurrentHP = MaxHP;
        }
Here is the Slinger info:
Code:
83 Slinger 1 145 [COLOR="Red"]105[/COLOR] [COLOR="Red"]30110[/COLOR] [COLOR="Red"]0[/COLOR] 86 0 [COLOR="Red"]1234 1353[/COLOR] 1 86 2 True 2 10 1000 1000 12 False
105 = Level
30110 = MaxHP
0 = Defense
1234 = MinimumAttack
1353 = MaximumAttack



As for the Experience, you could do something like this:
Code:
 else if ((MobID == 83) && ((MyMath.ChanceSuccess(100))))
                    {
                        Char.Experience + 12345667;
                    }
I dont' know about ^ that though.
Goodluck!
07/03/2011 01:33 pro4never#3
Quote:
Originally Posted by zTek View Post
In the source should be this to look off of:
Code:
public Mob(string Line)
        {
            LastMove = DateTime.Now;
            string[] Info = Line.Split(' ');
            MobID = int.Parse(Info[0]);
            Name = Info[1];
            Type = (MobBehaveour)byte.Parse(Info[2]);
            Mesh = ushort.Parse(Info[3]);
            Level = byte.Parse(Info[4]);
            MaxHP = uint.Parse(Info[5]);
            Defense = ushort.Parse(Info[6]);
            MDef = ushort.Parse(Info[7]);
            MAttack = ushort.Parse(Info[8]);
            MinAttack = ushort.Parse(Info[9]);
            MaxAttack = ushort.Parse(Info[10]);
            DmgReduceTimes = byte.Parse(Info[11]);
            Dodge = byte.Parse(Info[12]);
            AtkType = (AttackType)byte.Parse(Info[13]);
            if (AtkType == AttackType.Magic)
            {
                MagicSkill = ushort.Parse(Info[14]);
                MagicLvl = byte.Parse(Info[15]);
                Gives = bool.Parse(Info[16]);
                AttackDist = byte.Parse(Info[17]);
                MinSilvers = int.Parse(Info[18]);
                MaxSilvers = int.Parse(Info[19]);
                MoveSpeed = ushort.Parse(Info[20]);
                SpawnSpeed = uint.Parse(Info[21]);
                LevDifDmg = bool.Parse(Info[22]);
            }
            else
            {
                Gives = bool.Parse(Info[14]);
                AttackDist = byte.Parse(Info[15]);
                MinSilvers = int.Parse(Info[16]);
                MaxSilvers = int.Parse(Info[17]);
                MoveSpeed = ushort.Parse(Info[18]);
                SpawnSpeed = uint.Parse(Info[19]);
                LevDifDmg = bool.Parse(Info[20]);
            }

            CurrentHP = MaxHP;
        }
Here is the Slinger info:
Code:
83 Slinger 1 145 [COLOR="Red"]105[/COLOR] [COLOR="Red"]30110[/COLOR] [COLOR="Red"]0[/COLOR] 86 0 [COLOR="Red"]1234 1353[/COLOR] 1 86 2 True 2 10 1000 1000 12 False
105 = Level
30110 = MaxHP
0 = Defense
1234 = MinimumAttack
1353 = MaximumAttack



As for the Experience, you could do something like this:
Code:
 else if ((MobID == 83) && ((MyMath.ChanceSuccess(100))))
                    {
                        Char.Experience + 12345667;
                    }
I dont' know about ^ that though.
Goodluck!
.... There's no point doing a Experience += stated amount... just have it calculate as normal and boost their health and stats.

What you're showing there does not take into account

-How much damage the user is dealing
-How much health the monster has


Depending on where the code is placed it would also only give exp based on KILLING vs damaging.

Either way it's a poor way of doing things.


As for the op, Make sure you edit these lines in the server settings and also use a decryptor to edit the monster.dat in the client.

The simplest way would be to go ahead and add a NEW mob duplicating all the original slinger stats and make it say...

IronSlingerL135 or w/e
07/03/2011 07:36 zTek#4
Thanks Chris.

@OP
Make sure you don't go over the maximum value. You can see each each data type in the first code I gave you.

Example:
Type = (MobBehaveour)byte.Parse(Info[2]);
Mesh = ushort.Parse(Info[3]);
Level = byte.Parse(Info[4]);
MaxHP = uint.Parse(Info[5]);


Type can't go over 255.
Mesh can't go over 65535.
And so on.