View Single Post
  #50  
Old 12-18-2016, 11:41 AM
Jahosphat
Sarnak
 
Join Date: Apr 2009
Location: LA
Posts: 96
Default

Quote:
Originally Posted by NatedogEZ View Post
Try this... (might want to test it.. lol I r bad at lua)


This will train all skills except tradeskills

Code:
function event_level_up(e)
	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
			--Train!
			e.self:SetSkill(curskill, maxskill);
		end
	end
end

Do i just add this and replace the other level event in global.lua? Also can you add Spells / Disc to this code?
Reply With Quote