The onQuestUpdate event was added in version 20061221c, and was intended to replace the the QUESTINFO triggers that already exist in isxeq2. Although these triggers will remain for backwards compatability, users are encouraged to use 'events' for future scripting.
The script example given below is provided as a 'proof of concept' and should not be considered as "useful" by any means. Essentually, once you start this script, it will run until the script is ended or isxeq2 is unloaded. Then, any time a quest update occurs, it will spit out something similar to this:
As you can see, this is the first event that I have released that uses an array of strings as the final set of arguments, so that is why I thought it would be important to include a sample script.
The script example given below is provided as a 'proof of concept' and should not be considered as "useful" by any means. Essentually, once you start this script, it will run until the script is ended or isxeq2 is unloaded. Then, any time a quest update occurs, it will spit out something similar to this:
Code:
[COLOR=purple][B]QUEST UPDATE RECEIVED[/B]
[/COLOR][B]ID[/B]: 1376063761
[B]Name[/B]: Slay the Runnyeye Miners
[B]CurrentZone[/B]: Runnyeye
[B]Category[/B]: Runnyeye
[B]Description[/B]: The Runnyeye miners are adding Seamist fairies to their coal to imbue their fires with mystical energy. I cannot allow the Runnyeye goblins to continue doing this, as they will only get stronger
with magically imbued weapons.
[B]ProgressText[/B]: The Runnyeye miners must be slain before they kill more Seamist fairies and imbue their coal with magic.
[B]ProgressText[/B]: I need to slay twenty Runnyeye miners in Runnyeye.
Code:
atom(script) EQ2_onQuestUpdate(string ID, string Name, string CurrentZone, string Category, string Description, ... ProgressText)
{
variable int i = 1
echo QUEST UPDATE RECEIVED
echo ID: ${ID}
echo Name: ${Name}
echo CurrentZone: ${CurrentZone}
echo Category: ${Category}
echo Description: ${Description}
do
{
echo ProgressText: ${ProgressText[${i}]}
}
while ${i:Inc} <= ${ProgressText.Size}
}
function main()
{
; If isxIRC isn't loaded, then no reason to run this script.
if (!${ISXEQ2(exists)})
return
Event[EQ2_onQuestUpdate]:AttachAtom[EQ2_onQuestUpdate]
do
{
waitframe
}
while ${ISXEQ2(exists)}
Event[EQ2_onQuestUpdate]:DetachAtom[EQ2_onQuestUpdate]
}