Well Basicly when it logs on if Quest is toggled on the config it opens quest history (when it logs on) and checks the quest progress. in its quest handler it decides wether it needs to start quest/finish quest or complete the quest, (all in quest_list_handler), bassicly if the quest isnt
started it notices it, send the quest start packet, checks quest history again and then stops. after its checked the quest history (i presume its because the quest history is still up and wont let it do anything else), if the quest is done and all kills are complete it goes to quest finish packet
-> quest history -> quest start -> quest history (to clarify the kills) -> stuck (doesnt move/attack npc's). if the quest isnt finished yet it does nothing and tries to carry on and gets stucks.
my quest handler
reader.GetChar(); //book type progress
int questsize = reader.GetShort(); // quests size
Console::Out("Quest History Opened");
for (int i = 0; i < questsize; ++i)
{
std::string questname = reader.GetBreakString(); //questname
std::string description = reader.GetBreakString(); //description
int type = reader.GetShort(); //type
int killed = reader.GetShort(); //amount killed 0 = talk
int amounttokill = reader.GetShort(); //amount to kill 0 = talk
reader.GetByte();
Console::Out("Questname found = " + questname + "Killed ammount: " + util::to_string(killed) + "/" + util::to_string(amounttokill));
//send_reply();
amounttokill2 = amounttokill;
if (questname == "Bird Control (rep)")
{
quest_inprogress = true;
Console::Out("Quest INPROGRESS");
crows = true;
Console::Out("Quest History");
if (crowskilled == 0 && killed > 0 && killed <= 10)
{
crowskilled = killed;
Console::Out("Crows kills found! set to: " + util::to_string(killed));
}
if (crowskilled >= 10 || amounttokill == 0)
{
crows_complete = true;
Console::Out("Crows Complete = True");
quest_inprogress = false;
}
else
{
quest_inprogress = true;
crows_complete = false;
Console::Out("Crows Complete = False");
botfunc::refresh();
//quest(40, newnpc->index);
}
}
else if (i == questsize && crows != true)
{
crows = false;
}
}
}