Page 1 of 1

Scribing

Posted: Sun Jun 26, 2016 4:24 pm
by Gangrenous
Hey Jab does scribing work? It does not really have to be Master, Adept, etc. I just need to know if you can have an item scribe a spell.

Re: Scribing

Posted: Sun Jun 26, 2016 11:45 pm
by Jabantiz
Yes it does. The item type needs to be set "Scroll" and then in the `item_details_skill` table you put in the item id and the spell id/tier you want the item to scribe.

Re: Scribing

Posted: Mon Jun 27, 2016 4:34 am
by Gangrenous
You are a gentlemen and a scholar.

Re: Scribing

Posted: Mon Jun 27, 2016 1:32 pm
by Gangrenous
I tried this just now and it worked beautifully. So at this point I can start adding original EQ1 merchants for spells, etc and get the spell scrolls aligned with the actual spell. Brilliant.

Re: Scribing

Posted: Mon Jun 27, 2016 1:46 pm
by Gangrenous
I am going to add a way in the editor to manipulate these. Would there ever be an instance where multiple spells are attached to one item? If not then I see no reason in having these in a list or grid, it could be accomplished on the main form.

Doing a quick query, I am not seeing even one record out of 25,117 that has the same item entry.

Code: Select all

SELECT address, count(id) as cnt FROM list
GROUP BY address HAVING cnt > 1;

Re: Scribing

Posted: Mon Jun 27, 2016 3:20 pm
by Jabantiz
There should never be more then 1 spell per item, client can't handle that.

The tables are set up this way to match the item structs. Item types use a different packet structure from each other so all the `item_details` tables are the data that only that specific item type needs.

Re: Scribing

Posted: Mon Jun 27, 2016 4:24 pm
by Gangrenous
Oh okay, makes sense.

Re: Scribing

Posted: Thu Jul 14, 2016 12:44 pm
by Gangrenous
Jabantiz are there other things that can cause these to not show the right click scribe? I had to redo my spells and the option is now gone again. What about tier restrictions? I absolutely have the spells set for "scroll" and there are tons of entries in item_details_skill that are tying the item_id to the spell_id, I have them currently for tier 1. The spells are enabled, they do have scripts and I meet the class and level restrictions, which are all level 1 for testing.

Re: Scribing

Posted: Thu Jul 14, 2016 12:49 pm
by Gangrenous
Funny how this happens, spent hours on it and 2 minutes after I post I get a positive result.....nm.

Re: Scribing

Posted: Wed Jul 20, 2016 5:50 am
by Gangrenous
Hmm, well this is still a mystery if you are available to assist. I have one spell that is showing scribe, none of the others are. I have compared the items and the spells and cannot see any different in the entries.

Re: Scribing

Posted: Wed Jul 20, 2016 6:34 am
by Gangrenous
Okay I figured out what is causing the issue, but it does not make sense. In spell_classes, the level column.

I have an entry for a spell, with an adventure class of 29, which is conjurer and the level being level 4. My character is level 29 but cannot scribe it unless I set that level at 1 in the spell_classes table and log out and back in.

Re: Scribing

Posted: Wed Jul 20, 2016 11:30 am
by Gangrenous
After reporting back on some logging.....these levels are x10? Since when? I did not know this. I put some debug logging into ScribeAllowed and noticed that the spell levels for the spells are x10

Re: Scribing

Posted: Wed Jul 20, 2016 11:57 am
by Gangrenous
Pretty sure ScribeAllowed should look like this.

Code: Select all

bool Spell::ScribeAllowed(Player* player){
	bool ret = false;
	if(player){
		MSpellInfo.lock();
		for(int32 i=0;!ret && i<levels.size();i++){
			if((player->GetAdventureClass() == levels[i]->adventure_class || player->GetTradeskillClass() == levels[i]->tradeskill_class) && player->GetLevel() >= (levels[i]->spell_level/10))
				ret = true;
		}
		MSpellInfo.unlock();
	}
	return ret;
}

Re: Scribing

Posted: Wed Jul 20, 2016 3:35 pm
by Jabantiz
Some levels have to be x10 because that is what the packets require, I have no clue why it is set up like that and others are set up to be normal but that is the way SoR/DBG works...

Re: Scribing

Posted: Wed Jul 20, 2016 3:51 pm
by Gangrenous
What about getting that fix added to official? It is working for me.