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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
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
 


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 03:43 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