• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Send quests completed

Newbie Spellweaver
Joined
Aug 16, 2017
Messages
84
Reaction score
34
Hi

I am working on the quest but I have no idea how to save the quest in the sGU_AVATAR_QUEST_COMPLETE_INFO package.

From what I see you have to use binary operators.

Does anyone know how to send the complete quest?

I have no idea how to fill the package.
Thanks
 
Experienced Elementalist
Joined
Apr 17, 2006
Messages
220
Reaction score
47
Hi

I am working on the quest but I have no idea how to save the quest in the sGU_AVATAR_QUEST_COMPLETE_INFO package.

From what I see you have to use binary operators.

Does anyone know how to send the complete quest?

I have no idea how to fill the package.
Thanks

Maybe you won't read this comment.
But you need read the ".t"(or '.ts') files which are inside in ".e" files

Using the same way like client does(Check DboTrigger, NtlTrigger, and have one more solution which i don't remember)
After you use the Library from client(if this 2 are correct) you need write a Wrapper to take the quest id by their type

sUG_TS_CONFIRM_STEP_REQ *req = (sUG_TS_CONFIRM_STEP_REQ*)packet.GetPacketBuffer();
switch(req->byType) {
//write these two cases, one is for Quest and other is for trigger
//After write these two cases, use your wrapper to find your quest progress through tId and tcCurId
}
The example above will handle rewards, triggers, TLQ, etc, without hardcode

I suggest to check out how client handle the "sGU_AVATAR_QUEST_COMPLETE_INFO" struct to take as sample in how to do it
:)
(maybe need check in how to load the quests you taken, to see if has any relation with)
 
Newbie Spellweaver
Joined
Aug 16, 2017
Messages
84
Reaction score
34
Maybe you won't read this comment.
But you need read the ".t"(or '.ts') files which are inside in ".e" files

Using the same way like client does(Check DboTrigger, NtlTrigger, and have one more solution which i don't remember)
After you use the Library from client(if this 2 are correct) you need write a Wrapper to take the quest id by their type


The example above will handle rewards, triggers, TLQ, etc, without hardcode

I suggest to check out how client handle the "sGU_AVATAR_QUEST_COMPLETE_INFO" struct to take as sample in how to do it
:)
(maybe need check in how to load the quests you taken, to see if has any relation with)

Thank you very much, I have already found what I needed:


if (nextStep==255) {
unsigned char& c = res2->completeInfo.abyQCInfo[questID / eCOMPLETE_QUEST_QUEST_PER_BYTE];
int nShift = (questID % eCOMPLETE_QUEST_QUEST_PER_BYTE) * eCOMPLETE_QUEST_STATE_MAX;

c |= (eCOMPLETE_QUEST_STATE_CLEAR << nShift);
iQuestCounter++;
}

 
Experienced Elementalist
Joined
Apr 17, 2006
Messages
220
Reaction score
47
Thank you very much, I have already found what I needed:


if (nextStep==255) {
unsigned char& c = res2->completeInfo.abyQCInfo[questID / eCOMPLETE_QUEST_QUEST_PER_BYTE];
int nShift = (questID % eCOMPLETE_QUEST_QUEST_PER_BYTE) * eCOMPLETE_QUEST_STATE_MAX;

c |= (eCOMPLETE_QUEST_STATE_CLEAR << nShift);
iQuestCounter++;
}


Just take care with this hardcoded, not all quest end in 255, some of then ends in 254(or less, if i remember) ...
That's why i suggested to use the Wrapper, will make your life alot easier and you could use their Constants(and their macros)
 
Newbie Spellweaver
Joined
Aug 16, 2017
Messages
84
Reaction score
34
thank you. I am using the questwrapper, using the defined macro I control when a quest begins and ends. Thank you
 
Back
Top