WoWInterface SVN DeathSnap

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

DeathSnap.toc File deleted \ No newline at end of file
localization.ru.lua File deleted \ No newline at end of file
localization.es.lua File deleted \ No newline at end of file
localization.fr.lua File deleted \ No newline at end of file
localization.us.lua File deleted \ No newline at end of file
localization.de.lua File deleted \ No newline at end of file
localization.gb.lua File deleted \ No newline at end of file
localization.tw.lua File deleted \ No newline at end of file
localization.kr.lua File deleted \ No newline at end of file
DeathSnap.xml File deleted \ No newline at end of file
DeathSnap.lua File deleted \ No newline at end of file
localization.cn.lua File deleted \ No newline at end of file
DeathSnap/Chronos/localization.cn.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.cn.lua (Chinese)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation:
 
if ( GetLocale() == "zhCN" ) then
 
-- Please submit your translation to karlkfi@yahoo.com
 
end
DeathSnap/Chronos/localization.en.lua New file
0,0 → 1,13
--------------------------------------------------
-- localization.en.lua (English)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation:
 
-- Default Locale enGB
 
-- Chat Configuration
SCHEDULE_COMM = {"/in","/pause","/delay"};
SCHEDULE_DESC = "/in <seconds> <command> [<args> ...] |cFFCC9966[Note: /in CANNOT cast spells to prevent creation of bots]|r";
SCHEDULE_USAGE1 = "Usage: /in <seconds> <command> [<args> ...]";
SCHEDULE_USAGE2 = "Runs <command> with arguments <args> after <seconds> seconds pass.";
\ No newline at end of file
DeathSnap/Chronos/Chronos.xml New file
0,0 → 1,24
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
 
<!-- $Id: Chronos.xml 4670 2007-02-02 22:41:28Z Gryphon $ -->
 
<!-- Required Embeddable Libs -->
<!-- None -->
 
<!-- Default Localization -->
<Script file="localization.en.lua" />
 
<!-- Secondary Localizations -->
<Script file="localization.cn.lua"/>
<Script file="localization.de.lua"/>
<Script file="localization.fr.lua"/>
<Script file="localization.kr.lua"/>
<Script file="localization.ru.lua"/>
<Script file="localization.es.lua"/>
<Script file="localization.tw.lua"/>
 
<!-- This loads the execution file -->
<Script file="Chronos.lua"/>
 
</Ui>
DeathSnap/Chronos/Chronos.lua New file
0,0 → 1,865
--[[
--
-- Chronos
-- Keeper of Time
--
-- By AnduinLothar, Alexander Brazie, and Thott
--
-- Chronos manages time. You can schedule a function to be called
-- in X seconds, with or without an id. You can request a timer,
-- which tracks the elapsed duration since the timer was started.
--
-- To use as an embeddable addon:
-- - Put the Chronos folder inside your Interface/AddOns/<YourAddonName>/ folder.
-- - Add Chronos\Chronos.xml to your toc or load it in your xml before your localization files.
-- - Add Chronos to the OptionalDeps in your toc
--
-- To use as an addon library:
-- - Put the Chronos folder inside your Interface/AddOns/ folder.
-- - Add Chronos to the Dependencies in your toc
--
-- Please see below or see http://www.wowwiki.com/Chronos_(addon) for details.
--
-- $LastChangedBy: karlkfi $
-- $Date: 2006-12-21 06:19:14 -0600 (Thu, 21 Dec 2006) $
-- $Rev: 4467 $
--
--]]
 
local CHRONOS_REV = 2.12;
 
local isBetterInstanceLoaded = ( Chronos and Chronos.version and Chronos.version >= CHRONOS_REV );
 
if (not isBetterInstanceLoaded) then
 
if (not Chronos) then
Chronos = {};
end
 
Chronos.version = CHRONOS_REV;
 
------------------------------------------------------------------------------
--[[ Variables ]]--
------------------------------------------------------------------------------
 
Chronos.online = true;
 
CHRONOS_DEBUG = false;
CHRONOS_DEBUG_WARNINGS = false;
 
-- Chronos Data
if (not ChronosData) then
ChronosData = {};
end
 
-- Chronos Recycled Tables Storage
if (not Chronos.tables) then
Chronos.tables = {};
end
 
-- Initialize the Timers
if (not ChronosData.timers) then
ChronosData.timers = {};
end
 
-- Initialize the perform-over-time task list
if (not ChronosData.tasks) then
ChronosData.tasks = {};
end
 
-- Maximum items per frame
Chronos.MAX_TASKS_PER_FRAME = 100;
 
-- Maximum steps per task
Chronos.MAX_STEPS_PER_TASK = 300;
 
-- Maximum time delay per frame
Chronos.MAX_TIME_PER_STEP = .3;
 
Chronos.emptyTable = {};
 
------------------------------------------------------------------------------
--[[ User Functions ]]--
------------------------------------------------------------------------------
 
--[[
-- debug(boolean)
--
-- Toggles debug mode
]]--
function Chronos.debug(enable)
if (enable) then
ChronosFrame:SetScript("OnUpdate", Chronos.OnUpdate_Debug);
CHRONOS_DEBUG = true;
CHRONOS_DEBUG_WARNINGS = true;
else
ChronosFrame:SetScript("OnUpdate", Chronos.OnUpdate_Quick);
CHRONOS_DEBUG = false;
CHRONOS_DEBUG_WARNINGS = false;
end
end
 
