lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [SequenceBars/] [Main.lua] - Rev 7

Go to most recent revision | Compare with Previous | Blame | View Log

import "Thurallor.SequenceBars"; 

math.randomseed(Turbine.Engine.GetGameTime());

theManager = Manager();
Turbine.Plugin.Unload = function(sender, args)
    theManager:Unload();
end

--Turbine.Plugin.Load = function(sender, args)
--    import "Equendil.Utils";
--    import "Equendil.LuaExplorer.Browser";
--    function BrowseTable(name, t)
--        local b = Equendil.LuaExplorer.Browser("Browsing: " .. name);
--        b:Add(name, t, true, false);
--        b:SetVisible( true );
--        b:SetPosition(0, 0);
--        b:Activate();
--    end
--    BrowseTable("_G", _G);
--end

local hello = L:GetText("/HelloMessage");
hello = string.gsub(hello, "<version>", plugin:GetVersion());
Turbine.Shell.WriteLine(hello);
_G.PutsPrefix = "<rgb=#DAA520>SequenceBars:</rgb> ";

--luaCmd = Turbine.ShellCommand();
--luaCmd.Execute = function(sender, cmd, arg)
--    result = assert(loadstring(arg))();
--    Turbine.Shell.WriteLine("returned " .. tostring(result));
--end
--luaCmd.GetHelp = function()
--    return "usage: /lua <command>\nThe specified LUA command will be executed in the SequenceBars apartment.";
--end
--luaCmd.GetShortHelp = function()
--    return "Executes an arbitrary Lua command.";
--end
--Turbine.Shell.AddCommand("lua", luaCmd);
--Turbine.Shell.WriteLine("Added shell command: lua");

sbCmd = Turbine.ShellCommand();
function sbCmd:Execute(cmd, args)
    if (args == "help") then
        Turbine.Shell.WriteLine(sbCmd.GetHelp());
    else
        theManager:ShellCommand(cmd, args);
    end
end
sbCmd.GetHelp = function()
    return L:GetText("/ShellCommand/LongHelp");
end
sbCmd.GetShortHelp = function()
    return L:GetText("/ShellCommand/ShortHelp");
end
Turbine.Shell.AddCommand(L:GetText("/ShellCommand/Command"), sbCmd);

Go to most recent revision | Compare with Previous | Blame


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


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