Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #31  
Old 06-19-2017, 04:18 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

You have an extra curly in the code above.

Code:
sub AutoTrain {
    if ($ulevel <= 70) {
		$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 .. 74 ) {
			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 );
	}
}
For it to apply to only level 2-70.

May as well just put it in the sub EVENT_LEVEL_UP like so:

Code:
sub EVENT_LEVEL_UP {
    if ($ulevel <= 70) {
		$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 .. 74 ) {
			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 );
	}
}
Unless you intend to make it it's own subroutine of course.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:25 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3