Compare commits

..

35 Commits

Author SHA1 Message Date
SabinDeus
9c0705f2d3 Update TOC for 12.1. Handle secret values in one of the places they might exist. 2026-08-07 23:37:50 -04:00
SabinDeus
4b1a1af6b3 Consolidate TOCs and update compatible versions. Delete old and deprecated code no longer in use by any live version of WoW. 2026-02-07 16:03:18 -05:00
SabinDeus
5e84b90850 Updated TOC for 12.0 beta and 11.2.7 live 2025-11-25 18:42:10 -05:00
SabinDeus
a6f5433efc Updating TOC files 2024-07-12 19:48:31 -04:00
SabinDeus
cc1e393bfc Fix for 10.0.7 SelectGossipOption removal
TOC bump
2023-04-07 20:14:29 -04:00
SabinDeus
14d9f35361 Fixes for QuestUtil usage in Classic 2023-02-16 19:22:40 -05:00
SabinDeus
d269a24967 TOC bumps 2023-01-29 17:57:35 -05:00
SabinDeus
4f03bdf323 Fix Gossip option ordering (entries generated during the last releases since 10.0 may need to be deleted and readded)
Fix for Classic 3.4.1 API Updates
2023-01-29 17:56:17 -05:00
SabinDeus
000e731fbc Dynamically generate Priority Frames, fixing 16 option limit 2023-01-02 01:52:56 -05:00
SabinDeus
5c4bf53d17 Fixing bugs introduced by 10.0 changes as well as a long-standing QuestFrame manipulation bug 2022-11-07 21:47:13 -05:00
SabinDeus
027447cfa6 10.0: API changes and XML XSD adherence 2022-10-26 23:37:50 -04:00
SabinDeus
ed06ca0f3d Merge branch 'master' of ssh://git.sabindeus.com:43043/sabin/turn-in 2022-10-26 23:36:59 -04:00
SabinDeus
e7d369fa25 Refactoring select API functions based on game version (retail/classic) 2022-09-11 16:41:00 -04:00
SabinDeus
4ce1a4be30 Refactoring select API functions based on game version (retail/classic) 2022-09-11 16:30:19 -04:00
SabinDeus
a78b31dba9 Backdrop fixes and TOC bump for 9.1.5 2021-11-15 22:09:17 -05:00
SabinDeus
8efe5dcbf3 GossipQuestInfo API bugfixes and incomplete Active Quest ignores 2021-01-13 00:37:20 -05:00
SabinDeus
47a99070cf 9.0 updates and TOC bump 2020-10-11 03:21:22 -04:00
SabinDeus
2eb3b298ce Updating TOC to 80000 2018-08-12 21:53:30 +00:00
SabinDeus
2b9a01000f Quest functions changed return lists again 2016-08-13 15:24:34 +00:00
SabinDeus
37c3143f19 Updated toc to 70000 2016-07-31 13:57:57 +00:00
SabinDeus
755013fa82 Updating interface version 2015-06-26 22:46:44 +00:00
SabinDeus
26bfd93ccd Removed reference to old frame that no longer exists in 6.0. Updated TOC to 60000 2014-10-18 20:29:55 +00:00
SabinDeus
ef3f6d6f91 updated TOC
fixed gossip selection bug
2012-08-28 05:50:38 +00:00
SabinDeus
938033ded7 fixed long standing fontstring alpha bug
fixed calls to getgossip...quests for 5.0
fixed repeated npc interact bug on QUEST_PROGRESS for 5.0
updated TOC
2012-08-27 23:41:42 +00:00
SabinDeus
6ca6548640 bumped TOC for 4.0 2010-10-14 16:56:15 +00:00
SabinDeus
43ff4d9aa0 event handler regression 2010-09-09 04:28:37 +00:00
SabinDeus
e80f696ac7 updated for cataclysm 2010-09-09 04:20:16 +00:00
SabinDeus
5d9f11120a no message 2010-09-09 01:53:19 +00:00
SabinDeus
d9b2913ea5 updated toc for curseforge compatible tag 2010-09-09 01:47:23 +00:00
SabinDeus
406dba10af new toc 2010-09-09 01:38:02 +00:00
SabinDeus
cd7ba55c82 fixes for 3.3.3 function return values change and additional features 2010-09-09 01:34:50 +00:00
SabinDeus
b5332e43de updated TOC 2010-02-07 18:16:21 +00:00
SabinDeus
9bf1ccc2f9 updated TOC 2010-02-07 18:11:24 +00:00
SabinDeus
93512b01dd fixed bug with return values of GetGossipQuests 2010-02-07 18:07:04 +00:00
SabinDeus
8ca09a66ce lol forgot the toc 2008-10-18 07:22:52 +00:00
7 changed files with 1951 additions and 1962 deletions

