View Single Post
  #1  
Old 07-31-2020, 08:27 PM
lctucker2999
Sarnak
 
Join Date: Jan 2018
Posts: 51
Question Autoscribing code is crashing zones?

*edit* seems like simply scribing spells is what's causing the crash, not the code itself. I tried to grant spells via GM command, and got the same thing.... what would cause that?

Disclaimer, I don't know any perl, and what little custom work I've managed is just from copy/pasting existing code, and changing some basic parameters to fit my needs.

I'm trying to add auto scribe spells and disc's on level up, and found plenty of threads on the topic, so I shamelessly copied the code, and removed the part that auto-maxes skills, because I don't want that. What's left is below, and in testing, every time a character levels up, it seems to crash the zone. This is at the bottom of my global.player.pl and I moved the lua file out of the folder so it wouldn't interfere.

If it matters, I am testing it on a low level bard (currently 3). I tried leveling up organically via gained xp and crashed guk. Then I tried setting the level with GM commands, and crashed PoK.

Any thoughts? Thanks in advance!

Code:
sub EVENT_LEVEL_UP {
    AutoTrain();
}

sub AutoTrain {
    $client->Message( 15, "Your experiences across the realm have infused you with increased power and knowledge..." );

    # scribe all spells for current level
    quest::scribespells( $ulevel, $ulevel - 1 );

    # train all discs for current level
    quest::traindiscs( $ulevel, $ulevel - 1 );
}
Reply With Quote