Download
(42 Kb)
Download
Updated: 10/22/18 10:54 PM
Pictures
File Info
Compatibility:
Wrathstone (4.3)
Murkmire (4.2)
Updated:10/22/18 10:54 PM
Created:10/16/16 05:17 PM
Monthly downloads:40
Total downloads:8,087
Favorites:10
MD5:
Arch's Quest Refresh (Abandon Pledge Quests)  Popular! (More than 5000 hits)
Version: 1.1.5
by: Architecture [More]
Lightweight addon used for easily abandoning your currently accepted undaunted pledge quests.

Custom Control



This allows you to easily drop old undaunted pledge quests in order to pick up new ones (without having to search through your quest journal). The abandon quest confirmation prompt will still behave as it does by default and thus you will be prompted to confirm the undaunted quest you wish to abandon.

You may also conveniently abandon a pledge quest using one of the following chat slash commands:
  • /apq
  • /abandonpledgequests
  • /questrefresh

Featured AddOns
- Added slash commands to easily abandon a pledge quest:
* /apq
* /abandonpledgequests
* /questrefresh
- Initial multiple language support (so it at least works with non-English "PLEDGE" full-text matching)
- Allow recursive abandonment (with option)
- Added option to display message if/once all pledge quests are abandoned
Optional Files (0)


Archived Files (15)
File Name
Version
Size
Uploader
Date
1.1.4
42kB
Architecture
05/22/18 10:59 PM
1.1.3
42kB
Architecture
05/22/17 08:43 PM
1.1.2
42kB
Architecture
03/18/17 03:58 PM
1.1.1
42kB
Architecture
03/18/17 03:55 PM
1.1.0
42kB
Architecture
03/18/17 03:54 PM
1.0.9
42kB
Architecture
03/18/17 03:46 PM
1.0.8
42kB
Architecture
03/18/17 03:41 PM
1.0.7
41kB
Architecture
03/18/17 02:25 PM
1.0.6
41kB
Architecture
02/27/17 10:04 PM
1.0.5
41kB
Architecture
02/27/17 10:02 PM
1.0.4
41kB
Architecture
02/26/17 04:18 PM
1.0.3
41kB
Architecture
02/16/17 12:07 AM
1.0.2
41kB
Architecture
10/19/16 04:33 AM
1.0.1
38kB
Architecture
10/16/16 05:22 PM
1.0.0
38kB
10/16/16 05:17 PM


Post A Reply Comment Options
Unread 11/26/20, 07:49 AM  
Neozar
 
Neozar's Avatar

Forum posts: 0
File comments: 41
Uploads: 0
Stopped working
Report comment to moderator  
Reply With Quote
Unread 03/01/20, 03:28 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Originally Posted by Baertram
Could you PLEASE change the SavedVariables from the very very old "character name" format, which is obviously not rename save, to the character ID settings!
Just renamed a few chars to welcome them to the family name and noticed that your addon is still using this outdated method of SavedVariable saving, unfortunately.

Old/outdated since years/not rename save - Character name:
Code:
ZO_SavedVars:New
New/rename save - Character ID:
ZO_SavedVars:NewCharacterId
-> https://wiki.esoui.com/AddOn_Quick_Q...cal_machine.3F

Both got the same parameters so you just need to exchange the function name!

Should be also easy to migrate the settings, here is an example function how to get the character IDs and names so you can check old SV table and migrate to the new one ONCE:
Lua Code:
  1. --Function to get all characters of the account, ID and name.
  2. --Returns a table with 2 possible variants, either the character ID is key and the name is the value,
  3. --or vice versa.
  4. --Parameter boolean, keyIsCharName:
  5. -->True: the key of the returned table is the character name
  6. -->False: the key of the returned table is the unique cahracter ID (standard)
  7. local function getCharactersOfAccount(keyIsCharName)
  8.     keyIsCharName = keyIsCharName or false
  9.     local charactersOfAccount
  10.     --Check all the characters of the account
  11.     for i = 1, GetNumCharacters() do
  12.         local name, _, _, _, _, _, characterId = GetCharacterInfo(i)
  13.         local charName = zo_strformat(SI_UNIT_NAME, name)
  14.         if characterId ~= nil and charName ~= "" then
  15.             if charactersOfAccount == nil then charactersOfAccount = {} end
  16.             if keyIsCharName then
  17.                 charactersOfAccount[charName]   = characterId
  18.             else
  19.                 charactersOfAccount[characterId]= charName
  20.             end
  21.         end
  22.     end
  23.     return charactersOfAccount
  24. end

