Help with player.pl
I am having a huge issue with player.pl quests. I'm trying to limit the level globally by using a quest. It seems to only work randomly. I don't know if it is how it is written, but some people are basically immune to it; however, it works properly with other people. I honestly cannot figure it out.
Here is the script.. Code:
sub EVENT_LEVEL_UP{ |
looking in the source code, this is the order of precedence for player.pl:
1. /quests/zone/player_v#.pl 2. /quests/zone/player.pl 3. /quests/templates/player.pl and global_player.pl is only read from /quests/templates/ |
I have confirmed that it is in all of the zone folders and templates under player.pl. Can anyone think of any reason at all that this quest just does not affect many people? Like it works on all of my characters and several others, but some people just are not affected by it.
|
I modified the script slightly to make people not have max experience and therefore not level up every time they killed something.
Code:
sub EVENT_LEVEL_UP{ |
always start with the simple things first. are you 1000000000% certain the logic is the same and present in every zone's folder? what about bothunder, for example? i know that zone already had an existing player.pl file due to the fact it is required for access to the towers. are you just as certain that you have a zone folder for every zone players can access? i don't know off the top of my head if every zone has one.
also, it's best to cut down on possibility for error where possible. you don't need a player.pl file in templates if you have one in every zone's folder, as the one in the zone's folder takes precedence. you don't need the empty else{} blocks in the scripts either. |
Well, I meant that I have the script in every zone that had a pre-existing player.pl. The player.pl in the templates is meant to cover the zones that did not already have pre-existing ones. Now what I mean by some players are exempt to this script are there can be two players side by side. Both of them can be level 55 and neither of them have the required Kunark flag. I will do #level 50 on both of them. Then, I will do #level 51 which levels them up to the max level. Although both of them have the exact same flags, one of them will get the you have reached the max level message, and the other person will not. On doing #level 52, the person who got the message will go back to 51, and the other person will stay at 52. I have tested it on around 15 different players now on my server, and it really is almost random which players are affected and which aren't.
|
i'm wondering if it's not a wonky issue with the timers. i'd try testing it by removing them from the equation and de-leveling directly in EVENT_LEVEL_UP and then move on from there after ruling that out as the issue.
|
That was my first idea, but it didn't work on level ups. I tried this, and it seems to be working a little more consistently, actually.
Code:
sub EVENT_LEVEL_UP{ |
i overlooked the part where you clearly stated one person doesn't even get the message they have obtained the max level. apologies... i need sleep. :)
|
Haha it's ok. I appreciate any feedback or anything that is at least different than what I am doing
|
I did the same thing on one of my servers and experienced the same problems. I was able to fix it, however I was editting the source code(Perl is never going to be a good option for this).
|
How did you do it in the source code?
|
I can't remember and I don't have any copies of the source anymore but I did PM it to a few people so when my main account is back from vacation I can let you know and you can ask them to send it to you.
|
Alright, I'd appreciate it
|
All times are GMT -4. The time now is 10:02 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.