WoWInterface SVN DeathSnap

Compare Revisions

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

Rev 2 → Rev 3

trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/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
trunk/localization.gb.lua New file
0,0 → 1,11
--------------------------------------------------
-- localization.gb.lua (British English)
-- $LastChangedBy: gryphon $
-- $Date: 2008-05-08 09:49:28 -0700 (Thu, 08 May 2008) $
-- Translated:
 
if ( GetLocale() == "enGB" ) then
 
-- Please submit your translation to rsnook@gmail.com
 
end
\ No newline at end of file
trunk/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