Quixote-1.0

From WowAce Wiki
Jump to: navigation, search

Quixote-1.0 is a library that abstracts out access to the Blizzard quest log.

Contents

Event reference

Quixote provides the following events:

Quixote_Quest_Gained - "quest name", id, numObjectives

Fired when a quest is picked up.

Args

"quest name" 
string - quest name.
id 
number - internal quest id, in case you want to call any Blizzard functions about it.
numObjectives 
number - number of leaderboard items for the quest

Quixote_Leaderboard_Update - "quest name", id, lid, "description", numHad, numGot, numNeeded, "type"

Fired when a quest objective is advanced.

Args

"quest name" 
string - quest name.
id 
number - internal quest id, in case you want to call any Blizzard functions about it.
lid 
number - internal leaderboard id
"description" 
string - objective description
numHad 
number - previous leaderboard state
numGot 
number - current leaderboard state
numNeeded 
number - the goal
"type" 
string - objective type ('item', 'monster', 'object', 'reputation')

Quixote_Quest_Lost - "quest name", id

Fired when a quest leaves the quest log.

Args

"quest name" 
string - quest name.
id 
number - internal quest id; no longer good for anything, just provided in case you need to clean it out.

Quixote_Quest_Failed - "quest name", id

Fired when a quest is failed.

Args

"quest name" 
string - quest name.
id 
number - internal quest id, in case you want to call any Blizzard functions about it.

Quixote_Quest_Complete - "quest name", id

Fired when a quest is completed (i.e. all objectives are finished, and the quest is marked "done").

Args

"quest name" 
string - quest name.
id 
number - internal quest id, in case you want to call any Blizzard functions about it.

Quixote_Ready

Fired after Quixote has finished its first scan.

Quixote_Update

Fired on every scan.

Quixote_Party_Quest_Sync - "sender"

Fired when a party member resyncs their quests.

Args

"sender" 
string - party member's name.

Quixote_Party_Quest_Gained - "sender", "quest name"

Fired when a party member gains a quest.

Args

"sender" 
string - party member's name.
"quest name" 
string - quest name.

Quixote_Party_Quest_Complete - "sender", "quest name"

Fired when a party member completes a quest.

Args

"sender" 
string - party member's name.
"quest name" 
string - quest name.

Quixote_Party_Quest_Lost - "sender", "quest name"

Fired when a party member loses a quest.

Args

"sender" 
string - party member's name.
"quest name" 
string - quest name.

Quixote_Party_Leaderboard_Update - "sender", "quest name", "description", numHad, numGot, numNeeded

Fired when a party member advances a quest.

Args

"sender" 
string - party member's name.
"quest name" 
string - quest name.
"description" 
string - objective description
numHad 
number - previous leaderboard state
numGot 
number - current leaderboard state
numNeeded 
number - the goal


API Documentation

Note: This documentation is auto-generated. Please note that direct modifications may be overwritten on next autogenerate.

:GetLongTag(quest)

Arguments

quest
number/string - quest id OR quest name

Notes

Gets the long tag text (the text as provided by blizard)

Returns

  • string - long tag


:GetNumPartyQuestObjectives(name , quest)

Arguments

name
type - (needs documentation)
quest
type - (needs documentation)

Notes

Get the number of objectives for a party member's quest

Returns

  • number - number of objectives
  • number - number of complete objectives


:GetNumQuestObjectives(q)

Arguments

q
type - (needs documentation)

Notes

Get the number of objectives for a quest

Returns

  • number - number of objectives
  • number - number of complete objectives


:GetNumQuests()

Notes

Get the number of quests currently in the log

Returns

  • number - number of quests
  • number - number of completed quests


:GetPartyQuestStatus("name" , quest , "objective")

Arguments

"name"
string - UnitName('partyX') or 'partyX'
quest
number/string - quest id OR quest name
"objective"
string - description (as returned by :GetQuestStatusById)

Notes

Get objective completion status of a party member's quest. Only works for party members who have Quixote. (Giving the quest id as the argument will only return info if the current character also has the quest.) (The rest of the API may later be changed to behave slightly more like this function. Moving away from the internal-game-ids approach, where possible.)

Returns

  • number - "numGot"
  • number - "numNeeded"


:GetQuest(q)

Arguments

q
string/number- quest name OR quest id

Notes

Get quest details, either by id or name.

Returns

  • string - quest title
  • string - quest level
  • string - quest tag
  • number - number of players recommended (or nil)
  • number - 1 if complete, -1 if failed, nil otherwise
  • number - number of leaderboard objectives
  • string - zone name
  • number - quest id


:GetQuestById(q)

Arguments

q
number - quest id

Notes

Get quest details, by id.

Returns

  • string - quest title
  • string - quest level
  • string - quest tag
  • number - number of players recommended (or nil)
  • number - 1 if complete, -1 if failed, nil otherwise
  • number - number of leaderboard objectives
  • string - zone name
  • number - quest id


