Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2008, 07:49 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default file list to zone startup?

I want to start every single zone as a static zone but I'm not really into manually entering "zone" and "<mapname>" into the zone startup list.

I can get text file with all the map names with

dir *.map /B > maplist.exe

but I can't think of a simple way to get from there to inserting the names into the startup table. Any ideas?
Reply With Quote
  #2  
Old 12-05-2008, 12:58 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I think you could do this with a subquery to the zones table (to get the list of zone names), but I'm not sure what it would be, specifically, off the top of my head.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #3  
Old 12-05-2008, 02:10 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Try pasting them into excel, or saving them into a .txt file and import the file into excel using a period as the delimiter to strip off the file extension into another row. Then, just delete the rows you don't want and make a row of all zone. Should be easy enough if you have excel.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 12-05-2008, 09:44 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

I ended up making a perl script that creates an sql file.

first I do a "dir maps\*.map > filelist" to get the .map names, then run the perl script which takes the names, drops the .map extention, and stuffs them into an insert statment.


Code:
#! /usr/bin/perl

print "Getting map names.";

$in_file="filelist";
$out_file="zonelist.sql";

open(IN,"<$in_file") or die "Can't open $in_file: $!\n";
open(OUT,">$out_file") or die "Can't open $out_file: $!\n";

print OUT "use peq;\n";

while ($line=<IN>) {
	$line = substr($line,0,length($line)-5);
	print OUT "insert into launcher_zones VALUES ('zone','$line',0);\n";
}

close IN;
close OUT;
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:28 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3