Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ["Setting"] = {
- ["track"] = "Water Shield",
- ["duration"] = {
- ["minimum"] = {
- ["enabled"] = 1,
- ["value"] = 50,
- },
- ["maximum"] = {
- },
- },
- ["stack"] = {
- ["minimum"] = {
- },
- ["maximum"] = {
- ["enabled"] = 1,
- ["value"] = 2,
- },
- },
- }
- function loadSettings()
- local options = { 'duration', 'stack' }
- for i=1, #options do
- local option = options[i]
- if not db[option] then
- db[option] = { minimum = {}, maximum = {} }
- end
- local enabled
- local value
- enabled = db[option].minimum.enabled
- if (enabled) then _G["min"..option].cbutton:SetChecked(1) else _G["min"..option].cbutton:SetChecked(0) end
- value = db[option].minimum.value
- if (value) then _G["min"..option].ebox:SetText(value) else _G["min"..option].ebox:SetText("