lotrointerface.com
Search Downloads


Go Back   LoTROInterface > Outdated LotRO Interfaces


Post A Reply
Author Comments Comment Options
Unread 09-20-2012, 10:00 PM  
Stever1388
The Undying
Interface Author - Click to view interfaces

Forum posts: 33
File comments: 122
Uploads: 10
This is great! I was just looking for something like this, and the two other trackers are for skirmishes only and are a bit outdated, plus either don't update automatically or don't reset automatically. This plugin allows custom trackers, so it's a lot more flexible.

One suggestion, to make your plugin more compatible with other plugins, you need to safely handle the chat received event handler. Right now, if any other plugin is using the chat received handler, and your plugin is loaded afterwards, it will overwrite that plugins handler, causing it not to work.

To do that, simply add this code to your Main.lua (near the beginning to prevent the functions from not being loaded before being called)

Code:
function AddCallback(object, event, callback)
    if (object[event] == nil) then
        object[event] = callback;
    else
        if (type(object[event]) == "table") then
            table.insert(object[event], callback);
        else
            object[event] = {object[event], callback};
        end
    end
    return callback;
end
function RemoveCallback(object, event, callback)
    if (object[event] == callback) then
        object[event] = nil;
    else
        if (type(object[event]) == "table") then
            local size = table.getn(object[event]);
            for i = 1, size do
                if (object[event][i] == callback) then
                    table.remove(object[event], i);
                    break;
                end
            end
        end
    end
end
and then change the chat received event to something like this:

Code:
chatHandler = function(f,args)
	if(args.ChatType == Turbine.ChatType.Quest) then
		local message = args.Message;
		if(string.sub(message,1,10) == "Completed:") then
			if(CTM.settings:Update(message)) then
				CTM.TrackerWindow:refreshCurrentTab();
			end
		end
	end
end
AddCallback(Turbine.Chat, "Received", chatHandler);
It's also a good idea to remove callbacks when your plugin is unloaded. To do this, add the following code at the end of Main.lua

Code:
Plugins["Challenge Tracker"].Unload = function( sender, args )
        RemoveCallback(Turbine.Chat, "Received", chatHandler);
end
Can't wait to start using this!
Stever1388 is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-20-2012, 05:39 PM  
ramble_onion2
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 5
Uploads: 1
Quote:
So if I download this by itself it will run?
It should.

By the way, if anyone has been experiencing problems with this plugin, please download version 1.1.2. I've corrected some bugs in the previous versions.

Last edited by ramble_onion2 : 09-20-2012 at 05:42 PM.
ramble_onion2 is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-20-2012, 02:57 PM  
lunarwtr
The Undying
 
lunarwtr's Avatar
Interface Author - Click to view interfaces

Forum posts: 121
File comments: 344
Uploads: 11
Quote:
The only dependencies are the standard Turbine.UI.Lotro, Turbine.UI, and Turbine.
So if I download this by itself it will run?
lunarwtr is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-20-2012, 11:49 AM  
ramble_onion2
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 5
Uploads: 1
The only dependencies are the standard Turbine.UI.Lotro, Turbine.UI, and Turbine.
ramble_onion2 is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-20-2012, 09:33 AM  
lunarwtr
The Undying
 
lunarwtr's Avatar
Interface Author - Click to view interfaces

Forum posts: 121
File comments: 344
Uploads: 11
Does this plugin have dependencies for installation?
lunarwtr is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 09:31 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui