Log in

View Full Version : zone command for players needed


Angelox
05-24-2006, 03:48 PM
I'm wondering if someone could write some code for a command similar to the #peqzone command - something that could be added to commands.pl?
Its hard to move around from zone to zone on the server when some don't work and you get stuck, then have to wait for someone to gate you out. Players just get frustrated and leave.
This would be a great help and solution tell all the zones work right

Thanks

sdabbs65
05-25-2006, 12:31 AM
I'm wondering if someone could write some code for a command similar to the #peqzone command - something that could be added to commands.pl?
Its hard to move around from zone to zone on the server when some don't work and you get stuck, then have to wait for someone to gate you out. Players just get frustrated and leave.
This would be a great help and solution tell all the zones work right

Thanks
Use the eqemuPORTAL and allow your players to move themselfs.

just delete the things your don;t want them doing.

Belfedia
05-25-2006, 04:35 AM
For peq, i think it was a perl command.
Have you ask to wiz on peq-forum, if he want share the code ?

Angelox
05-25-2006, 03:32 PM
Thanks for your reply - From what I gather from the threads i read, I don't think they want to give up any code like that. I'm thinking of switching to EQ database since it appears to have this problem solved . That's what I need to do in order for eqemuPORTAL to work?
I think this is very important as long as there are broken zones/portals.
Would it be possible to transfer character data from PEQ database to the EQ one?
Thank you again for your help

sdabbs65
06-06-2006, 06:13 AM
Thanks for your reply - From what I gather from the threads i read, I don't think they want to give up any code like that. I'm thinking of switching to EQ database since it appears to have this problem solved . That's what I need to do in order for eqemuPORTAL to work?
I think this is very important as long as there are broken zones/portals.
Would it be possible to transfer character data from PEQ database to the EQ one?
Thank you again for your help

No if you do that you will endup with dupelacate spawns in all the old zones.
eqemuPORTAL works with anything as long as you have php setup correctly and the config files for it point to your active server ie: peq

[CODE]in command.cpp
add with the other commands at the top

command_add("peqzone","[zonename] [x] [y] [z] - Go to specified zone (coords optional)",10,command_zone) ||

in command.h

add with the simular ones.
void command_peqzone(Client *c, const Seperator *sep);

And here is a way to use it with a NPC.

just open up wordpad and call it <npc number.pl>

sub EVENT_SAY
{
if ($text=~/Hail/i)
{
if ($race=~/Human/i)
{
$startzones='Qeynos or Freeport';
}
elsif ($race=~/Barbarian/i)
{
$startzones='Halas';
}
elsif ($race=~/Erudite/i)
{
$startzones='Erudin';
}
elsif ($race=~/Wood Elf/i)
{
$startzones='Kelethin (Greater Faydark)';
}
elsif ($race=~/High Elf/i)
{
$startzones='Felwithe';
}
elsif ($race=~/Dark Elf/i)
{
$startzones='Neriak';
}
elsif ($race=~/Half Elf/i)
{
$startzones='Qeynos, Freeport, Kelethin, or Felwithe';
}
elsif ($race=~/Dwarf/i)
{
$startzones='Kaladim';
}
elsif ($race=~/Troll/i)
{
$startzones='Neriak';
}
elsif ($race=~/Ogre/i)
{
$startzones='Oggok';
}
elsif ($race=~/Halfling/i)
{
$startzones='Rivervale';
}
elsif ($race=~/Gnome/i)
{
$startzones='Ak\

vales
06-06-2006, 07:16 AM
This may be a hacked attempt, but I just replaced the doors.frm, doors.MYD and doors.MYI from cavedude's database and overwrote the ones in the PEQ folder. This way, I get all of the PoK books and can get around. If you check the PEQ website, they updated the doors table and you can compile it and use that as well.

If you're customizing your server like PEQ's server with the #peqzone command, then I guess this wouldn't count. :p But I like having players get around and make an effort to get from point A to point B. Right now, if people click on the book and port around, they might get stuck in the pedestal. Just offset the zone in coordinates by a hair, and they'll zone in just fine. Or if you're really lazy, just crouch and walk out. :p

Another thing to note is the reason why you're stuck is because your safe zone (x, y, z) coordinates are not right. You can use MySQLCC and look at the PEQ forum topic on the doors I mentioned above and insert them. Might want to check your zone.sql tables as well. Those x,y,z coordinates could be wrong, too. It's a bit more tedious, but I found just replacing the doors files and fixing the ones that are broken are much easier.

So far, I haven't had any major issues whatsoever aside from the ones I mentioned above. But that was easily corrected.

wize_one
06-06-2006, 08:06 AM
unless it has been removed from the source, check the status level on the #zone command, set it to 0 if you want people to use it, peq has a command to let people zone when above 75% health to try and prevent people from useing a get out of jail free card(ie.. i'm gonna die #zone oasis or whatever)

Angelox
06-08-2006, 07:04 AM
in command.cpp
add with the other commands at the top

command_add("peqzone","[zonename] [x] [y] [z] - Go to specified zone (coords optional)",10,command_zone) ||

in command.h

add with the simular ones.
void command_peqzone(Client *c, const Seperator *sep);
}[/QUOTE]


Wouldn't this just be an alias for #zone? I was looking for one that acted more like peqzone did; will only zone you to working, populated zones, and only if you're at 75% health or more.

I tried the codes posted by sdabbs65, but they won't compile for me.

fathernitwit
06-18-2006, 05:27 AM
peqzone had to be implemented in C++ to support zoning to any zone by name (no way to turn a zone name into a zone ID in perl right now). This is because the function to cause the player to zone takes a zone ID, not a zone name... if you only wanted to support zoning to a few zones, you could map from name to id in your code, and then call $client->MovePC($zoneid, 0, 0, 0) after checking whatever restrictions you want.