Log in

View Full Version : Problem with auto-skills on new characters


Baruuk
10-23-2011, 09:12 PM
Hi guys - I've been trying to correct this for a day or so - but I'm not a Perl programmer, so it may be something simple I'm missing. If I put the below script in a starting zone - say Qeynos or Cabilis - it works perfectly. It increases all player skills to 20 the moment they enter the game for the first time (in that zone). If I put it in the player.pl in c:\eqemu\quests\templates - it doesn't. It gives a brief message in the chat window in game about Swimming being increased to 100 (which actually doesn't happen according to the character's skill window) and doesn't increase anything else. I could simply paste the code from North Qeynos into all starting zones...but that's not the point. I want to learn what I'm doing wrong because I see the potentil in using Player.pl for other reason. Would anyone mind telling me what I'm doing wrong?

Thanks much in advance.

here's the code I have in the player.pl in qeynos2 and other zones:

sub EVENT_ENTERZONE {

if (!defined($qglobals{newchar})){
quest::setallskill(20);
quest::setglobal("newchar", 1, 5, "F");
quest::scribespells(1,1);
}
else{}
}
sub EVENT_LEVEL_UP{
quest::traindiscs($ulevel);
quest::scribespells($ulevel);
$client->Message(5,"Scribing spells and disciplines.");
}

}

Thanks again.

Jaekob
10-24-2011, 06:16 AM
player.pl in the templates folder will only work if player.pl does not already exist in the zone you are referencing. Most starting zones already have a player.pl for some ldon scripts. Stick your file in templates, but then go an check each starting city and add the script to the existing player.pl, should fix you problem.

Baruuk
10-24-2011, 10:00 AM
Excellent - thanks for your reply. That makes perfect sense and I will do what you suggest.

Thanks again for your time.