:GetQuestByName("q")

Arguments

"q"
string - quest name

Notes

Get quest details, by name.

Returns

  • string - quest title
  • string - quest level
  • string - quest tag
  • number - number of players recommended (or nil)
  • number - 1 if complete, -1 if failed, nil otherwise
  • number - number of leaderboard objectives
  • string - zone name
  • number - quest id


:GetQuestByUniqueId(uqid)

Arguments

uqid
number/string - quest id OR quest name

Notes

Gets a quest based on it's unique id, if we can't find the quest then false is returned.

Returns

  • string - quest title
  • string - quest level
  • string - quest tag
  • number - number of players recommended (or nil)
  • number - 1 if complete, -1 if failed, nil otherwise
  • number - number of leaderboard objectives
  • string - zone name
  • number - quest id


:GetQuestStatusById(q , i)

Arguments

q
number - quest id
i
number - leaderboard id

Notes

Get quest objective details, by quest id and leaderboard number. (Leaderboards are from 1 to numObjectives.)

Returns

  • string - description
  • string - objective type (item, object, monster, reputation, event)
  • string - number possessed
  • string - number needed
  • boolean - complete


:GetQuestText(q)

Arguments

q
number/string - quest id OR quest name

Notes

Get quest objective and description, either by id or name.

Returns

  • string - objective
  • string - description


:GetReactionLevel("leveltext")

Arguments

"leveltext"
string - faction standing text

Notes

Returns a numeric-equivalent for faction standings.

Returns

  • number - number from 1 to 8 or -1 if invalid


:GetUniqueId(q)

Arguments

q
number/string - quest id OR quest name

Notes

Gets a unqiue ID for the given quest, this SHOULD be unique enough for each quest and persitable

Returns

  • string - unique id


:HookDialogs()

No arguments

:IsQuestItem("itemname")

Arguments

"itemname"
string - item name

Notes

Checks if the item is one referenced by name in a leaderboard objective for any quest.

Returns

  • string - item name
  • string - number of item you have
  • string - number of item you need

Example

Quixote:IsQuestItem("Ghost Mushroom")

:IsQuestMob("mobname")

Arguments

"mobname"
string - mob name

Notes

Checks if the mob is one referenced by name in a leaderboard objective for any quest.

Returns

  • boolean - whether the mob is a quest mob

Example

Quixote:IsQuestMob(UnitName('target'))

:IterZones()

Notes

Use to iterate over zones in which this character has quests. Gives the localized of the zone, which can then be passed into Quixote:QuestsByZone.

Example

for i, zone in quixote:IterZones() do ... end

:IteratePartyQuestLeaderboard("name" , "quest")

Arguments

"name"
string - UnitName('partyX') or 'partyX'
"quest"
string - quest name

Notes

Iterate over the leaderboard of a party member's quest

Example

for description in quixote:IteratePartyQuestLeaderboard(player, quest) do print(description, quixote:GetPartyQuestStatus(player, quest, description)) end

:IteratePartyQuests("name")

Arguments

"name"
string - UnitName('partyX') or 'partyX'

Notes

Iterate over the quests that a party member has.

Example

for quest in quixote:IteratePartyQuests("Supakillarouge") do ... end

:IterateQuests()

Notes

Use to iterate over all quests. Warning: works unlike the other quest iterators -- returns all quest details, instead of the quest id.

Example

for id, title, level, tag, suggestedGroup, complete, numObjectives, zone in Quixote:IterateQuests() do ... end

:IterateQuestsForMob("mobname")

Arguments

"mobname"
string - mob name

Notes

Iterate over quests for which a mob is a leaderboard item. Note that in the vast majority of cases this will only be one mob.

Example

for _, mobName, numberGot, numberNeeded in quixote:IterateQuestsForMob("Tseric") do ... end

:PartyMemberHasQuest("name" , quest)

Arguments

"name"
string - UnitName('partyX') or 'partyX'
quest
number/string - quest id OR quest name

Notes

Checks whether a party member is on a given quest, as far as Quixote knows. Only works for others with Quixote, or those in close range. (Giving the quest id as the argument will only return info if the current character also has the quest.)

Returns

  • boolean - whether the party member has the quest


:PartyMemberHasQuixote("name")

Arguments

"name"
string - UnitName('partyX') or 'partyX'

Notes

Checks whether a party member has Quixote

Returns

  • boolean - whether the party member has quixote


:QuestsByLevel()

Notes

Use to iterate over quests in order of level, from lowest to highest.

Example

for i, questid in quixote:QuestsByLevel() do ... end

:QuestsByZone("zone")

Arguments

"zone"
string - zone name

Notes

Use to iterate over quests in a given zone. Argument is the localized zone name.

Example

for i, questid in quixote:QuestsByZone(zone) do ... end

:UnhookDialogs()

No arguments