How to echo current journal quest details

To use this test script, create a file in your /innerspace/scripts folder called CQuest.iss and place the entire text below. Then, you can run the script by typing the following command in the InnerSpace console (while in the game): run CQuest


function main()
{
    variable index:collection:string Details    
    variable iterator DetailsIterator
    variable int DetailsCounter = 0
    
    echo "Journal Current Quest:"
    echo "- Name: ${QuestJournalWindow.CurrentQuest.Name.GetProperty["LocalText"]}"
    echo "- Level: ${QuestJournalWindow.CurrentQuest.Level.GetProperty["LocalText"]}"
    echo "- Category: ${QuestJournalWindow.CurrentQuest.Category.GetProperty["LocalText"]}"
    echo "- CurrentZone: ${QuestJournalWindow.CurrentQuest.CurrentZone.GetProperty["LocalText"]}"
    echo "- TimeStamp: ${QuestJournalWindow.CurrentQuest.TimeStamp.GetProperty["LocalText"]}"
    echo "- MissionGroup: ${QuestJournalWindow.CurrentQuest.MissionGroup.GetProperty["LocalText"]}"
    echo "- Status: ${QuestJournalWindow.CurrentQuest.Status.GetProperty["LocalText"]}"
    echo "- ExpirationTime: ${QuestJournalWindow.CurrentQuest.ExpirationTime.GetProperty["LocalText"]}"
    echo "- Body: ${QuestJournalWindow.CurrentQuest.Body.GetProperty["LocalText"]}"
    
    QuestJournalWindow.CurrentQuest:GetDetails[Details]
    Details:GetIterator[DetailsIterator]
    echo "- Details:"
    if (${DetailsIterator:First(exists)})
    {
        do
        {
            if (${DetailsIterator.Value.FirstKey(exists)})
            {
                do
                {
                     echo "-- ${DetailsCounter}::  '${DetailsIterator.Value.CurrentKey}' => '${DetailsIterator.Value.CurrentValue}'"
                }
                while ${DetailsIterator.Value.NextKey(exists)}
                echo "------"
            }
            DetailsCounter:Inc
        }
        while ${DetailsIterator:Next(exists)}
    }
}


To set the journal's currently selected quest, one would iterate through all the quests (as shown in this knowledgebase article), and then use the MakeCurrentActiveQuest method of the quest datatype.   Or, if you knew the full name or ID of the quest, these would work as well:  QuestJournalWindow.ActiveQuest[Gruug's Got a Grudge]:MakeCurrentActiveQuest or QuestJournalWindow.ActiveQuest[3096546432]:MakeCurrentActiveQuest

Also available in: PDF

Add picture from clipboard (Maximum size: 95.4 GB)