Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2010, 11:42 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Is there any quicker way to test new spells than rebooting the server after I import them?
Reply With Quote
  #2  
Old 02-07-2010, 07:07 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Spells load into memory when the server starts, so you can't see any changes until a restart. Best bet is to test the changes on a test server first, so you don't affect your players with multiple restarts.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 03-01-2010, 04:30 PM
ptarp
Fire Beetle
 
Join Date: Jan 2010
Location: Idaho
Posts: 27
Default

I tinkered with import_spells.pl a bit.
As a test, I created a new table copy of "spells_new" table. Named it "Spells_live" and emptied it., then changed import_spells.pl with this
Code:
--- C:/test/import_spells.old.pl	Mon Mar  1 13:13:41 2010
+++ C:/test/import_spells.pl	Mon Mar  1 13:14:52 2010
@@ -9,7 +9,7 @@
 getopts('c:s:t:dh');
 my $conf = "eqemu_config.xml"; #default
 my $spellf = "spells_us.txt"; #default
-my $table = "spells_new"; #default
+my $table = "spells_live"; #default
 
 if ($opt_h) { #help (-h)
 	printf "\nUsage: import_spells.pl [-c path] [-s path] [-t table] [-d]\n";
@@ -102,6 +102,7 @@
 		}
 	} elsif (scalar(@s) > scalar(@t_col_names)) {
 		for (my $z = 1; $z <= $col_diff; $z++) {
+		  if ( length(@s) < 1 ) { @s = 0 }
 			pop(@s);
 		}
 	}
The added single line converts any null value to 0 before the string is populated.
Tested with a copy of the Spells_en.txt and spells_us.txt from my live EQ folder, and got a result of "Spells loaded: 23120 of 23120"
The resulting table 'looks' correct also, though I haven't gotten around to testing anything with it. Not sure how "correct" the code is either, since I've never really looked at perl before. Should work fine with SoF files.
Reply With Quote
  #4  
Old 03-01-2010, 08:25 PM
ptarp
Fire Beetle
 
Join Date: Jan 2010
Location: Idaho
Posts: 27
Default

OK, probably nevermind on that.. Worked on my laptop, but not on my desktop on a different copy of the database. Still trying to figure it out. lol.
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 10:44 PM.


 

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