first of all, the quest "?" 's appear on the client side at the first level required. When you click on the desired NPC it should check to see what level the char is on. Then it should check the quest data looking for the NPC id and the req level. after which should send the text in the window and a button to accept the quest.
At that point is when the user accepts it thereby sending the addQuest packet back to the client. This updates the quest log.
When the player returns to the npc quest requester

, it should check whether the desired criteria is met, if it is then it completes the quest and flags it in the journal as done. After which, items, gold, and penya are awarded.
It all follows the same pattern. However, more sniffing is going to be needed to get all the packets for each action.