View Single Post
  #60  
Old 10-10-2020, 09:31 AM
macdaddy02
Fire Beetle
 
Join Date: Oct 2020
Posts: 13
Default

I'm not sure if this is old or I should post here anymore, however I got a .lua code that works and thought I'd share it with everyone.

Code:
function event_level_up(e)
		e.self:Message(15, "You have gained the knowledge of learning new skills, spells and discs!!");
	local skills = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 48, 49, 50, 51, 52, 53, 54, 56, 62, 66, 67, 70, 71, 72, 73, 74 };
	for i, curskill in ipairs(skills) do
		local maxskill = e.self:MaxSkill(curskill);
		if (e.self:CanHaveSkill(curskill) == false) then
			--Do nothing...
		elseif (maxskill <= e.self:GetRawSkill(curskill)) then
			--Do nothing...
		else
		    -- Scribe all spells up to current level
		   eq.scribe_spells(e.self:GetLevel());
                   -- Train all disciplines up to current level
                   eq.train_discs(e.self:GetLevel());
	           --Train all skills for current level
		   e.self:SetSkill(curskill, maxskill);
		end
	end
end
Reply With Quote