Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80232b7e0c |
27
README.txt
27
README.txt
@ -1,6 +1,6 @@
|
|||||||
Turn In
|
Turn In
|
||||||
v2.3
|
v2.1
|
||||||
by Sabindeus of Terenas
|
by Sabindeus of Smolderthorn/Andre of Argent Dawn (Alliance)
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-------------
|
-------------
|
||||||
@ -29,5 +29,26 @@ COMMAND SUMMARY
|
|||||||
/turnin recent - Shows the recently visited NPCs window
|
/turnin recent - Shows the recently visited NPCs window
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CHANGE LOG
|
||||||
|
-------------
|
||||||
|
v2.1 - Quest selection logic rewrite thanks to Arcanemagus of Hyjal
|
||||||
|
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
|
||||||
|
|
||||||
Please send bug reports, questions or comments to sabin@sabindeus.com
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Special Thanks to Florrail and Makhno for beta testing like a pro!
|
||||||
|
|
||||||
|
Extra Special Thanks to Arcanemagus for his code input!
|
||||||
|
|
||||||
|
Please send bug reports, questions or comments to Sabin1936@mac.com
|
||||||
|
|||||||
129
TurnIn.lua
129
TurnIn.lua
@ -495,87 +495,84 @@ function TI_HandleGossipWindow(gorq)
|
|||||||
|
|
||||||
|
|
||||||
local npcname = UnitName("npc");
|
local npcname = UnitName("npc");
|
||||||
if not issecretvalue(npcname) then
|
TI_AddNPCToTempList(npcname, ListEntry);
|
||||||
TI_AddNPCToTempList(npcname, ListEntry);
|
|
||||||
|
if(TI_status.autoadd and (not TI_NPCDB[npcname])) then
|
||||||
if(TI_status.autoadd and (not TI_NPCDB[npcname])) then
|
TI_debug("autoadd on, adding this NPC", TI_status.autoadd, TI_NPCDB[npcname]);
|
||||||
TI_debug("autoadd on, adding this NPC", TI_status.autoadd, TI_NPCDB[npcname]);
|
TI_AddNPCToList(ListEntry, npcname);
|
||||||
TI_AddNPCToList(ListEntry, npcname);
|
end
|
||||||
end
|
|
||||||
|
-- If a NPC is in the Database but a new dialog option has appeared (new daily/completed quest) then add it to the DB
|
||||||
-- If a NPC is in the Database but a new dialog option has appeared (new daily/completed quest) then add it to the DB
|
if (TI_NPCDB[npcname]) then
|
||||||
if (TI_NPCDB[npcname]) then
|
for k1, v1 in ipairs(ListEntry) do
|
||||||
for k1, v1 in ipairs(ListEntry) do
|
local found = false;
|
||||||
local found = false;
|
for k2, v2 in ipairs(TI_NPCDB[npcname]) do
|
||||||
for k2, v2 in ipairs(TI_NPCDB[npcname]) do
|
if (v2.type == v1.type and v2.name == v1.name) then
|
||||||
if (v2.type == v1.type and v2.name == v1.name) then
|
found = true;
|
||||||
found = true;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if (not found) then
|
|
||||||
table.insert(TI_NPCDB[npcname], v1)
|
|
||||||
TI_PopulateOptions("npclist updated");
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if (not found) then
|
||||||
|
table.insert(TI_NPCDB[npcname], v1)
|
||||||
|
TI_PopulateOptions("npclist updated");
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then
|
|
||||||
TI_debug("Out of available/active quests, giving up ");
|
if(TI_availnumber > TotalOptions or TI_activenumber > TotalOptions) then
|
||||||
TI_ResetPointers();
|
TI_debug("Out of available/active quests, giving up ");
|
||||||
return;
|
TI_ResetPointers();
|
||||||
end
|
return;
|
||||||
|
end
|
||||||
TI_debug(npcname);
|
|
||||||
if(TI_NPCDB[npcname]) then
|
TI_debug(npcname);
|
||||||
local thisnpc = TI_NPCDB[npcname];
|
if(TI_NPCDB[npcname]) then
|
||||||
if(thisnpc.state) then
|
local thisnpc = TI_NPCDB[npcname];
|
||||||
TI_debug("npc is active, using his options");
|
if(thisnpc.state) then
|
||||||
for i1,current in ipairs(thisnpc) do
|
TI_debug("npc is active, using his options");
|
||||||
if (current.state == true) then
|
for i1,current in ipairs(thisnpc) do
|
||||||
TI_debug("Current Quest: "..current.name);
|
if (current.state == true) then
|
||||||
if (TI_specnum == 0 or i1 > TI_specnum) then
|
TI_debug("Current Quest: "..current.name);
|
||||||
TI_specnum = i1;
|
if (TI_specnum == 0 or i1 > TI_specnum) then
|
||||||
if (current.type == "availquest") then
|
TI_specnum = i1;
|
||||||
for i2,v2 in ipairs(AvailableQuests) do
|
if (current.type == "availquest") then
|
||||||
if (v2.name == current.name) then
|
for i2,v2 in ipairs(AvailableQuests) do
|
||||||
TI_debug(i1.."-Available Match Found: "..current.name);
|
if (v2.name == current.name) then
|
||||||
SAvQ(v2.questID);
|
TI_debug(i1.."-Available Match Found: "..current.name);
|
||||||
return;
|
SAvQ(v2.questID);
|
||||||
end
|
return;
|
||||||
end
|
end
|
||||||
elseif (current.type == "activequest") then
|
end
|
||||||
for i2,v2 in ipairs(ActiveQuests) do
|
elseif (current.type == "activequest") then
|
||||||
if (v2.name == current.name) then
|
for i2,v2 in ipairs(ActiveQuests) do
|
||||||
TI_debug(i1.."-Active Match Found: "..current.name..", "..current.type);
|
if (v2.name == current.name) then
|
||||||
SAcQ(v2.questID);
|
TI_debug(i1.."-Active Match Found: "..current.name..", "..current.type);
|
||||||
return;
|
SAcQ(v2.questID);
|
||||||
end
|
return;
|
||||||
end
|
end
|
||||||
else
|
end
|
||||||
for i2,v2 in ipairs(GossipOptions) do
|
else
|
||||||
if (v2.name == current.name) then
|
for i2,v2 in ipairs(GossipOptions) do
|
||||||
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
|
if (v2.name == current.name) then
|
||||||
if(v2.args) then
|
TI_debug(i1.."-Gossip Match Found: "..current.name..", "..current.type);
|
||||||
TI_FunctionList.g.gossip(v2.args);
|
if(v2.args) then
|
||||||
else
|
TI_FunctionList.g.gossip(v2.args);
|
||||||
TI_FunctionList.g.gossip(i2);
|
else
|
||||||
end
|
TI_FunctionList.g.gossip(i2);
|
||||||
return;
|
|
||||||
end
|
end
|
||||||
|
return;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return;
|
|
||||||
else
|
|
||||||
TI_debug("npc in list, but not active");
|
|
||||||
end
|
end
|
||||||
|
return;
|
||||||
else
|
else
|
||||||
TI_debug("npc not in list");
|
TI_debug("npc in list, but not active");
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
TI_debug("npc not in list");
|
||||||
end
|
end
|
||||||
|
|
||||||
if(TI_status.usedefault == false) then
|
if(TI_status.usedefault == false) then
|
||||||
TI_debug("npc not in list, default set to off, returning.");
|
TI_debug("npc not in list, default set to off, returning.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
## Interface: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
## Interface: 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||||
## X-Compatible-With: 120100, 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
## X-Compatible-With: 120000, 120001, 50503, 40402, 30405, 20505, 11508
|
||||||
## Title: Turn In
|
## Title: Turn In
|
||||||
## Notes: Automates the selection of quest and gossip options.
|
## Notes: Automates the selection of quest and gossip options.
|
||||||
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
## SavedVariables: TI_status, TI_NPCDB, TI_NPCIndex
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user