Additional SavedVariables info:
https://wiki.esoui.com/Circonians_Sa...ables_Tutorial

Thank you very very much Architecture!
Hi Baertram! You bet, I will certainly plan to do this in the very near future. Thank you for the helpful information regarding new format for saved vars.

I sincerely appreciate the feedback!
Report comment to moderator  
Reply With Quote
Unread 11/18/19, 06:45 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Could you PLEASE change the SavedVariables from the very very old "character name" format, which is obviously not rename save, to the character ID settings!
Just renamed a few chars to welcome them to the family name and noticed that your addon is still using this outdated method of SavedVariable saving, unfortunately.

Old/outdated since years/not rename save - Character name:
Code:
ZO_SavedVars:New
New/rename save - Character ID:
ZO_SavedVars:NewCharacterId
-> https://wiki.esoui.com/AddOn_Quick_Q...cal_machine.3F

Both got the same parameters so you just need to exchange the function name!

Should be also easy to migrate the settings, here is an example function how to get the character IDs and names so you can check old SV table and migrate to the new one ONCE:
Lua Code:
  1. --Function to get all characters of the account, ID and name.
  2. --Returns a table with 2 possible variants, either the character ID is key and the name is the value,
  3. --or vice versa.
  4. --Parameter boolean, keyIsCharName:
  5. -->True: the key of the returned table is the character name
  6. -->False: the key of the returned table is the unique cahracter ID (standard)
  7. local function getCharactersOfAccount(keyIsCharName)
  8.     keyIsCharName = keyIsCharName or false
  9.     local charactersOfAccount
  10.     --Check all the characters of the account
  11.     for i = 1, GetNumCharacters() do
  12.         local name, _, _, _, _, _, characterId = GetCharacterInfo(i)
  13.         local charName = zo_strformat(SI_UNIT_NAME, name)
  14.         if characterId ~= nil and charName ~= "" then
  15.             if charactersOfAccount == nil then charactersOfAccount = {} end
  16.             if keyIsCharName then
  17.                 charactersOfAccount[charName]   = characterId
  18.             else
  19.                 charactersOfAccount[characterId]= charName
  20.             end
  21.         end
  22.     end
  23.     return charactersOfAccount
  24. end

Additional SavedVariables info:
https://wiki.esoui.com/Circonians_Sa...ables_Tutorial

Thank you very very much Architecture!
Report comment to moderator  
Reply With Quote
Unread 04/01/19, 07:42 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Originally Posted by iFedix
Here you can find a new addon that also adds this feature! Thanks again Arch!
Thanks Updated to include in description as well.
Report comment to moderator  
Reply With Quote
Unread 03/04/19, 10:24 AM  
iFedix
 
iFedix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 240
Uploads: 1
Here you can find a new addon that also adds this feature! Thanks again Arch!
Report comment to moderator  
Reply With Quote
Unread 10/24/17, 01:26 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Originally Posted by xNinja-PLZ
Is there a way to make this work with other quests ?
Possibly, but it depends on the type of quest for how I can setup rules / settings to allow different types of quests. What was a use case you had in mind?
Report comment to moderator  
Reply With Quote
Unread 09/23/17, 06:26 PM  
xNinja-PLZ
 
xNinja-PLZ's Avatar

Forum posts: 0
File comments: 3
Uploads: 0
Is there a way to make this work with other quests ?
Report comment to moderator  
Reply With Quote
Unread 03/18/17, 04:05 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Made many new changes -- check out the changelog for details!
Report comment to moderator  
Reply With Quote
Unread 03/18/17, 03:07 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Originally Posted by Baertram
Hi there,