--[[
-- Scheduling functions
-- Parts rewritten by AnduinLothar for efficiency
-- Parts rewritten by Thott for speed
-- Written by Alexander
-- Original by Thott
--
-- Usage: Chronos.schedule(when,handler,arg1,arg2,etc)
--
-- After <when> seconds pass (values less than one and fractional values are
-- fine), handler is called with the specified arguments, i.e.:
-- handler(arg1,arg2,etc)
--
-- If you'd like to have something done every X seconds, reschedule
-- it each time in the handler or preferably use scheduleRepeating.
--
-- Also, please note that there is a limit to the number of
-- scheduled tasks that can be performed per xml object at the
-- same time.
--]]
function Chronos.schedule(when, handler, ...)
if ( not Chronos.online ) then
return;
end
if ( not handler) then
Chronos.printError("ERROR: nil handler passed to Chronos.schedule()");
return;
end
 
--local memstart = collectgarbage("count");
-- -- Assign an id
-- local id = "";
-- if ( not this ) then
-- id = "Keybinding";
-- else
-- id = this:GetName();
-- end
-- if ( not id ) then
-- id = "_DEFAULT";
-- end
-- if ( not when ) then
-- Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS", "Chronos Error Detection: ", id , " has sent no interval for this function. ", when );
-- return;
-- end
 
-- -- Ensure we're not looping ChronosFrame
-- if ( id == "ChronosFrame" and ChronosData.lastID ) then
-- id = ChronosData.lastID;
-- end
 
-- use recycled tables to avoid excessive garbage collection -AnduinLothar
--tinsert(ChronosData.sched, Chronos.getTable())
--local i = #ChronosData.sched
local recTable = Chronos.getTable()
-- ChronosData.sched[i].id = id;
recTable.time = when + GetTime();
recTable.handler = handler;
recTable.args = Chronos.getArgTable(...);
 
-- task list is a heap, add new
local i = #ChronosData.sched+1
while(i > 1) do
if(recTable.time < ChronosData.sched[i-1].time) then
i = i - 1;
else
break
end
end
tinsert(ChronosData.sched, i, recTable)
 
-- Debug print
--Chronos.printDebugError("CHRONOS_DEBUG", "Scheduled "..handler.." in "..when.." seconds from "..id );
--Chronos.printError("Memory change in schedule: "..memstart.."->"..memend.." = "..memend-memstart);
end
 
 
--[[
-- Chronos.scheduleByName(name, delay, function, arg1, ... );
--
-- Same as Chronos.schedule, except it takes a schedule name argument.
-- Only one event can be scheduled with a given name at any one time.
-- Thus if one exists, and another one is scheduled, the first one
-- is deleted, then the second one added.
--
--]]
function Chronos.scheduleByName(name, when, handler, ...)
if ( not name ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No name specified to Chronos.scheduleByName");
return;
end
local namedSchedule = ChronosData.byName[name];
if(namedSchedule and handler) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: scheduleByName is reasigning \"".. name.."\".");
Chronos.releaseTable(ChronosData.byName[name]);
else
if ( not handler ) then
if ( not namedSchedule ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No handler specified to Chronos.scheduleByName, no previous entry found for scheduled entry \"".. name.."\".");
return;
end
if ( not namedSchedule.handler ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No handler specified to Chronos.scheduleByName, no handler could be found in previous entry of \"".. name.."\" either.");
return;
end
handler = namedSchedule.handler;
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: scheduleByName is updating \"".. name.."\" to time: ".. when);
else
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: scheduleByName is asigning \"".. name.."\".");
end
end
ChronosData.byName[name] = Chronos.getTable();
namedSchedule = ChronosData.byName[name];
namedSchedule.time = when+GetTime()
namedSchedule.handler = handler;
namedSchedule.args = Chronos.getArgTable(...);
end
 
--[[
-- unscheduleByName(name);
--
-- Removes an entry that was created with scheduleByName()
--
-- Args:
-- name - the name used
--
--]]
function Chronos.unscheduleByName(name)
if ( not Chronos.online ) then
return;
end
if ( not name ) then
Chronos.printError("No name specified to Chronos.unscheduleByName");
return;
end
if(ChronosData.byName[name]) then
Chronos.releaseTable(ChronosData.byName[name]);
ChronosData.byName[name] = nil;
end
 
-- Debug print
--Chronos.printDebugError("CHRONOS_DEBUG", "Cancelled scheduled timer of name ",name);
end
 
--[[
-- unscheduleRepeating(name);
-- Mirrors unscheduleByName for backwards compatibility
--]]
Chronos.unscheduleRepeating = Chronos.unscheduleByName;
 
--[[
-- isScheduledByName(name)
-- Returns the amount of time left if it is indeed scheduled by name!
--
-- returns:
-- number - time remaining
-- nil - not scheduled
--
--]]
function Chronos.isScheduledByName(name)
if ( not Chronos.online ) then
return;
end
if ( not name ) then
Chronos.printError("No name specified to Chronos.isScheduledByName "..(this:GetName() or "unknown"));
return;
end
local namedSchedule = ChronosData.byName[name];
if(namedSchedule) then
return namedSchedule.time - GetTime();
end
 
-- Debug print
--Chronos.printDebugError("CHRONOS_DEBUG", "Did not find timer of name ",name);
return nil;
end
 
--[[
-- isScheduledRepeating(name)
-- Mirrors isScheduledByName for backwards compatibility
--]]
Chronos.isScheduledRepeating = Chronos.isScheduledByName;
 
