Im having trouble getting this to work. We had it working fine before but we just recently migrated our server from a windows 7 baed machine to a Linux machine running debian8. Below is a copy of the perl script we are using, that worked fine before we migrated.
Code:
sub AutoTrain {
$client->Message( 15, "Your experiences across the realm have infused you with increased power and knowledge..." );
# set all available skills to maximum for race/class at current level
foreach my $skill ( 0 .. 42 ) {
next unless $client->CanHaveSkill($skill);
my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
next unless $maxSkill > $client->GetRawSkill($skill);
$client->SetSkill( $skill, $maxSkill );
}
foreach my $skill ( 48 .. 55 ) {
next unless $client->CanHaveSkill($skill);
my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
next unless $maxSkill > $client->GetRawSkill($skill);
$client->SetSkill( $skill, $maxSkill );
}
foreach my $skill ( 66 .. 73 ) {
next unless $client->CanHaveSkill($skill);
my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
next unless $maxSkill > $client->GetRawSkill($skill);
$client->SetSkill( $skill, $maxSkill );
}
# scribe all spells for current level
quest::scribespells( $ulevel, $ulevel - 1 );
# train all discs for current level
quest::traindiscs( $ulevel, $ulevel - 1 );
}