just tested a bit more and changed your source code a bit:
Lua Code:
  1. -- Callback function for removed quest
  2. local function ArchQuestRefresh_OnRemoveQuest(eventCode, isCompleted, journalIndex, questName, zoneIndex, poiIndex, questID)
  3.     if ARCH_QUEST_REFRESH == nil then return false end
  4. d("[ArchQuestRefresh_OnRemoveQuest] isCompleted: " .. tostring(isCompleted) .. ", journalIndex: " .. tostring(journalIndex) .. ", questName: " .. tostring(questName) .. ", questID: " .. tostring(questID))
  5.     --If pledges quest got abandoned we need to go on with the next possible pledges quest
  6.     if string.find(string.upper(questName), pledgeQuestNameCheck) then
  7.         --UnRegister event callback function to realize if quest get's abandoned
  8.         EVENT_MANAGER:UnregisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED)
  9.         ARCH_QUEST_REFRESH:Abandon()
  10.     end
  11. end
  12.  
  13. function ArchQuestRefresh:Abandon()
  14.     if self.sv ~= nil and self.sv.enabled then
  15.  
  16.         for i = 1, MAX_JOURNAL_QUESTS do
  17.             local questName = GetJournalQuestName(i)
  18.             local questType = GetJournalQuestType(i)
  19.             --d(questName)
  20.             --d(GetJournalQuestType(i))
  21.  
  22.             if questType == QUEST_TYPE_DUNGEON and string.find(string.upper(questName), pledgeQuestNameCheck) then
  23.                 --Register event callback function to realize if quest get's abandoned
  24.                 EVENT_MANAGER:RegisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED, ArchQuestRefresh_OnRemoveQuest)
  25.                 QUEST_JOURNAL_MANAGER:ConfirmAbandonQuest(i)
  26.             end
  27.         end
  28.     end
  29.     --UnRegister event callback function to realize if quest get's abandoned
  30.     EVENT_MANAGER:UnregisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED)
  31. end


After you press the keybind or chat command:
This way one will get the popup to abandon a pledges quest.
After pressing "YES" the event EVENT_QUEST_REMOVED will be triggered and the callback function will just try to abandon the next quest.

This will not work if you press "NO" in the abandon quest dialog though as the event will not be triggered!
For this you'd need to:

-Put the not abandoned questname or unique questID on a "whitelist" and check against this in your function ArchQuestRefresh:Abandon, so it won't be tried to abandon again the next time as the user already said "NO".
-The keybind/chat command should reset the whitelist before the abandon function is called!
-You'd need to hook into the quest dialog and chekc if the "NO" button was used (by keybind OR mouse) so you'd need to find the NO button'S callback function and pray that it is global hookable
-After the user pressed the "NO" button just call the abandon quest function again WITHOUT resetting the whitelist
Hey Baertram,

I am adding this in right now -- I will put in a setting option as well (default to this behavior) Posting update shortly.

Thank you for the contribution and feedback!
Report comment to moderator  
Reply With Quote
Unread 03/18/17, 02:43 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Hi there,

just tested a bit more and changed your source code a bit:
Lua Code:
  1. -- Callback function for removed quest
  2. local function ArchQuestRefresh_OnRemoveQuest(eventCode, isCompleted, journalIndex, questName, zoneIndex, poiIndex, questID)
  3.     if ARCH_QUEST_REFRESH == nil then return false end
  4. d("[ArchQuestRefresh_OnRemoveQuest] isCompleted: " .. tostring(isCompleted) .. ", journalIndex: " .. tostring(journalIndex) .. ", questName: " .. tostring(questName) .. ", questID: " .. tostring(questID))
  5.     --If pledges quest got abandoned we need to go on with the next possible pledges quest
  6.     if string.find(string.upper(questName), pledgeQuestNameCheck) then
  7.         --UnRegister event callback function to realize if quest get's abandoned
  8.         EVENT_MANAGER:UnregisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED)
  9.         ARCH_QUEST_REFRESH:Abandon()
  10.     end
  11. end
  12.  
  13. function ArchQuestRefresh:Abandon()
  14.     if self.sv ~= nil and self.sv.enabled then
  15.  
  16.         for i = 1, MAX_JOURNAL_QUESTS do
  17.             local questName = GetJournalQuestName(i)
  18.             local questType = GetJournalQuestType(i)
  19.             --d(questName)
  20.             --d(GetJournalQuestType(i))
  21.  
  22.             if questType == QUEST_TYPE_DUNGEON and string.find(string.upper(questName), pledgeQuestNameCheck) then
  23.                 --Register event callback function to realize if quest get's abandoned
  24.                 EVENT_MANAGER:RegisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED, ArchQuestRefresh_OnRemoveQuest)
  25.                 QUEST_JOURNAL_MANAGER:ConfirmAbandonQuest(i)
  26.             end
  27.         end
  28.     end
  29.     --UnRegister event callback function to realize if quest get's abandoned
  30.     EVENT_MANAGER:UnregisterForEvent("ArchQuestRefreshRemoveQuest", EVENT_QUEST_REMOVED)
  31. end


After you press the keybind or chat command:
This way one will get the popup to abandon a pledges quest.
After pressing "YES" the event EVENT_QUEST_REMOVED will be triggered and the callback function will just try to abandon the next quest.

This will not work if you press "NO" in the abandon quest dialog though as the event will not be triggered!
For this you'd need to:

