Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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