PDA

View Full Version : SpellScriber question


Nagus69
09-07-2009, 11:00 AM
Is it possible that the spellscriber will only scribe non-custom spells?

I created a couple of spells that i wanted to be raid dropped, but it appears our spell scriber scribes them everyone who hails them into their books; )

Producer_BMW
09-07-2009, 02:51 PM
You can set a statement I believe

Like if is a certain spell

to like opt it out

such as Mage pets spell



:::not 100% on that::: but looks something like this

sub EVENT_SAY {
if($text =~ /hail/i) {
quest::say("Welcome to the server, how can I help
you today? Would you like me to help you [scribe] spells");
}
elsif ($text =~ /scribe/i && $ulevel <= 51 && $class ne Magician) {
quest::say("Very well, here you are $name!");
quest::scribespells($ulevel);
}
elsif($text =~ /scribe/i && $ulevel <= 44 && $class == Magician) {
quest::say("Very well, here you are $name!");
quest::scribespells($ulevel);
}
elsif($text =~ /scribe/i && $ulevel >= 45 && $ulevel <= 51 && $class
== Magician) {
quest::say("Sorry, $name. You are too high to have any spells scribed!");
}
elsif ($text =~ /scribe/i && $ulevel >= 52) {
quest::say("Sorry, $name. You are too high to have any spells scribed!");
}

Nagus69
09-08-2009, 05:17 AM
Seems this script only checks for level but not any specific spell ids or am i too blond again ? :)

trevius
09-08-2009, 08:51 PM
Right now, there isn't any easy way to stop certain spells from being scribed. Though, I have had an idea for a while now on how to make a system to do it using quest globals. It hasn't been coded yet, but hopefully it will be at some point.

Striat_eq
09-09-2009, 04:12 PM
I've edited a quest command to check spell name for (custom). The edited spells with custom in them (e.g. "Firebolt (custom)" ) would be in my database but not distributed to the players.

Kind of a pain in the ass, but not enough for me to look for a cleaner solution;p

AndMetal
09-11-2009, 01:31 AM
Is it possible that the spellscriber will only scribe non-custom spells?

You could always use the quest object (http://www.eqemulator.net/wiki/wikka.php?wakka=QuestObjects) $Client->ScribeSpell(spell_id, slot, update_client= true) in combination with a foreach loop (http://perl.about.com/od/perltutorials/a/foreachloop.htm) to scribe specific spells (stored in an array, etc).

Naes
09-16-2009, 03:08 AM
Right now, there isn't any easy way to stop certain spells from being scribed. Though, I have had an idea for a while now on how to make a system to do it using quest globals. It hasn't been coded yet, but hopefully it will be at some point.

I was actually just in the process of modifying the source so spells we didn't want scribed on our server weren't given out. It involved a new table in the DB, spells_unscribable with one field, spell_id.

Generally I don't like such close-ended solutions, but I wasn't sure of a better way (I was also going to look into passing an array of blocked spell_id's to quest::scribespells() as well). Your quest global idea seems a lot more sensible, and something I'm going to look into now.

trevius
09-16-2009, 04:00 AM
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.

ChaosSlayerZ
09-16-2009, 11:23 AM
hey what happened to good old scrolls? =P
I always consider using that spell scriber to be cheating =P

Naes
09-16-2009, 03:49 PM
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:


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.

quest::scribespells($ulevel, 1, "1944,1197");

Nyrod
09-24-2009, 12:49 AM
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.

this is something that should be added so that spells from each expansion could be selected or from your custom list etc. such a pain in the ass either way :(