Quote:
Originally Posted by Andrew.A
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:
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!