Acquire Blue Spells

Post Reply
DeVeous
Posts: 40
Joined: Sun Jul 22, 2012 8:11 pm

Acquire Blue Spells

Post by DeVeous » Thu Sep 20, 2012 8:41 am

Hopefully I don't make myself look too stupid, but best I can tell there isn't a way to learn BLU spells. And I know its for a ToA job, but I thought it would be cool for that piece to be working when the time comes. So I thought through it and starting implementing a process but I think it would be best for me to hear from those with experience before I over-engineer anything.

First part is to add a function call in all the lua files in mobskills - canPlayerLearn(target, skill)

This calls a function in bluemagic.lua, in the global folder, that checks if the main job is BLU and if the player's blue magic skill is high enough for the spell. If so, then give a random chance to learn. If all that passes a var is set indicating the player can learn.

I should also mention to check the skill I've added a lua function - player:getSkillValue(SKILL_BLU) to return the skill value. Can be used for any skill.

A second function is added to all applicable mobs in the OnDeath logic. This way even if the first call passes, but the player dies before the mob, then the spell isn't acquired. If the player lives, the var is checked, addSpell is called if true, and the var is removed.

Also, in the bluemagic.lua I'm adding an array of all the spells available and the minimum skill needed to acquire, not sure if there is a better way or not.

Any advice would be appreciated.

Thanks

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Acquire Blue Spells

Post by bluekirby0 » Thu Sep 20, 2012 4:32 pm

Honestly it is too soon to work on something like this. We don't even have the packets handled yet, so even if you get a system put in place, there is no way to actually use it.

Post Reply