View Single Post
  #52  
Old 06-12-2017, 05:33 PM
Ninlin
Fire Beetle
 
Join Date: May 2017
Posts: 1
Default

Quote:
Originally Posted by jpyou127 View Post
Would anyone that is versed in LUA be able to create the above with spell scribe and discs?

Ex from above.
I think this is what you requested? You can toy with it a bit the change the level granted etc. We dropped a couple extra NPC into PoK and put these in lua quest files for them. You could add them to MisterLockout or the like. Also, my original code (not here) has some additions for things like clearing out a spellbook or discs before scribing all the new ones or for restricting lists of spells. Happy to provide that if you like, but figured I'd give minimal working example. (I also just allow the NPC to scribe/train everything up to current level, so I omit the second argument in the scribspells function for our server.)

Code:
-- #Spell_Scribe
-- Used to allow players to scribe all spells at an NPC.

function event_say(e)

	if(e.message:findi("hail")) then
		-- Intro message
		e.other:Message(257, "Hail, adventurer! I can teach you all your spells! Would you like me to [" ..eq.say_link('write them', false, 'write them') .."] down for you in that book?")

	elseif(e.message:findi("write them")) then

		-- scribe all spells for current level
		e.other:scribe_spells(e.other:GetLevel(), e.other:GetLevel()-1);

	end

end
Code:
-- #Discipline_Trainer
-- Used to allow players to train disciplines at an NPC.

function event_say(e)

	if(e.message:findi("hail")) then
		-- Intro message
		e.other:Message(257, "Would you prefer that I ["..eq.say_link('teach', false, 'teach') .. "] you how to perform the skills that require more discipline than the basics?")

	elseif(e.message:findi("teach")) then

		-- scribe all disciplines for level
		eq.train_discs(e.other:GetLevel(), e.other:GetLevel()-1);

	end


end
Reply With Quote