+ Reply to Thread
Results 1 to 3 of 3

Thread: Mentor addon

  1. #1
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default Mentor addon

    During the Silverwood event I found myself wishing for an addon that would set my mentorlevel to the correct one easily, so I tried to throw something together. Turns out I'm not the next great addonn developer .

    I was wondering if there were someone who could take what I made and run with it, turning it into something that would actually be useful.

    Code:
    function Init()
    	local ctx = UI.CreateContext("test")
    	ctx:SetSecureMode("restricted")
    	local f = UI.CreateFrame("Frame", "test", ctx)
    	f:SetWidth(25)
    	f:SetHeight(25)
    	f:SetPoint("TOPLEFT", UIParent, "TOPLEFT")
    	f:SetBackgroundColor(0,1,0)
    	f:SetSecureMode("restricted")
    	local Mentor = function()
    		local _self = Inspect.Unit.Detail("player")
    		local _selfLvl = _self.level
    		local _target = Inspect.Unit.Detail("player.target")
    		if(_target) then
    			local _targetLvl = _target.level
    			local _mentorLevel = _targetLvl + 7
    			f:EventMacroSet(Event.UI.Input.Mouse.Left.Down, "mentorlevel ".._mentorLevel)
    		end
    	end
    
    	f:EventAttach(Event.UI.Input.Mouse.Left.Down, function() Mentor() end, "Mentor.SetLevel")
    end
    
    Init()

  2. #2
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    It works at least - there is something to be said for that!

    What is it you want it to do, that it currently doesnt?
    Last edited by Adelea; 07-01-2013 at 08:55 AM.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Telaran
    Join Date
    Mar 2011
    Posts
    94

    Default

    I was mostly thinking about making it a little prettier, nice movable button and some error handling. Unfortunately I don't think you can clear your mentor status, but that would be good to have.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts