objectives out of objectiveFullText - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-09-18, 06:43 PM   #1
A Fallenroot Satyr
ebonyfaye's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 26
Thumbs down objectives out of objectiveFullText


so am taking objectiveFullText = GetQuestLogLeaderBoard(questID)

and i would like to remove the objective information off the quest EG: (0/1)

i been using

arg1, agr2 = string.match(text, "(.-%S)%s(.*)")
the problem is in some languages the objective information is at the end of the quest EG:

0/1 Kill Cat Boss
Kill Cat Boss: 0/1

I made this but it seems to be a bit to much and it will only work for quests with 0/4 at the start but at least it shows all the text on non English clients

	if text == nil then
		return L["N/A"], L["N/A"]
	local makeString = nil
	local dig1, dig2 = string.match( text, "(%d*)/(%d*)")
	AJM:Print("test", dig1, dig2)
	if (dig1  and dig2) then
		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
		AJM:Print("testm", arg1, "A", arg2)
		makeString = dig1..L["/"]..dig2 
	AJM:Print("test1", makeString, text)
	if makeString ~= nil then
		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
		local textFind = string.find(arg1, "(%d*)")
		AJM:Print("text", textFind)
		if textFind then
			return makeString, arg2
			return makeString, text
		return L["DONE"] , text
thanks for any help
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » objectives out of objectiveFullText

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off