View Single Post
  #12  
Unread 09-26-2010, 07:12 PM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
I'm going to help you cheat a bit here - but only because the original code that this was based off of was given to me by Pengoros

put this in your Main.lua script:

Code:
pluginName="myPluginsName";
window = Turbine.UI.Window();
window:SetWantsUpdates(true);
window.Update = function(sender,args)
	if (Plugins[pluginName] ~= nil) then
		Plugins[pluginName].Unload = function(self,sender,args)
			UnloadPlugin();
		end
		window:SetWantsUpdates(false);
	end
end
This will call a function called "UnloadPlugin()" when the plugin is being unloaded. This function would be a great place to put that PluginData.Save() line.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote