PDA

View Full Version : Message when entering a zone


revloc02c
12-15-2010, 03:12 AM
I keep looking, but I can't find a place where you can set a message for each zone when a toon enters the zone, i.e. "Welcome to Unrest. Making trains here will get you banned!"

And while I am at it here, I also can't find where to set a maximum level for a zone. The zone table has min_level, but no max_level, and I can't find it anywhere else. Anyone know?

Thanks.

trevius
12-15-2010, 03:39 AM
This wiki page should help:

http://www.eqemulator.net/wiki/wikka.php?wakka=QuestPlayerQuestExamples

You will want to create a player.pl file in the zone folder you want the message to happen in.

Then, just add an EVENT_ENTERZONE to that file and have it send the message to the player using Message(). There is no max level allowed for zoning in, but you can just check their level and port them back out if they are too high. Here is a simple example:

sub EVENT_ENTERZONE {

if ($ulevel < 35)
{
$client->Message(15, "Welcome to Unrest. Making trains here will get you banned!");
}
else
{
# If they are 35 or higher, port them to Nexus
$client->MovePC(152, 0, 0, -30, 0);
}

}

Also, if you wanted to prevent them from staying in the zone after they exceed the max level you want, you can use EVENT_LEVEL_UP in player.pl and have it check their level and port them out same as the example above.

revloc02c
12-15-2010, 02:03 PM
Thank you Trevius, I have always found your posts very helpful and respectful, and I appreciate both.