/trunk
## Interface: 30200 |
## Interface: 30100 |
## Title: PVP Timer |
## Notes: Displays the pvp flag time remaining in its own window, or via LDB. |
## Dependencies: EMLib |
Readme for PVP Timer, a World of Warcraft Mod. |
---- |
Version 0.02b |
Version 0.1b |
PVP Timer by EVmaker |
A simple mod to display the remaining time left on the players flagged PVP timer either in its own window, |
* Eliminate any bugs (if any) |
---------------------------------------------------------------------- |
Changelog: |
0.02b: |
3.2 Compatibility and TOC Update. Essentially just an update for the TOC, so that 'load out of date addons' does not need to be |
checked, since PVPTimer was 3.2 Compatible already. |
0.01b: |
Initial release, has the PVP Timer window which displays the time remaining on your pvp counter, colored by faction (red and yellow |
for horde, blue and yellow for alliance). Slash options for whether to show the window constantly (/pvpt toggle window) and to turn |
--[[ |
PVP Timer 0.02b by EVmaker |
PVP Timer 0.01b by EVmaker |
A simple mod to display the remaining time left on the players flagged PVP timer either in its own window, |
or in a LDB Displayer (Titan, Fubar, etc..) |
local debugMode = false; |
local PVPT_updateInterval = 1.0; |
local PVPT_defaultSettings = { |
["Version"] = "0.02b", |
["Version"] = "0.01b", |
["OnOff"] = true, |
["ShowWindow"] = true |
} |
-- Declare the global variables |
PVPT_whatTimer = "wait"; |
PVPT_Settings = { |
["Version"] = "0.02b"; |
["Version"] = "0.01b"; |
["OnOff"] = true, |
["ShowWindow"] = true |
} |
--[[ |
EV's Mod Library by EVmaker, v0.09: |
EV's Mod Library by EVmaker, v0.08: |
After getting tired of copying often used functions (such as printing to chat) over and over after each mod I work on, |
I decided to move all the most commonly used functions into a general library which I can have as a dependency for |
]]-- |
-- Declares the locals |
local EML_Version = "0.09"; |
local EML_Version = "0.08"; |
local debugMode = false; |
local EML_supportedMods = { |
["Looter"] = true, |
return itemPrice; |
end |
-- Gets item tooltip information |
function EML_toolInfo(arg,from) |
local itemLink; |
local itemArray; |
if (GameTooltip:IsShown()) then |
local name; |
name, itemLink = GameTooltip:GetItem(); |
elseif (ItemRefTooltip:IsShown()) then |
local name; |
name, itemLink = ItemRefTooltip:GetItem(); |
end |
if (itemLink) then |
itemArray = EML_getInfo(itemLink); |
end |
if (itemLink) then |
if (arg == "info") then |
EMLChat(tostring(itemLink)..", ID: "..itemArray["ID"]..", Stack Size: "..itemArray["StackCount"],"chat",from) |
else |
return itemArray; |
end |
else |
EMLChat("ID Failed.","chat",from) |
return nil; |
end |
end |
-- Returns GetItemInfo in a easily accessible table |
function EML_getInfo(arg) |
local itemArray; |
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemPrice = GetItemInfo(arg) |
if (itemName) then |
local _,itemID = EML_Parser(itemLink); |
itemArray = { |
["Name"] = itemName, |
["ID"] = itemID, |
["Link"] = itemLink, |
["Rarity"] = itemRarity, |
["ILevel"] = itemLevel, |
if (what == "new") then |
table.insert(where,"StartDontRemove") |
else |
if (type(where) == "table") then |
for index,value in pairs(where) do |
if (type(index) == "number") then |
table.insert(where,what) |
return true; |
elseif (type(index) == "string") then |
where[theValue] = true; |
return true; |
end |
for index,value in pairs(where) do |
if (type(index) == "number") then |
table.insert(where,what) |
return nil; |
elseif (type(index) == "string") then |
where[theValue] = true |
return nil; |
end |
table.insert(where,what) |
return true; |
else |
if (debugMode) then EMLChat("Not given a table.","chat","EML","red") end |
end |
end |
end |
end |
end |
for index,value in pairs(where) do |
if (index == what) then |
where[index]=nil; |
if (value == true) then |
if (index == what) then |
where[index]=nil; |
end |
end |
end |
end |
-- Copies a table for safe resetting or other uses |
function EML_copyTable(arg) |
local newTable; |
if (type(arg) == "table") then |
newTable = {}; |
for index,value in pairs(arg) do |
newTable[index] = value; |
end |
local newTable = {}; |
for index,value in pairs(arg) do |
newTable[index] = value; |
end |
return newTable; |
end |
isFound=true; |
end |
end |
else |
if (debugMode) then EMLChat("No table for FindTable","chat","EML") end |
end |
return isFound; |
end |
end |
end |
-- Sets a table value |
function EML_setTable(what,where,to) |
if (type(to) == "table") then |
for index,value in pairs(to) do |
if (where == index) then |
to[where] = what; |
elseif (where == value) then |
to[index] = what |
end |
end |
else |
if (debugMode) then EMLChat("No table for SetTable","chat","EML") end |
end |
end |
-- Makes sure settings are in one array from another array |
function EML_mergeTable(arrayTo,arrayFrom) |
local newArray; |
return version, build, tocversion; |
end |
-- Prints or returns the current WoW zone information |
function EML_zoneInfo(what,where) |
local zoneName = tostring(GetZoneText()); |
local subZoneName = tostring(GetSubZoneText()); |
end |
if (debugMode) then |
for i=0, #(bagsName) do |
EMLChat("Bag Name: "..tostring(bagsName[i])..", Bag Type: "..tostring(bagsType[i])..", Bag Slots: "..tostring(bagsSlots[i])..", Free Slots: "..tostring(bagsFree[i]),"chat",where) |
EMLChat("Bag Name: "..tostring(bagsName[i])..", Bag Type: "..(bagsType[i])..", Bag Slots: "..tostring(bagsSlots[i])..", Free Slots: "..tostring(bagsFree[i]),"chat",where) |
end |
end |
return bagsName,bagsType,bagsSlots,bagsFree; |
## Interface: 30200 |
## Interface: 30100 |
## Title: EMLib |
## Notes: EV's Mod Library, contains commonly used functions across his mods. |
## Author: EVmaker |