Well,..there is 2 way to do this as i know so far...
1 is Source Editing and the other is by Normal NPC Scripting...
but i dont think Normal NPC Scripting would work better than Source Editing...
For Nomal NPC Scripting...you can make use of these Scripts...
*skill <skill id>,<level>{,<flag>};
*skill "<skill name>",<level>{,<flag>};
*addtoskill <skill id>,<level>{,<flag>};
*addtoskill "<skill name>",<level>{,<flag>};
These commands will give the invoking character a specified skill. This is also
used for item scripts.
Level is obvious. Skill id is the ID number of the skill in question as per
'db/skill_db.txt'. It is not known for certain whether this can be used to give
a character a monster's skill, but you're welcome to try with the numbers given
in 'db/mob_skill_db.txt'.
Flag is 0 if the skill is given permanently (will get written with the character
data) or 1 if it is temporary (will be lost eventually, this is meant for card
item scripts usage.). The flag parameter is optional, and defaults to 1 in
'skill' and to 2 in 'addtoskill'.
Flag 2 means that the level parameter is to be interpreted as a stackable
additional bonus to the skill level. If the character did not have that skill
previously, they will now at 0+the level given.
// This will permanently give the character Stone Throw (TF_THROWSTONE,152), at
// level 1.
skill 152,1,0;
For Example :
- script Sample -1,{
OnPCLoginEvent:
if( countitem( 7539 ) ){
skill 26,2,1;
dispbottom "Level 1 Teleport Skill added.";
addtimer 10000,strnpcinfo(0)+"::OnPCLoginEvent";
}else{
skill 26,0,1;
addtimer 10000,strnpcinfo(0)+"::OnPCLoginEvent";
}end;
}
this script will give players the Teleport Skills upon they login and they have the items with them...
i added the time for checking..which will keep check for the items existance every 10 seconds.
Problems : It might caused heavy load if your server population is high....due to the time checking...