--[[
-- Chronos.scheduleRepeating(name, delay, function);
--
-- Same as Chronos.scheduleByName, except it repeats without recalling and takes no arguments.
--
--]]
function Chronos.scheduleRepeating(name, when, handler)
if ( not name ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No name specified to Chronos.scheduleRepeating");
return;
end
local namedSchedule = ChronosData.byName[name];
if(namedSchedule and handler) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: scheduleRepeating is reasigning ".. name);
Chronos.releaseTable(ChronosData.byName[name]);
else
if ( not handler ) then
if ( not namedSchedule ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No handler specified to Chronos.scheduleRepeating, no previous entry found for scheduled entry '".. name.."'.");
return;
end
if ( not namedSchedule.handler ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No handler specified to Chronos.scheduleRepeating, no handler could be found in previous entry '".. name.."' either.");
return;
end
handler = namedSchedule.handler;
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: scheduleRepeating is updating '".. name.."' to time: ".. when);
else
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: scheduleRepeating is asigning '".. name.."'.");
end
end
ChronosData.byName[name] = Chronos.getTable();
namedSchedule = ChronosData.byName[name];
namedSchedule.time = when+GetTime();
namedSchedule.period = when;
namedSchedule.handler = handler;
namedSchedule.repeating = true;
end
 
--[[
-- Chronos.flushByName(name, when);
--
-- Updates the ByName or Repeating event to flush at the time specified. If no time is specified flush will be immediate. If it is a Repeating event the timer will be reset.
--
--]]
function Chronos.flushByName(name, when)
if ( not name ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: No name specified to Chronos.flushByName");
return;
elseif ( not ChronosData.byName[name] ) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos Error Detection: no previous entry found for Chronos.flushByName entry '".. name.."'.");
return;
end
if (not when) then
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: flushing '".. name.."'.");
when = GetTime();
else
Chronos.printDebugError("CHRONOS_DEBUG_WARNINGS","Chronos: flushing '".. name.."' in "..when.." seconds.");
when = when+GetTime();
end
ChronosData.byName[name].time = when;
end
 
--[[
-- Chronos.startTimer([ID]);
-- Starts a timer on a particular
--
-- Args
-- ID - optional parameter to identify who is asking for a timer.
--
-- If ID does not exist, this:GetName() is used.
--
-- When you want to get the amount of time passed since startTimer(ID) is called,
-- call getTimer(ID) and it will return the number in seconds.
--
--]]
function Chronos.startTimer( id )
if ( not Chronos.online ) then
return;
end
 
if ( not id ) then
id = this:GetName();
end
 
-- Create a table for this id's timers
if ( not ChronosData.timers[id] ) then
ChronosData.timers[id] = Chronos.getTable();
end
 
-- Clear out an entry if the table is too big.
if (#ChronosData.timers[id] > Chronos.MAX_TASKS_PER_FRAME) then
Chronos.printError("Too many Chronos timers created for id " .. tostring(id));
return;
end
 
-- Add a new timer entry
table.insert(ChronosData.timers[id], GetTime());
end
 
 
--[[
-- endTimer([id]);
--
-- Ends the timer and returns the amount of time passed.
--
-- args:
-- id - ID for the timer. If not specified, then ID will
-- be this:GetName()
--
-- returns:
-- (Number delta, Number start, Number end)
--
-- delta - the amount of time passed in seconds.
-- start - the starting time
-- now - the time the endTimer was called.
--]]
 
function Chronos.endTimer( id )
if ( not Chronos.online ) then
return;
end
 
if ( not id ) then
id = this:GetName();
end
 
if ( not ChronosData.timers[id] or #ChronosData.timers[id] == 0) then
return nil;
end
 
local now = GetTime();
 
-- Grab the last timer called
local startTime = tremove(ChronosData.timers[id]);
 
return (now - startTime), startTime, now;
end
 
 
--[[
-- getTimer([id]);
--
-- Gets the timer and returns the amount of time passed.
-- Does not terminate the timer.
--
-- args:
-- id - ID for the timer. If not specified, then ID will
-- be this:GetName()
--
-- returns:
-- (Number delta, Number start, Number end)
--
-- delta - the amount of time passed in seconds.
-- start - the starting time
-- now - the time the endTimer was called.
--]]
 
function Chronos.getTimer( id )
if ( not Chronos.online ) then
return;
end
 
if ( not id ) then
id = this:GetName();
end
 
local now = GetTime();
if ( not ChronosData.timers[id] or #ChronosData.timers[id] == 0) then
return 0, 0, now;
end
 
-- Grab the last timer called
local startTime = ChronosData.timers[id][#ChronosData.timers[id]];
 
return (now - startTime), startTime, now;
end
 
--[[
-- isTimerActive([id])
-- returns true if the timer exists.
--
-- args:
-- id - ID for the timer. If not specified, then ID will
-- be this:GetName()
--
-- returns:
-- true - exists
-- false - does not
--]]
function Chronos.isTimerActive( id )
if ( not Chronos.online ) then
return;
end
 
if ( not id ) then
id = this:GetName();
end
 
-- Create a table for this id's timers
if ( not ChronosData.timers[id] ) then
return false;
end
 
return true;
end
 
--[[
-- getTime()
--
-- returns the Chronos internal elapsed time.
--
-- returns:
-- (elapsedTime)
--
-- elapsedTime - time in seconds since Chronos initialized
--]]
function Chronos.getTime()
return ChronosData.elapsedTime;
end
 
--[[
-- Chronos.afterInit(func, ...)
-- Performs func after the game has truely started.
-- By Thott
--]]
function Chronos.afterInit(func, ...)
local id;
if(this) then
id = this:GetName();
else
id = "unknown";
end
--if(id == "SkyFrame") then
-- Chronos.printError("Ignoring Sky init");
-- return;
--end
if(ChronosData.initialized) then
func(...);
else
if(not ChronosData.afterInit) then
ChronosData.afterInit = Chronos.getTable();
Chronos.schedule(0.2, Chronos.initCheck);
end
local recTable = Chronos.getTable();
recTable.func = func;
recTable.args = Chronos.getArgTable(...);
recTable.id = id;
tinsert(ChronosData.afterInit, recTable);
end
end
 
 
------------------------------------------------------------------------------
--[[ Table Recycling ]]--
------------------------------------------------------------------------------
 
function Chronos.getTable(...)
local stack = Chronos.tables;
if (not stack) then
Chronos.tables = {};
stack = Chronos.tables;
return {};
end
local recTable;
if (#stack >= 1) then
recTable = tremove(stack)
else
recTable = {};
end
for i=1, select("#", ...) do
recTable[i] = select(i, ...);
end
return recTable;
end
 
-- Release a table to be nilled and used again.
-- Optionally pass in an unpack(...) as the 2nd arg so that you can return the args:
-- return Chronos.releaseTable(t1, unpack(t1))
function Chronos.releaseTable(t1, ...)
if (type(t1) ~= "table") then
return;
end
 
local stack = Chronos.tables;
if (not stack) then
Chronos.tables = {};
stack = Chronos.tables;
end
 
for k,v in pairs(t1) do
t1[k] = nil;
end
 
tinsert(stack, t1);
return ...;
end
 
 
------------------------------------------------------------------------------
--[[ Helpers Functions ]]--
------------------------------------------------------------------------------
 
function Chronos.getArgTable(...)
if (select('#', ...) == 0) then
return Chronos.emptyTable;
else
return Chronos.getTable(...);
end
end
 
function Chronos.run(func,args)
if(func) then
if(args) then
return func(unpack(args));
else
return func();
end
end
end
 
function Chronos.printError(text)
ChatFrame1:AddMessage(text, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, 1.0, UIERRORS_HOLD_TIME);
end
 
function Chronos.printDebugError(var, text)
if (var) and (getglobal(var)) then
Chronos.printError(text);
end
end
 
------------------------------------------------------------------------------
--[[ Frame Script Helpers ]]--
------------------------------------------------------------------------------
 
function Chronos.chatColorsInit()
ChronosData.chatColorsInitialized = true;
ChronosFrame:UnregisterEvent("UPDATE_CHAT_COLOR");
end
 
function Chronos.initCheck()
if(not ChronosData.initialized) then
if(UnitName("player") and UnitName("player")~=UKNOWNBEING and UnitName("player")~=UNKNOWNBEING and UnitName("player")~=UNKNOWNOBJECT and ChronosData.variablesLoaded and ChronosData.enteredWorld and ChronosData.chatColorsInitialized) then
ChronosData.initialized = true;
Chronos.schedule(1,Chronos.initCheck);
return;
else
Chronos.schedule(0.2,Chronos.initCheck);
return;
end
end
if(ChronosData.afterInit) then
local i = ChronosData.afterInit_i;
if(not i) then
i = 1;
end
ChronosData.afterInit_i = i+1;
--Chronos.printError("afterInit: processing ",i," of ",ChronosData.afterInit.n," initialization functions, id: ",ChronosData.afterInit[i].id);
Chronos.run(ChronosData.afterInit[i].func, ChronosData.afterInit[i].args);
if(i == #ChronosData.afterInit) then
for i,v in ipairs(ChronosData.afterInit) do
Chronos.releaseTable(v);
end
Chronos.releaseTable(ChronosData.afterInit);
ChronosData.afterInit = nil;
ChronosData.afterInit_i = nil;
else
Chronos.schedule(0.1, Chronos.initCheck);
return;
end
end
end
 
--[[
-- Sends a chat command through the standard editbox
--]]
function Chronos.SendChatCommand(command)
local text = ChatFrameEditBox:GetText();
ChatFrameEditBox:SetText(command);
ChatEdit_SendText(ChatFrameEditBox);
ChatFrameEditBox:SetText(text);
end
 
function Chronos.RegisterSlashCommands()
--Needs to be able Variables load if you want to use Sky
local chronosFunc = function(msg)
local _,_,seconds,command = string.find(msg,"([%d\.]+)%s+(.*)");
if(seconds and command) then
Chronos.schedule(seconds,Chronos.SendChatCommand,command);
else
Chronos.printError(SCHEDULE_USAGE1);
Chronos.printError(SCHEDULE_USAGE2);
end
end
if (Satellite) then
Satellite.registerSlashCommand(
{
id = "Schedule";
commands = SCHEDULE_COMM;
onExecute = chronosFunc;
helpText = SCHEDULE_DESC;
replace = true;
}
);
else
SlashCmdList["CHRONOS_SCHEDULE"] = chronosFunc;
for i = 1, #SCHEDULE_COMM do setglobal("SLASH_CHRONOS_SCHEDULE"..i, SCHEDULE_COMM[i]); end
end
end
 
------------------------------------------------------------------------------
--[[ Frame Scripts ]]--
------------------------------------------------------------------------------
 
function Chronos.OnLoad()
Chronos.framecount = 0;
 
if (not ChronosData.byName) then
ChronosData.byName = {};
end
if (not ChronosData.repeating) then
ChronosData.repeating = {};
end
if (not ChronosData.sched) then
ChronosData.sched = {};
end
ChronosData.elapsedTime = 0;
 
Chronos.afterInit(Chronos.RegisterSlashCommands);
end
 
function Chronos.OnEvent()
if(event == "VARIABLES_LOADED") then
ChronosData.variablesLoaded = true;
ChronosFrame:Show();
elseif (event == "PLAYER_ENTERING_WORLD") then
ChronosData.enteredWorld = true;
Chronos.online = true;
elseif (event == "PLAYER_LEAVING_WORLD") then
Chronos.online = false;
elseif ( event == "UPDATE_CHAT_COLOR" ) then
Chronos.scheduleByName("ChronosAfterChatColorInit", 1, Chronos.chatColorsInit);
end
end
 
function Chronos.OnUpdate_Quick()
if ( not Chronos.online ) then
return;
end
if ( not ChronosData.variablesLoaded ) then
return;
end
 
if ( ChronosData.elapsedTime ) then
ChronosData.elapsedTime = ChronosData.elapsedTime + arg1;
else
ChronosData.elapsedTime = arg1;
end
 
-- Execute scheduled tasks that are ready, pulling them off the front of the list queue.
local now = GetTime();
local i;
local task;
while(#ChronosData.sched > 0) do
if (not ChronosData.sched[1].time) then
--Sea.io.printTable(ChronosData.sched[1]);
tremove(ChronosData.sched, 1);
elseif(ChronosData.sched[1].time <= now) then
task = tremove(ChronosData.sched, 1);
Chronos.run(task.handler, task.args);
Chronos.releaseTable(task);
else
break;
end
end
 
-- Execute named scheduled tasks that are ready.
local k,v = next(ChronosData.byName);
local newK, newV;
while (k ~= nil) do
newK,newV = next(ChronosData.byName, k);
if (not v.time) then
--Sea.io.printTable(v);
ChronosData.byName[k] = nil;
elseif (v.time <= now) then
if (v.repeating) then
ChronosData.byName[k].time = now + v.period;
v.handler();
else
Chronos.run(v.handler, v.args);
Chronos.releaseTable(ChronosData.byName[k]);
ChronosData.byName[k] = nil;
end
end
k,v = newK,newV;
end
end
 
function Chronos.OnUpdate_Debug()
if ( not Chronos.online ) then
return;
end
if ( not ChronosData.variablesLoaded ) then
return;
end
local memstart = collectgarbage("count");
 
if ( ChronosData.elapsedTime ) then
ChronosData.elapsedTime = ChronosData.elapsedTime + arg1;
else
ChronosData.elapsedTime = arg1;
end
 
local now = GetTime();
local i;
local task;
-- Execute scheduled tasks that are ready, popping them off the heap.
while(#ChronosData.sched > 0) do
if(ChronosData.sched[1].time <= now) then
task = tremove(ChronosData.sched, 1);
Chronos.run(task.handler, task.args);
Chronos.releaseTable(task);
else
break;
end
end
 
local memend = collectgarbage("count");
if(memend - memstart > 0) then
Chronos.printError("gcmemleak from ChronosData.sched in OnUpdate: "..(memend - memstart));
end
 
-- Execute named scheduled tasks that are ready.
memstart = memend;
local k,v = next(ChronosData.byName);
local newK, newV;
while (k ~= nil) do
newK,newV = next(ChronosData.byName, k);
if(v.time <= now) then
local m = collectgarbage("count");
if (v.repeating) then
ChronosData.byName[k].time = now + v.period;
v.handler();
else
Chronos.run(v.handler, v.args);
Chronos.releaseTable(ChronosData.byName[k]);
ChronosData.byName[k] = nil;
end
local mm = collectgarbage("count");
memstart = memstart + mm - m;
end
k,v = newK,newV;
end
 
memend = collectgarbage("count");
if(memend - memstart > 0) then
Chronos.printError("gcmemleak from ChronosData.byName in OnUpdate: "..(memend - memstart));
end
end
 
------------------------------------------------------------------------------
--[[ Frame Script Assignment ]]--
------------------------------------------------------------------------------
 
--Event Driver
if (not ChronosFrame) then
CreateFrame("Frame", "ChronosFrame");
end
ChronosFrame:Hide();
--Event Registration
ChronosFrame:RegisterEvent("VARIABLES_LOADED");
ChronosFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
ChronosFrame:RegisterEvent("PLAYER_LEAVING_WORLD");
ChronosFrame:RegisterEvent("UPDATE_CHAT_COLOR");
--Frame Scripts
ChronosFrame:SetScript("OnEvent", Chronos.OnEvent);
ChronosFrame:SetScript("OnUpdate", Chronos.OnUpdate_Quick);
--OnLoad Call
Chronos.OnLoad();
 
end
 
DeathSnap/Chronos/localization.ru.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.ru.lua (Russian)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation:
 
if ( GetLocale() == "ruRU" ) then
 
-- Please submit your translation to karlkfi@yahoo.com
 
end
DeathSnap/Chronos/localization.es.lua New file
0,0 → 1,15
--------------------------------------------------
-- localization.es.lua (Spanish)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation: NeKRoMaNT
 
if ( GetLocale() == "esES" ) then
 
-- Chat Configuration
SCHEDULE_COMM = {"/in","/pause","/delay"};
SCHEDULE_DESC = "/in <segundos> <comando> [<args> ...] |cFFCC9966[Nota: /in NO puede realizar hechizos para evitar la creación de bots]|r";
SCHEDULE_USAGE1 = "Uso: /in <segundos> <comando> [<args> ...]";
SCHEDULE_USAGE2 = "Ejecuta <comando> con argumentos <args> tras <segundos> segundos.";
 
end
DeathSnap/Chronos/localization.fr.lua New file
0,0 → 1,15
--------------------------------------------------
-- localization.fr.lua (French)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation: Vjeux, Sasmira
 
if ( GetLocale() == "frFR" ) then
 
-- Chat Configuration
SCHEDULE_COMM = {"/in","/pause","/delay"};
SCHEDULE_DESC = "/in <secondes> <commande> [<args> ...] |cFFCC9966[Note: /in NE PEUT PAS lancer de sorts pour emp\195\170cher la cr\195\169ation de bots]|r";
SCHEDULE_USAGE1 = "Utilisation : /in <secondes> <commande> [<args> ...]";
SCHEDULE_USAGE2 = "Lance la <commande> avec les arguments <args> apr\195\168s <secondes> secondes.";
 
end
\ No newline at end of file
DeathSnap/Chronos/Chronos.toc New file
0,0 → 1,13
## Interface: 30000
## Title: Chronos
## Notes: Embeddable Time Keeping and Scheduling System
## Notes-deDE: Sammlung nützlicher Funktionen zum Zeitmanagement, welche von einigen anderen AddOns verwendet werden.
## Author: Alexander Brazie, Thott, AnduinLothar
## Version: 2.12
## X-Date: Oct 14 2008
## X-Category: Library
## X-Website: http://www.wowinterface.com/downloads/info4328-Chronos.html
## X-Email: karlkfi@yahoo.com
## X-Localizations: enUS, deDE, frFR
## X-CompatibleLocales: enUS, enGB, deDE, frFR
Chronos.xml
\ No newline at end of file
DeathSnap/Chronos/localization.de.lua New file
0,0 → 1,15
--------------------------------------------------
-- localization.de.lua (German)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation: pc, StarDust
 
if ( GetLocale() == "deDE" ) then
 
-- Chat Configuration
SCHEDULE_COMM = {"/in","/pause","/verz\195\182gern"};
SCHEDULE_DESC = "/in <Sekunden> <Befehl> [<Param> ...]";
SCHEDULE_USAGE1 = "Funktionsweise: /in <Sekunden> <Befehl> [<Param> ...] |cFFCC9966[Hinweis: /in KANN KEINE Zauber wirken um die Erstellung von Bots zu verhindern]|r";
SCHEDULE_USAGE2 = "Startet <Befehl> mit den Parametern <Param> nach <Sekunden> Sekunden.";
 
end
\ No newline at end of file
DeathSnap/Chronos/localization.tw.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.tw.lua (Chinese Traditional)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation:
 
if ( GetLocale() == "zhTW" ) then
 
-- Please submit your translation to karlkfi@yahoo.com
 
end
DeathSnap/Chronos/localization.kr.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.kr.lua (Korean)
-- $LastChangedBy: Gryphon $
-- $Date: 2007-02-02 16:41:28 -0600 (Fri, 02 Feb 2007) $
-- Translation:
 
if ( GetLocale() == "koKR" ) then
 
-- Please submit your translation to karlkfi@yahoo.com
 
end
DeathSnap/Chronos Property changes : Added: svn:mergeinfo
DeathSnap/DeathSnap.toc New file
0,0 → 1,16
## Interface: 30000
## Version: 1.0.1
## Title: DeathSnap
## Notes: Automatically snaps a screen shot when you die.
## Notes-zhCN:
## Notes-deDE:
## Notes-esES:
## Notes-frFR:
## Notes-enGB:
## Notes-koKR:
## Notes-ruRU:
## Notes-zhTW:
## OptionalDeps: Chronos, Khaos
## SavedVariablesPerCharacter: DS_Options
## Author: Ryan "Gryphon" Snook
DeathSnap.xml
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.ru.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.ru.lua (Russian)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "ruRU" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.es.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.es.lua (Spanish)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "esES" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.fr.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.fr.lua (French)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "frFR" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.us.lua New file
0,0 → 1,32
--------------------------------------------------
-- localization.us.lua (American English)
-- $LastChangedBy: gryphon $
-- $Date: 2008-10-24 15:50:07 -0700 (Fri, 24 Oct 2008) $
-- Translated: Gryphon
 
--if ( GetLocale() == "enUS" ) then
 
DS_TITLE = "DeathSnap";
DS_INFO = "Automatically snaps a screen shot when you die.";
 
DS_ENABLED = "Enabled";
DS_DISABLED = "Disabled";
DS_VERSION = "Version";
DS_STATUS = "Status";
DS_CLOSEWIN = "Close Windows";
 
DS_MAXIMUM = "Maximum";
DS_MINIMUM = "Minimum";
 
DS_MINMAXSET2 = "%s level set to %s.";
 
DS_CLOSEALL = "Automatically close all windows %s.";
 
DS_HELP_ONOFF = "Enable/Disable DeathSnap.";
DS_HELP_MIN = "Set the minimum level in which DeathSnap is active.";
DS_HELP_MAX = "Set the maximum level in which DeathSnap is active.";
DS_HELP_CLOSEWIN = "Closes all open windows before DeathSnap takes a screen shot.";
DS_HELP_STATUS = "Displays current DeathSnap option settings.";
DS_HELP_VERSION = "Displays version info.";
 
--end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.de.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.de.lua (German)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "deDE" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.gb.lua New file
0,0 → 1,32
--------------------------------------------------
-- localization.gb.lua (British English)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated: Lakar EU-Azshara
 
if ( GetLocale() == "enGB" ) then
 
DS_TITLE = "DeathSnap";
DS_INFO = "Automatically snaps a screen shot when you die.";
 
DS_ENABLED = "Aktiviert";
DS_DISABLED = "Deaktiviert";
DS_VERSION = "Version";
DS_STATUS = "Status";
DS_CLOSEWIN = "Schlie\195\159e Windows";
 
DS_MAXIMUM = "Maximum";
DS_MINIMUM = "Minimum";
 
DS_MINMAXSET2 = "%s Level auf %s gesetzt.";
 
DS_CLOSEALL = "Schlie\195\159e alle Fenster automatisch %s.";
 
DS_HELP_ONOFF = "Aktiviere/Deaktiviere DeathSnap.";
DS_HELP_MIN = "Setzt Minimum-Level in welchem DeathSnap aktiv ist.";
DS_HELP_MAX = "Setzt Maximum-Level in welchem DeathSnap aktiv ist.";
DS_HELP_CLOSEWIN = "Schlie\195\159t alle offnen Fenster, bevor DeathSnap einen Screenshot schie\195\159t.";
DS_HELP_STATUS = "Zeigt derzeitige DeathSnap Optionen.";
DS_HELP_VERSION = "Zeigt Versionsinfo.";
 
end
Property changes : Added: svn:mergeinfo
DeathSnap/localization.tw.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.tw.lua (Chinese Traditional)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "zhTW" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.kr.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.kr.lua (Korean)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "koKR" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/DeathSnap.xml New file
0,0 → 1,36
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
 
<!-- $Id: DeathSnap.xml 984 2008-05-08 16:49:28Z gryphon $ -->
 
<!-- Required Embeddable Libs -->
<Include file="Chronos\Chronos.xml"/>
 
<!-- Default Localization -->
<Script file="localization.us.lua"/>
 
<!-- Secondary Localizations -->
<Script file="localization.cn.lua"/>
<Script file="localization.de.lua"/>
<Script file="localization.fr.lua"/>
<Script file="localization.gb.lua"/>
<Script file="localization.kr.lua"/>
<Script file="localization.ru.lua"/>
<Script file="localization.es.lua"/>
<Script file="localization.tw.lua"/>
 
<!-- Scripts -->
<Script file="DeathSnap.lua"/>
 
<!-- Frames -->
<Frame name="DeathSnap" hidden="true">
<Scripts>
<OnLoad>
DS_On.Load();
</OnLoad>
<OnEvent>
DS_On.Event(event);
</OnEvent>
</Scripts>
</Frame>
 
</Ui>
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/DeathSnap.lua New file
0,0 → 1,323
--------------------------------------------------------------------------
-- DeathSnap.lua
--------------------------------------------------------------------------
--[[
 
-- Author
Ryan "Gryphon" Snook (rsnook@gmail.com)
"Allied Tribal Forces" of "US - Mal'Ganis - Alliance".
www.AlliedTribalForces.com
 
-- Request
Please do not re-release this AddOn as "Continued", "Resurrected", etc...
if you have updates/fixes/additions for it, please contact me. If I am
no longer active in WoW I will gladly pass on the maintenance to someone
else, however until then please assume I am still active in WoW.
 
-- AddOn Description
Automatically snaps a screen shot when you die.
 
-- Dependencies
Chronos - Embedded
Khaos - Optional
 
-- Changes
1.0.1 - Level Cap 80
1.0.0 - Initial Release
 
-- SVN info
$Id: DeathSnap.lua 1056 2008-10-24 22:50:07Z gryphon $
$Rev: 1056 $
$LastChangedBy: gryphon $
$Date: 2008-10-24 15:50:07 -0700 (Fri, 24 Oct 2008) $
 
]]--
 
DS_Setting = {
Version = GetAddOnMetadata("DeathSnap", "Version");
Revision = tonumber(strsub("$Rev: 1056 $", 7, strlen("$Rev: 1056 $") - 2));
}
 
DS_Options = {
Active = 1;
MinLevel = 1;
MaxLevel = 80;
CloseWindows = 0;
}
 
DS_On = {
 
Load = function()
 
DS_Register.RegisterEvent("UNIT_DIED")
DS_Register.RegisterEvent("PLAYER_DEAD")
 
if (Khaos) then
DS_Register.Khaos();
else
DS_Register.SlashCommands()
end
 
end;
 
Event = function(event)
 
if ( ( event == "UNIT_DIED" or event == "PLAYER_DEAD" ) and DS_Options.Active == 1 ) then
if (UnitLevel("player") >= DS_Options.MinLevel and UnitLevel("player") <= DS_Options.MaxLevel) then
if (DS_Options.CloseWindows == 1) then
CloseAllWindows()
RequestTimePlayed()
DS_Function.TakeScreenshot()
else
RequestTimePlayed()
DS_Function.TakeScreenshot()
end
end
end
 
end;
 
}
 
DS_Register = {
 
RegisterEvent = function(event)
this:RegisterEvent(event)
end;
 
SlashCommands = function()
SLASH_DS_HELP1 = "/ds";
SLASH_DS_HELP2 = "/deathsnap";
SlashCmdList["DS_HELP"] = DS_Command;
end;
 
Khaos = function()
local version = DS_Setting.Version.."."..DS_Setting.Revision
 
local optionSet = {
id = "DeathSnap";
text = function() return DS_TITLE end;
helptext = function() return DS_INFO end;
difficulty = 1;
default = true;
callback = function(checked)
DS_Options.Active = checked and 1 or 0;
end;
options = {
{
id = "Header";
text = function() return DS_TITLE.." "..DS_Color.Green("v"..version) end;
helptext = function() return DS_INFO end;
type = K_HEADER;
difficulty = 1;
};
 
{
id="DS_MinLevel";
type = K_SLIDER;
text = function() return DS_MINIMUM end;
helptext = function() return DS_HELP_MIN end;
difficulty = 1;
feedback = function(state)
return string.format(DS_MINMAXSET2, DS_MINIMUM, state.slider);
end;
callback = function(state)
if (state.slider >= DS_Options.MaxLevel) then
Khaos.setSetKeyParameter("DeathSnap","DS_MaxLevel", "slider", state.slider);
Khaos.refresh(false, false, true);
end;
DS_Options.MinLevel = state.slider;
end;
default = { checked = true; slider = 1 };
disabled = { checked = false; slider = 1 };
setup = {
sliderMin = 1;
sliderMax = 80;
sliderStep = 1;
sliderDisplayFunc = function(val)
return val;
end;
};
};
 
 
{
id="DS_MaxLevel";
type = K_SLIDER;
text = function() return DS_MAXIMUM end;
helptext = function() return DS_HELP_MAX end;
difficulty = 1;
feedback = function(state)
return string.format(DS_MINMAXSET2, DS_MAXIMUM, state.slider);
end;
callback = function(state)
if (state.slider <= DS_Options.MinLevel) then
Khaos.setSetKeyParameter("DeathSnap","DS_MinLevel", "slider", state.slider);
Khaos.refresh(false, false, true);
end;
DS_Options.MaxLevel = state.slider;
end;
default = { checked = false; slider = 80 };
disabled = { checked = false; slider = 80 };
setup = {
sliderMin = 1;
sliderMax = 80;
sliderStep = 1;
sliderDisplayFunc = function(val)
return val;
end;
};
};
 
{
id = "DS_CloseWindows";
type = K_TEXT;
text = function() return DS_CLOSEWIN end;
helptext = function() return DS_HELP_CLOSEWIN end;
difficulty = 1;
feedback = function(state)
if (state.checked) then
return string.format(DS_CLOSEALL, DS_ENABLED);
else
return string.format(DS_CLOSEALL, DS_DISABLED);
end
end;
callback = function(state)
if (state.checked) then
DS_Options.CloseWindows = 1;
else
DS_Options.CloseWindows = 0;
end
end;
check = true;
default = { checked = false };
disabled = { checked = true };
};
 
{
id = "DS_Status";
type = K_BUTTON;
text = function() return DS_STATUS end;
helptext = function() return DS_HELP_STATUS end;
difficulty = 1;
callback = function(state)
DS_Out.Status()
end;
feedback = function(state) end;
setup = { buttonText = function() return DS_STATUS end; };
};
 
};
};
Khaos.registerOptionSet(
"other",
optionSet
);
 
end;
 
}
 
DS_Function = {
 
TakeScreenshot = function()
Chronos.schedule(1, TakeScreenshot)
end;
 
}
 
DS_Out = {
 
Print = function(msg)
local color = NORMAL_FONT_COLOR;
DEFAULT_CHAT_FRAME:AddMessage(DS_TITLE..": "..msg, color.r, color.g, color.b)
end;
 
Status = function()
local active = DS_Color.Green(DS_ENABLED)
local closeall = DS_Color.Green(DS_ENABLED)
 
if (DS_Options.Active == 0) then
active = DS_Color.Red(DS_DISABLED)
end
if (DS_Options.CloseWindows == 0) then
closeall = DS_Color.Red(DS_DISABLED)
end
 
DS_Out.Print("AddOn "..active..". "..string.format(DS_MINMAXSET2, DS_MINIMUM, DS_Color.Green(DS_Options.MinLevel)).." "..string.format(DS_MINMAXSET2, DS_MAXIMUM, DS_Color.Green(DS_Options.MaxLevel)).." "..string.format(DS_CLOSEALL, closeall))
end;
 
Version = function()
local version = DS_Setting.Version.."."..DS_Setting.Revision
DS_Out.Print(DS_VERSION..": "..DS_Color.Green(version))
end;
 
}
 
DS_Color = {
 
Green = function(msg)
return "|cff00cc00"..msg.."|r";
end;
 
Red = function(msg)
return "|cffff0000"..msg.."|r";
end;
 
}
 
DS_Command = function(msg)
 
local cmd = string.lower(msg)
 
if (cmd == "" or cmd == "help") then
DS_Out.Print("/ds on|off, "..DS_HELP_ONOFF)
DS_Out.Print("/ds min #, "..DS_HELP_MIN)
DS_Out.Print("/ds max #, "..DS_HELP_MAX)
DS_Out.Print("/ds closewin on|off, "..DS_HELP_CLOSEWIN)
DS_Out.Print("/ds status, "..DS_HELP_STATUS)
DS_Out.Print("/ds version, "..DS_HELP_VERSION)
end
 
if (cmd == "version") then
DS_Out.Version()
end
 
if (cmd == "status") then
DS_Out.Status()
end
 
if (cmd == "on") then
DS_Options.Active = 1;
DS_Out.Print(DS_Color.Green(DS_ENABLED))
end
 
if (cmd == "off") then
DS_Options.Active = 0;
DS_Out.Print(DS_Color.Red(DS_DISABLED))
end
 
if (strsub(msg, 1, 3) == "min") then
local num = tonumber(strsub(msg, 4))
DS_Options.MinLevel = num;
DS_Out.Print(string.format(DS_MINMAXSET2, DS_MINIMUM, DS_Color.Green(num)))
end
 
if (strsub(msg, 1, 3) == "max") then
local num = tonumber(strsub(msg, 4))
DS_Options.MaxLevel = num;
DS_Out.Print(string.format(DS_MINMAXSET2, DS_MAXIMUM, DS_Color.Green(num)))
end
 
if (strsub(msg, 1, 8) == "closewin") then
local state = strsub(msg, 10)
if (state == "on") then
DS_Options.CloseWindows = 1;
DS_Out.Print(string.format(DS_CLOSEALL, DS_ENABLED))
elseif (state == "off") then
DS_Options.CloseWindows = 0;
DS_Out.Print(string.format(DS_CLOSEALL, DS_DISABLED))
end
end
 
end;
\ No newline at end of file Property changes : Added: svn:mergeinfo
DeathSnap/localization.cn.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.cn.lua (Chinese)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "zhCN" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file Property changes : Added: svn:mergeinfo