0
.gitignore vendored Executable file
View File

View File

@ -1,52 +1,33 @@
Turn In Turn In
v2.0 v2.3
by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance) by Sabindeus of Terenas
DESCRIPTION DESCRIPTION
------------- -------------
An add-on that automates the clicking of Quests and NPC Gossip dialogues. An add-on that automates the clicking of Quests and NPC Gossip dialogues.
HOW TO USE HOW TO USE
------------- -------------
To bring up the Options window, type /ti window. To bring up the Options window, type /ti window.
To bring up the Recently Visited NPCs window, type /ti templist. To bring up the Recently Visited NPCs window, type /ti templist.
Turn In keeps an NPC database, to allow you to customize your interactions on a per-NPC basis. Whenever you talk to an NPC, it appears in your Recently Visited NPCs window. From there you can decide if you want to add it to the Database so you can customize his options. Simply click the '+' button to add the NPC to the DB. Turn In keeps an NPC database, to allow you to customize your interactions on a per-NPC basis. Whenever you talk to an NPC, it appears in your Recently Visited NPCs window. From there you can decide if you want to add it to the Database so you can customize his options. Simply click the '+' button to add the NPC to the DB.
After Adding an NPC, you can check the checkbox next to its name in the NPC list and then rearrange or activate/deactive his options to your liking. If you uncheck the checkbox next to an NPC's name, it will use the default option set. If you want Turn In to specifically take no action for an NPC, simply deactivate all of his options, don't uncheck his checkbox in the NPC list! After Adding an NPC, you can check the checkbox next to its name in the NPC list and then rearrange or activate/deactive his options to your liking. If you uncheck the checkbox next to an NPC's name, it will use the default option set. If you want Turn In to specifically take no action for an NPC, simply deactivate all of his options, don't uncheck his checkbox in the NPC list!
When an NPC does not appear in the Database, Turn In uses the default option set to resolve interactions with it. You can customize the default option set by not having an NPC selected in the options window. The Use Default Settings checkbox determines whether talking to NPC not in the Database will use the default options or do nothing at all. The Automatically Add NPCs checkbox will cause all of your new NPC visits to automatically add the NPC to your NPC DB. When an NPC does not appear in the Database, Turn In uses the default option set to resolve interactions with it. You can customize the default option set by not having an NPC selected in the options window. The Use Default Settings checkbox determines whether talking to NPC not in the Database will use the default options or do nothing at all. The Automatically Add NPCs checkbox will cause all of your new NPC visits to automatically add the NPC to your NPC DB.
COMMAND SUMMARY COMMAND SUMMARY
------------- -------------
/turnin or /ti - basic slash command, shows help message /turnin or /ti - basic slash command, shows help message
/turnin on - Turns on the mod, from now on all quests will be automatically chosen and completed. Additionally, any available quests will be accepted, and gossip options will be automatically chosen. /turnin on - Turns on the mod, from now on all quests will be automatically chosen and completed. Additionally, any available quests will be accepted, and gossip options will be automatically chosen.
/turnin off - Deactivates the mod /turnin off - Deactivates the mod
/turnin toggle - Activates or deactivates the mod /turnin toggle - Activates or deactivates the mod
/turnin window - Shows the options window /turnin window - Shows the options window
/turnin recent - Shows the recently visited NPCs window /turnin recent - Shows the recently visited NPCs window
CHANGE LOG Please send bug reports, questions or comments to sabin@sabindeus.com
-------------
v2.0 - Logic rewrite and added a real GUI for the new NPC DB. Updated for WoW 2.0.
v1.3 - Greedy mode now actually works properly... I think. More to come! :/
v1.2 - Added Saved Variables. Turn In status now persists. Turn In now selects active quests and gossip options as well as available quests. Greedy mode lets you select an option regardless of if the one you wanted is availble.
v1.1 - Fixed "bug" regarding Duke Nicholas Zverenhoff (and possibly other NPCs). Was more of a sloppy omission than a bug really.
v1.0a - Added toggle function
v1.0 - Initial Release
Special Thanks to Florrail for beta testing like a pro!
Please send bug reports, questions or comments to Sabin1936@mac.com
Thank you for downloading my add-on!

1449
TurnIn.lua Normal file → Executable file

