Help understanding guildmaster script
this is the official guildmaster tome turn in plug-in
Code:
#looks through the items haded in for discipline tomes, i see this line here: quest::traindisc($i); which scribes disc $i, but which line responsible for $i to be determined? basically I am looking to rewrite for my own script, which will handle specific tome turn ins only, and from specific people only, but I don't know how to tell the npc which tome was given to him? |
The part
Code:
if(quest::isdisctome($i)) |
This assigns the itemids given to $i: foreach my $i(keys %{$itemcount}) {
I would think isdisctome($i) only checks if the item is a discipline tome. Maybe you are thinking too far outside the box? Psuedo: Code:
if (plugin::check_handin(\%itemcount, tomeid => 1)) { |
so you saying that traindisc automatically reads of the item the spell id field its assigned?
|
isdisctome() is actually kinda funny to read. It checks if the name of the item starts with "Tome ", an int caster can't use it, the spell scroll effect is a valid spell, and an int caster can't cast the spell.
traindisc() does a similar check to see if the name starts with "Tome ", you're not an int caster, your class can use the item, the spell scroll effect is a valid spell, your class can use the spell, you're high enough level, and you don't know it already, then it teaches it to you. |
I have played around with this, and it does seem that it check class and level of the tome and spell, BUT it doesn't check the Deity, even if you set the deity on spell itself and the tome - regular spell scrolls do check for deity when you trying to scribe them (deity base imbue spells)
I guess I will have to write that part with a script. |
You could always fix the code and post a diff.
|
I would, but this is beyond the scope of my abilities for the moment ;)
Would be nice if someone with more source knowledge could do that ;) |
When you say this is correctly tested when scribing a spell, do you mean right-clicking a deity specific spell from inventory?
I looked, but I don't see anything in the server code that actually looks at the deity. Maybe I missed it, but it might be something that is checked for on the client, and the functionality was never needed for disciplines. |
yes you are correct - its most likely that a client blocks wrong deity spells for spell casters
And I do realize this functionality was never needed for the Discs (at least on live) However, the GAME - either server of client still check for VALID deity assignment on the tomes! What I did is created 2 new discs and 2 new tomes. I have labeled 1 disc and its tome as Solusek Ro only, and another as Mith Marr only I have then turn them both to my monk guildmaster - the guildmaster accepted both tomes and taught me both discs HOWEVER, when I went to use, I was unable to use Ro marked disc, but i was able to use Marr marked disc (my monk is Marr follower) So somewhere, the game does check for valid deity on the disc |
Most likely in the spells section.
|
All times are GMT -4. The time now is 04:19 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.