Skills

06/08/2009 20:50 Andrew.A#1
Does anybody know now to:

Fix Nado
Fix Katana + 2FB Damages
Make FB hit targets
Make skill books work FIXED Thanks scottdavey for making me learn and Emma for explain it
06/08/2009 21:02 martoon#2
What you mean with skill books? what part of and witch source you use?
06/08/2009 21:23 Andrew.A#3
CoEmuV2

I eneded up with this but i don't know what it means
Code:
                case 725025: //FastBlade
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(1045, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725026: //ScentSword
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(1046, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725027: //Rage
                    {
                        if (CSocket.Client.Level >= 10)
                        {
                            LearnSkill(7020, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725028: //Phoenix
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(5030, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725029: //Thunder
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(1000, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725030: //Fire
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(1001, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
                case 725031: //SpeedGun
                    {
                        if (CSocket.Client.Level >= 40)
                        {
                            LearnSkill(1260, 0, CSocket);
                        }
                        else
                        {
                            Delete = false;

                        }
                        break;
                    }
06/08/2009 21:46 _Emme_#4
Quote:
Originally Posted by Andrew.A View Post
case 725025: //FastBlade
{
if (CSocket.Client.Level >= 40)
{
LearnSkill(1045, 0, CSocket);
}
else
{
Delete = false;

}
break;
}
]
Okay, so..
case 725025 means the case, the ID, the thing it currently handle. As you may of figured out already, 725025 is the itemID of the skillbook. So, it will check if the current thing in 'spotlight' is that ID, if it is, it will continue the code.


if (CSocket.Client.Level >= 40)

Explains itself pretty much. If the level of the Client it handles at the moment is level 40 or above 40, it will continue the code, else it will stop.
Quote:
>= - Same value or above, alot used in stuffs other than programming aswell
> - Above the value

LearnSkill(1045, 0, CSocket);

Learns a skill, obviously. The skillID is 1045 (FastBlade ID), the level is 0 and the user is CSocket.

Quote:
else
{
Delete = false;

}
For that part, you need to be programming a while to set your brain to 'count the bracklets' . If you look over the code you will see a { and a }, under those theres a else, which respond to
if (CSocket.Client.Level >= 40)

so, if that gives a false result, the level of the user is not 40 or above, it will 'run' the else statement, which will set delete the item as false, the item will remain.



And break; means it will break the code, like stop.


Read a little more about programming, this is generally easy and you should know it before you get into programming.

Goodluck!
06/08/2009 22:08 Andrew.A#5
Thanks I figured out what my problem was, wrong case numbers.

So if I wanted to make a skill work or add an npc how would I do that?