View Single Post
  #10  
Old 09-16-2009, 03:49 PM
Naes
Fire Beetle
 
Join Date: Feb 2007
Posts: 27
Default

Quote:
Originally Posted by trevius View Post
Basically, the idea I had was just to add 2 more fields at the end of the spell table. One of the fields being named something like qglobal_name, and the other being qglobal_value. Then, when spells are scribed, we would simply check each spell that a player could normally scribe to see if it has a name and value set and if so, it will check the qglobals table to see if that player has that particular qglobal and value. So, you could assign players qglobals like "shaman" with a value of "1" and then set a tier of spells in the spells table to have that same setting. You could really organize them however you want, then. You could name them by class like that, or name them after a quest reward or whatever. The only downside to it is that you wouldn't be able to export your whole spells table and then clear it out and import it again. If you did, you would have to setup your qglobal fields again.
Interesting approach. I was actually scared to touch the spells table, I know the Titanium client ends at 202 fields or something, but I don't know what is up with the SoF client or if anything else was being planned for the extra fields in the table. I think taking your idea a step further and creating a new table with a many-to-many relationship for different "spellsets" would add some extra flexibility, but of course would be a little more time consuming to implement correctly.

Still it seems like too much overhead, when in reality most of the time people only want to block a few select spells. I think I'm just going to add an additional parameter to the quest::scribespells() as I said, but since it can't accept arrays I'll just pass in a comma separated list.

I'm no perl expert but I think it would look something like this:

Code:
my @blocked = ();
push(@blocked, 1944);   # mage epic
push(@blocked, 1197);   # ancient: lullaby of shadow
# etc, this is prolly best for large lists of blocked spells

my $csv = join(",", @blocked);
quest::scribespells($ulevel, 1, $csv);
or simply, if you have a small list of blocked spells.

Code:
quest::scribespells($ulevel, 1, "1944,1197");
Reply With Quote