-Put the not abandoned questname or unique questID on a "whitelist" and check against this in your function ArchQuestRefresh:Abandon, so it won't be tried to abandon again the next time as the user already said "NO".
-The keybind/chat command should reset the whitelist before the abandon function is called!
-You'd need to hook into the quest dialog and chekc if the "NO" button was used (by keybind OR mouse) so you'd need to find the NO button'S callback function and pray that it is global hookable
-After the user pressed the "NO" button just call the abandon quest function again WITHOUT resetting the whitelist
Report comment to moderator  
Reply With Quote
Unread 03/05/17, 09:19 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Hi there,

your addon is not working with other clients language then english :-(

Please make it multi language supportable by not using a constant value for the quest name "pledge" but a variable that will use the client's language to determine the correct quest name.

Example, something like this:
Lua Code:
  1. local questLang = GetCVar("language.2") -- contains "en" or "de" or "fr" now
  2. local languageToPledgeQuestName = {
  3.     ["en"] = "PLEDGE",
  4.     ["de"] = "GELÖBNIS",
  5.     ["fr"] = "SERMENT",
  6. }
  7. local pledgeQuestNameCheck = languageToPledgeQuestName[questLang] or "PLEDGE"
  8.  
  9. function ArchQuestRefresh:Abandon()
  10.     if self.sv ~= nil and self.sv.enabled then
  11.         for i = 1, MAX_JOURNAL_QUESTS do
  12.             local questName = GetJournalQuestName(i)
  13.             local questType = GetJournalQuestType(i)
  14.             --d(questName)
  15.             --d(GetJournalQuestType(i))
  16.        
  17.             if questType == QUEST_TYPE_DUNGEON and string.find(string.upper(questName), pledgeQuestNameCheck) then
  18.                 QUEST_JOURNAL_MANAGER:ConfirmAbandonQuest(i)
  19.             end
  20.         end
  21.     end
  22. end

Attention:
be sure to change the lua file's encoding to UTF-8 w/o BOM in order to allow Umlauts in the names (like Gelöbnis).

Maybe ask for some other languages as Japanese and Russian, Portugues, Spanish, Italian and maybe others are possible too.

Another question:
If I use the chat command or keybinding it will only show a popup if I want to abort the first found pledges quest and after this it is not automatically showing the next quests (I got 3 old ones).
I have to use the keybind/chat command 3 times.

Is this intended to work this way?
Maybe your loop over the quests is aborted by the popup asking to abandon the quest, and if I say yes or no in this popup your loop needs to start again (excluding the before found quests where I have chosen "no" in the popup!)?
Last edited by Baertram : 03/05/17 at 09:41 AM.
Report comment to moderator  
Reply With Quote
Unread 02/27/17, 10:05 PM  
Architecture
 
Architecture's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 79
Uploads: 8
Originally Posted by Baertram
Nice idea, this is a helping hand!

Is this only working by help of a keybind (I'm not having so much keybindings left^^)?
Would you mind adding a short slash command like

Code:
/apq
to abandon the pledge quests too?

Something like this:
Lua Code:
  1. --Register the slash commands
  2. --Put this function call at the end of your function ArchQuestRefresh:Initialize(addonName)
  3. local function RegisterSlashCommands()
  4.     -- Register slash commands
  5.     SLASH_COMMANDS["/apq"]                         = ARCH_QUEST_REFRESH:Abandon()
  6.     SLASH_COMMANDS["/abandonpledgequests"] = ARCH_QUEST_REFRESH:Abandon()
  7. end

Many thanks
Hey Baertram!

Thank you for the feedback, I have added the slash commands

Cheers,
Report comment to moderator  
Reply With Quote
Unread 02/27/17, 01:16 AM  
KiriX
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 56
Uploads: 3
Make multi-language support! =)
Report comment to moderator  
Reply With Quote
Unread 02/26/17, 04:33 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Nice idea, this is a helping hand!

Is this only working by help of a keybind (I'm not having so much keybindings left^^)?
Would you mind adding a short slash command like

Code:
/apq
to abandon the pledge quests too?

Something like this:
Lua Code:
  1. --Register the slash commands
  2. --Put this function call at the end of your function ArchQuestRefresh:Initialize(addonName)
  3. local function RegisterSlashCommands()
  4.     -- Register slash commands
  5.     SLASH_COMMANDS["/apq"]                         = ARCH_QUEST_REFRESH:Abandon()
  6.     SLASH_COMMANDS["/abandonpledgequests"] = ARCH_QUEST_REFRESH:Abandon()
  7. end

Many thanks
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: