This trigger type can be used to intercept a player attempting to practice with the recipient mobile. The following variables are set:
@teacher - The mobile that owns the script.
@student - The mobile attempting to practice with the @teacher.
@mode - The mode in which the @student invoked the practice command. This will have a value of either "list" or "learn" depending on whether the student wants the list of skills taught by the teacher or whether they are actually trying to practice a skill.
@skill - The name of the skill the @student is attempting to learn (if any).
@skillId - The numerical ID of the skill the @student is attempting to learn (if any).
If the script returns a non-zero value then the attempt to practice will be considered handled by the internal engine. In other other words, no further handling will be done internally.
Example:
protect { if( %getRace( @student ) == Troll ) { talk @student I don't teach dirty trolls such as yourself!
// // The "retval" statement returns a value but does NOT exit // the script. // retval 1
wait 3 secs kill @student } endif } endprotect |