EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Perl Import_Spells.pl (https://www.eqemulator.org/forums/showthread.php?t=28637)

thepoetwarrior 02-07-2010 11:42 AM

Is there any quicker way to test new spells than rebooting the server after I import them?

trevius 02-07-2010 07:07 PM

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.

ptarp 03-01-2010 04:30 PM

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.

ptarp 03-01-2010 08:25 PM

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.

Nacl2 03-05-2010 11:16 AM

you have to use GoergeS ODBC drivers
 
Quote:

Originally Posted by rizzen (Post 175585)
I also tried to run the application, it ran my processor at 100% until I killed it.

On the Right side of the screen in the box that says Installing the Tools
If you download and install
http://www.georgestools.eqemulator.net/ODBC_DRIVERS.zip

From his download page and install them..you should have no problems. Had same issue until i did so :) hope helps.

thepoetwarrior 06-24-2010 05:03 AM

Sorry for bringing this up again, but it would be really nice to have something like #reloadspells similar to the #reloadquest in-game command. I assume it wouldn't be too hard, or even take too much time, to write a small function in the source code to do this? Would make testing edits a lot quicker.

Hope someone notices my request =)

cavedude 06-24-2010 09:09 AM

Quote:

Originally Posted by thepoetwarrior (Post 189081)
Sorry for bringing this up again, but it would be really nice to have something like #reloadspells similar to the #reloadquest in-game command. I assume it wouldn't be too hard, or even take too much time, to write a small function in the source code to do this? Would make testing edits a lot quicker.

Hope someone notices my request =)

Actually, it would be difficult and time consuming to do so, yeah. Currently, spells are loaded into shared memory which is only loaded when the server is first started. This behavior can be changed, but it would take far more time than adding a simple function. The same goes for faction, loot, and items.

thepoetwarrior 06-24-2010 09:58 PM

** sad face **


All times are GMT -4. The time now is 03:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.