View Single Post
  #6  
Old 03-30-2019, 10:03 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

This should handle all but trading- and spec skills:

Code:
sub EVENT_LEVEL_UP {
	#:: Set available (non-trade, non-casting specialization) skills to maximum for race/class at current level
	foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
		next unless $client->CanHaveSkill($skill);
		#:: Create a scalar variable to store each skill's maximum skill level at the player's current level
		my $maxSkill = $client->MaxSkill($skill, $client->GetClass(), $ulevel);
		#:: Check that the player's skill does not already exceed the maximum skill based on level
		next unless $maxSkill > $client->GetRawSkill($skill);
		#:: Set the skill to the maximum
		$client->SetSkill($skill, $maxSkill);
	}
}
Reply With Quote