File diff suppressed because it is too large Load Diff

13
TurnIn.toc Normal file → Executable file
View File

@ -1,6 +1,7 @@
## Interface: 20003 ## Interface: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
## Title: Turn In ## X-Compatible-With: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
## Description: Automates the selection of quest and gossip options. ## Title: Turn In
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex ## Notes: Automates the selection of quest and gossip options.
## Version: 2.0rc7 ## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
TurnIn.xml ## Version: 2.2
TurnIn.xml

1821
TurnIn.xml Normal file → Executable file

File diff suppressed because it is too large Load Diff

544
TurnInUI.lua Normal file → Executable file
View File

@ -1,272 +1,272 @@
function TI_PopulateOptions(arg) local TI_OptionsPriorityFramePool = {};
TI_debug(arg); local TI_OptionsPriorityFramePoolMax = 0;
local CurrOpts;
local last=1; local function TI_GetOptionsPriorityFrame(idx)
if(TI_status and TI_status.options) then if idx > TI_OptionsPriorityFramePoolMax then
if(TI_LoadedNPCIndex > 0) then for i=TI_OptionsPriorityFramePoolMax+1, idx, 1 do
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]]; local frame = CreateFrame("Button", "TI_OptionsPriority"..i,
else getglobal("TI_OptionsPriority"), "TI_PriorityList", i);
CurrOpts = TI_status.options; if i == 1 then
end frame:SetPoint("TOPLEFT", 0, 0);
else
for i,v in ipairs(CurrOpts) do frame:SetPoint("TOPLEFT", "TI_OptionsPriority"..i-1, "BOTTOMLEFT", 0, 0);
local entry = "TI_OptionsPriority" .. i; end
local entrybutton = getglobal(entry); frame:Hide();
local entrytext = getglobal("TI_OptionsPriority"..i.."_Text"); table.insert(TI_OptionsPriorityFramePool, i, frame);
local iconpath; TI_OptionsPriorityFramePoolMax = TI_OptionsPriorityFramePoolMax + 1;
if(v.name == nil) then TI_debug("oh noes") end; end
entrytext:SetText(v.name); end
if(v.type == "activequest") then return TI_OptionsPriorityFramePool[idx];
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon"; end
elseif(v.type == "availquest") then
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon"; local function TI_HideUnusedOptionFrames(last)
else for i=last, TI_OptionsPriorityFramePoolMax, 1 do
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon"; TI_OptionsPriorityFramePool[i]:Hide();
end end
getglobal(entry .. "_Icon"):SetTexture(iconpath); end
getglobal(entry .. "_Check"):SetChecked(v.state);
entrytext:SetWidth(156); --make sure to change this if you change the anchors in the XML function TI_PopulateOptions(arg)
entrybutton:SetHeight( entrytext:GetHeight() + 6); TI_debug(arg);
entrybutton:Show(); local CurrOpts;
last = last+1; local last=1;
end if(TI_status and TI_status.options) then
for j=last, 16, 1 do if(TI_LoadedNPCIndex > 0) then
getglobal("TI_OptionsPriority" .. j):Hide(); CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
end else
TI_OptionsPriorityScrollFrame:SetVerticalScroll(0); CurrOpts = TI_status.options;
TI_OptionsPriorityScrollFrame:UpdateScrollChildRect(); end
TI_StatusIndicatorUpdate();
end for i,v in ipairs(CurrOpts) do
TI_NPCListScrollBarUpdate(); local entrybutton = TI_GetOptionsPriorityFrame(i);
TI_SettingCheckboxUpdate(); local icon, entrytext = entrybutton:GetRegions();
end local checkbox = entrybutton:GetChildren();
local iconpath;
--[[ if(v.name == nil) then TI_debug("oh noes") end;
function TI_PopulateOptions(arg) entrytext:SetText(v.name);
TI_debug(arg); if(v.type == "activequest") then
if(TI_status and TI_status.options) then if(v.icon) then
for i,v in ipairs(TI_status.options) do iconpath = v.icon;
local entry = "TI_OptionsPriority" .. i; else
local iconpath; iconpath = "Interface/GossipFrame/ActiveQuestIcon";
if(v.name == nil) then TI_debug("oh noes") end; end
if(getglobal(entry .. "_Text") == nil) then TI_debug("wtf "..entry .. "_Text") end; elseif(v.type == "availquest") then
getglobal(entry .. "_Text"):SetText(v.name); if(v.icon) then
if(v.type == "activequest") then iconpath = v.icon;
iconpath = "Interface\\GossipFrame\\ActiveQuestIcon"; else
elseif(v.type == "availquest") then iconpath = "Interface/GossipFrame/AvailableQuestIcon";
iconpath = "Interface\\GossipFrame\\AvailableQuestIcon"; end
else else
iconpath = "Interface\\GossipFrame\\" .. v.type .. "GossipIcon"; if(v.icon) then
end iconpath = v.icon;
getglobal(entry .. "_Icon"):SetTexture(iconpath); else
getglobal(entry .. "_Check"):SetChecked(v.state); iconpath = "Interface/GossipFrame/" .. v.type .. "GossipIcon";
getglobal(entry):Show(); end
end end
end icon:SetTexture(iconpath);
TI_NPCListScrollBarUpdate(); checkbox:SetChecked(v.state);
end entrytext:SetWidth(156); --make sure to change this if you change the anchors in the XML
]]-- entrybutton:SetHeight( entrytext:GetHeight() + 6);
entrybutton:Show();
function TI_NPCListScrollBarUpdate() last = last+1;
if(TI_NPCIndex) then end
FauxScrollFrame_Update(TI_NPCListScrollFrame,table.getn(TI_NPCIndex),8,20); TI_HideUnusedOptionFrames(last);
-- arg2 is max entries, arg3 is number of lines, arg4 is pixel height of each line
TI_OptionsPriorityScrollFrame:SetVerticalScroll(0);
local line; -- 1 through 8 of our window to scroll TI_OptionsPriorityScrollFrame:UpdateScrollChildRect();
local lineplusoffset; -- an index into our data calculated from the scroll offset TI_StatusIndicatorUpdate();
local offset = FauxScrollFrame_GetOffset(TI_NPCListScrollFrame); end
local i=1; TI_NPCListScrollBarUpdate();
local j=1; TI_SettingCheckboxUpdate();
--~ for k, v in pairs(TI_NPCDB) do end
--~ if(offset <= i and i < offset+8) then
--~ if(i <= table.getn(TI_NPCDB)) then
--~ getglobal("TI_OptionsNPCContainer"..j.."_Text"):SetText(k); function TI_NPCListScrollBarUpdate()
--~ getglobal("TI_OptionsNPCContainer"..j.."_Check"):SetChecked(v.state); if(TI_NPCIndex) then
--~ getglobal("TI_OptionsNPCContainer"..j):Show(); FauxScrollFrame_Update(TI_NPCListScrollFrame,table.getn(TI_NPCIndex),8,20);
--~ else -- arg2 is max entries, arg3 is number of lines, arg4 is pixel height of each line
--~ getglobal("TI_OptionsNPCContainer"..j):Hide();
--~ end local line; -- 1 through 8 of our window to scroll
--~ j = j + 1; local lineplusoffset; -- an index into our data calculated from the scroll offset
--~ end local offset = FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
--~ i = i + 1; local i=1;
--~ end local j=1;
for line=1,8 do for line=1,8 do
lineplusoffset = line + FauxScrollFrame_GetOffset(TI_NPCListScrollFrame); lineplusoffset = line + FauxScrollFrame_GetOffset(TI_NPCListScrollFrame);
if(lineplusoffset <= table.getn(TI_NPCIndex)) then if(lineplusoffset <= table.getn(TI_NPCIndex)) then
getglobal("TI_OptionsNPCContainer"..line):SetID(lineplusoffset); getglobal("TI_OptionsNPCContainer"..line):SetID(lineplusoffset);
getglobal("TI_OptionsNPCContainer"..line.."_Text"):SetText(TI_NPCIndex[lineplusoffset]); getglobal("TI_OptionsNPCContainer"..line.."_Text"):SetText(TI_NPCIndex[lineplusoffset]);
getglobal("TI_OptionsNPCContainer"..line.."_Check"):SetChecked(TI_NPCDB[TI_NPCIndex[lineplusoffset]].state); getglobal("TI_OptionsNPCContainer"..line.."_Check"):SetChecked(TI_NPCDB[TI_NPCIndex[lineplusoffset]].state);
if(lineplusoffset == TI_LoadedNPCIndex) then if(lineplusoffset == TI_LoadedNPCIndex) then
getglobal("TI_OptionsNPCContainer"..line):LockHighlight(); getglobal("TI_OptionsNPCContainer"..line):LockHighlight();
else else
getglobal("TI_OptionsNPCContainer"..line):UnlockHighlight(); getglobal("TI_OptionsNPCContainer"..line):UnlockHighlight();
end end
getglobal("TI_OptionsNPCContainer"..line):Show(); getglobal("TI_OptionsNPCContainer"..line):Show();
else else
getglobal("TI_OptionsNPCContainer"..line):Hide(); getglobal("TI_OptionsNPCContainer"..line):Hide();
end end
end end
end end
end end
function TI_SelectNPCIndex() function TI_SelectNPCIndex(self)
local index = this:GetID(); local index = self:GetID();
if(TI_LoadedNPCIndex == index) then if(TI_LoadedNPCIndex == index) then
TI_LoadedNPCIndex = 0; TI_LoadedNPCIndex = 0;
else else
TI_LoadedNPCIndex = index; TI_LoadedNPCIndex = index;
end end
TI_PopulateOptions("select npc"); TI_PopulateOptions("select npc");
end end
function TI_DeleteNPCIndex() function TI_DeleteNPCIndex(self)
local index = this:GetParent():GetID(); local index = self:GetParent():GetID();
TI_DeleteNPC(index); TI_DeleteNPC(index);
if(TI_LoadedNPCIndex == index) then if(TI_LoadedNPCIndex == index) then
TI_LoadedNPCIndex = 0; TI_LoadedNPCIndex = 0;
end end
TI_PopulateOptions("npclist update"); TI_PopulateOptions("npclist update");
end end
function TI_NPCToggle() function TI_NPCToggle(self)
local index = this:GetParent():GetID(); local index = self:GetParent():GetID();
TI_NPCDB[TI_NPCIndex[index]].state = this:GetChecked(); TI_NPCDB[TI_NPCIndex[index]].state = self:GetChecked();
if(TI_NPCDB[TI_NPCIndex[index]].state) then if(TI_NPCDB[TI_NPCIndex[index]].state) then
TI_LoadedNPCIndex = index; TI_LoadedNPCIndex = index;
else else
if(TI_LoadedNPCIndex == index) then if(TI_LoadedNPCIndex == index) then
TI_LoadedNPCIndex = 0; TI_LoadedNPCIndex = 0;
end end
end end
TI_PopulateOptions("select npc"); TI_PopulateOptions("select npc");
end end
function TI_OptionMove(offset) function TI_OptionMove(self, offset)
local CurrOpts; local CurrOpts;
if(TI_LoadedNPCIndex > 0) then if(TI_LoadedNPCIndex > 0) then
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]]; CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
else else
CurrOpts = TI_status.options; CurrOpts = TI_status.options;
end end
local id = this:GetParent():GetID(); local id = self:GetParent():GetID();
local newid = id + offset; local newid = id + offset;
if(newid < 1 or newid > table.getn(CurrOpts)) then if(newid < 1 or newid > table.getn(CurrOpts)) then
return; return;
end end
local temp = CurrOpts[newid]; local temp = CurrOpts[newid];
CurrOpts[newid] = CurrOpts[id]; CurrOpts[newid] = CurrOpts[id];
CurrOpts[id] = temp; CurrOpts[id] = temp;
TI_PopulateOptions("move"); TI_PopulateOptions("move");
end end
function TI_OptionToggle() function TI_OptionToggle(self)
local CurrOpts; local CurrOpts;
if(TI_LoadedNPCIndex > 0) then if(TI_LoadedNPCIndex > 0) then
CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]]; CurrOpts = TI_NPCDB[TI_NPCIndex[TI_LoadedNPCIndex]];
else else
CurrOpts = TI_status.options; CurrOpts = TI_status.options;
end end
local id = this:GetParent():GetID(); local id = self:GetParent():GetID();
if(this:GetChecked()) then if(self:GetChecked()) then
CurrOpts[id].state=true; CurrOpts[id].state=true;
else else
CurrOpts[id].state=false; CurrOpts[id].state=false;
end end
end end
function TI_StatusIndicatorUpdate() function TI_StatusIndicatorUpdate()
if(TI_status) then if(TI_status) then
if(TI_status.state) then if(TI_status.state) then
TI_StatusIndicator_Status:SetText("On"); TI_StatusIndicator_Status:SetText("On");
TI_StatusIndicator_Status:SetTextColor(0,1,0); TI_StatusIndicator_Status:SetTextColor(0,1,0);
else else
TI_StatusIndicator_Status:SetText("Off"); TI_StatusIndicator_Status:SetText("Off");
TI_StatusIndicator_Status:SetTextColor(1,0,0); TI_StatusIndicator_Status:SetTextColor(1,0,0);
end end
TI_StatusIndicator_Checkbox:SetChecked(TI_status.state); TI_StatusIndicator_Checkbox:SetChecked(TI_status.state);
end end
end end
function TI_StatusIndicator_CheckFn() function TI_StatusIndicator_CheckFn(self)
if(this:GetChecked()) then if(self:GetChecked()) then
TI_Switch("on"); TI_Switch("on");
else else
TI_Switch("off"); TI_Switch("off");
end end
end end
function TI_TempNPCListTooltipShow() function TI_TempNPCListTooltipShow(self)
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE); TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
TI_Tooltip:ClearLines(); TI_Tooltip:ClearLines();
local id = this:GetID(); local id = self:GetID();
TI_Tooltip:AddLine(TI_TempNPCList[id].location); TI_Tooltip:AddLine(TI_TempNPCList[id].location);
for i,v in ipairs(TI_TempNPCList[id].list) do for i,v in ipairs(TI_TempNPCList[id].list) do
TI_Tooltip:AddLine("- " .. v.name); TI_Tooltip:AddLine("- " .. v.name);
end end
--TI_Tooltip:SetText(text); --TI_Tooltip:SetText(text);
TI_Tooltip:Show(); TI_Tooltip:Show();
end end
function TI_TooltipHide() function TI_TooltipHide()
TI_Tooltip:Hide(); TI_Tooltip:Hide();
end end
function TI_TooltipMessage(msg) function TI_TooltipMessage(self, msg)
TI_Tooltip:SetOwner(this, ANCHOR_PRESERVE); TI_Tooltip:SetOwner(self, ANCHOR_PRESERVE);
TI_Tooltip:ClearLines(); TI_Tooltip:ClearLines();
TI_Tooltip:SetText(msg); TI_Tooltip:SetText(msg);
TI_Tooltip:Show(); TI_Tooltip:Show();
end end
function TI_TempNPCListUpdate() function TI_TempNPCListUpdate()
local last = 1; local last = 1;
for i,v in ipairs(TI_TempNPCList) do for i,v in ipairs(TI_TempNPCList) do
local tempbuttontext = getglobal("TI_TempNPCListWindow"..i.."_Text"); local tempbuttontext = _G["TI_TempNPCListWindow"..i.."_Text"];
tempbuttontext:SetText(v.name); tempbuttontext:SetText(v.name);
tempbuttontext:GetParent():Show(); tempbuttontext:GetParent():Show();
last = last+1; last = last+1;
end end
for j=last, TI_TempNPCListMaxSize, 1 do for j=last, TI_TempNPCListMaxSize, 1 do
getglobal("TI_TempNPCListWindow" .. j):Hide(); _G["TI_TempNPCListWindow" .. j]:Hide();
end end
end end
function TI_NPCListCheckboxTooltip() function TI_NPCListCheckboxTooltip(self)
if(this:GetChecked()) then if(self:GetChecked()) then
TI_TooltipMessage("NPC is using specific settings."); TI_TooltipMessage(self, "NPC is using specific settings.");
else else
TI_TooltipMessage("NPC is using default settings."); TI_TooltipMessage(self, "NPC is using default settings.");
end end
end end
function TI_OptionListCheckboxTooltip() function TI_OptionListCheckboxTooltip(self)
if(this:GetChecked()) then if(self:GetChecked()) then
TI_TooltipMessage("This option is enabled."); TI_TooltipMessage(self, "This option is enabled.");
else else
TI_TooltipMessage("This option is disabled."); TI_TooltipMessage(self, "This option is disabled.");
end end
end end
function TI_SettingCheckboxFn(var) function TI_SettingCheckboxFn(self, var)
if(this:GetChecked()) then if(self:GetChecked()) then
TI_status[var] = true; TI_status[var] = true;
else else
TI_status[var] = false; TI_status[var] = false;
end end
end end
function TI_SettingCheckboxUpdate() function TI_SettingCheckboxUpdate()
if(TI_status) then if(TI_status) then
TI_SettingCheckboxes_UseDefault:SetChecked(TI_status.usedefault); TI_SettingCheckboxes_UseDefault:SetChecked(TI_status.usedefault);
TI_SettingCheckboxes_AddAutomatically:SetChecked(TI_status.autoadd); TI_SettingCheckboxes_AddAutomatically:SetChecked(TI_status.autoadd);
end end
end end

1
pkgmeta.yaml Executable file
View File

@ -0,0 +1 @@
package-as: TurnIn