Problem with GetQuestById

05/08/2018 22:58 mhaendler#1
So basicly i want to see if i have a certain quest id already in my questlog

So i use it like that: GetQuestById($questId)

The return appears to be like the struct of the current active quest id in the quest log.

it doesnt matter if i give "GetQuestByID" an id or something.

also how can i acceess / read that returned struct?

currently i use _DLLStructDisplay, but i dont get any useful information back?! at least i dont know if i get useful information back :D

Maybe some1 knows the answer to this

_
mhaendler
05/11/2018 09:18 4D1#2
quests are only updated clientside if requested, so unless the quest is actively being looked at in the quest log, the info you get from smth like GetQuestByID will probably be outdated or nonexistant
05/11/2018 20:51 mhaendler#3
Quote:
Originally Posted by 4D1 View Post
quests are only updated clientside if requested, so unless the quest is actively being looked at in the quest log, the info you get from smth like GetQuestByID will probably be outdated or nonexistant
mhhh okay, you got any idea on how to check if acepting a quest was succesful?

Like
Code:
AcceptQuest(1)
$lQuest = GetQuestById(1)
If DllStructGetData($lQuest, 'active') Then
MsgBox(0,0,'got quest')
Else
MsgBox(0,0,'mhh no quest')
Endif
05/12/2018 07:04 savsuds#4
I would suggest a ToggleQuestWindow() then GetQuestByID() and look for the correct quest ID to see if it matches. ([Only registered and activated users can see links. Click Here To Register...])
Code:
ToggleQuestWindow()
If GetQuestByID <> xxxx Then
DoSomeShit()
Else
TryAgain()
EndIf
05/12/2018 08:20 goofyninja#5
Is it possible to get the state of the quest? Like check for (Completed)?

Edit:
I'm currently testing checking 'LogState' from the struct.

This seemed to work ok -

Code:
ToggleQuestWindow()
Local $lQuest = GetQuestById(###)
If DllStructGetData($lQuest, 'LogState') = 3 Then
AbandonQuest(###)
EndIf
Logstate when you just have the quest was 1, on completion it returned 3. Depending on the state of GW I did get 2 but 3 seemed to work, could try <> 1 so it would abandon if it was 2 or 3 but this was working for me.

Thanks 4D1 and Savsuds for the info on quests
05/13/2018 02:59 4D1#6
theres two packets involving requesting quest info and setting active quest, you can see em with a packet log and use that to not have to keep quest log open
05/13/2018 10:28 goofyninja#7
Quote:
Originally Posted by 4D1 View Post
theres two packets involving requesting quest info and setting active quest, you can see em with a packet log and use that to not have to keep quest log open
I'll have a look into it.