Its seems like most of that can be completed with manipulation of the quest sytem and few variables. This is how I use the quest for pets
void Quest_Use(Character *character, PacketReader &reader)
{
short npc_index = reader.GetShort();
short quest_id = reader.GetShort();
UTIL_FOREACH(character->map->npcs, npc)
{
if (npc->index == npc_index && npc->ENF().type == ENF::Quest && character->InRange(npc))
{
if(npc->owner && npc->owner->pet && npc->owner->pet->index == npc_index)
{
character->PetFunctions(npc);
return;
}
// The rest of the original quest_use here
and then I have an enum Character TempQuest to switch states
// Response to an NPC dialog
void Quest_Accept(Character *character, PacketReader &reader)
{
/*short session = */reader.GetShort();
/*short dialog_id = */reader.GetShort();
short quest_id = reader.GetShort();
/*short npc_index = */reader.GetShort();
DialogReply type = DialogReply(reader.GetChar());
char action = 0;
if (type == DIALOG_REPLY_LINK)
action = reader.GetChar();
if(character->tempquest == TempQuest::PetFunction1)
{
if(action == 1) // View Bank
{
//do stuff
}
else if(action == 2) // Heal
{
//do stuff
}
}
else if(character->tempquest == TempQuest::PetFunction2)
{
if(action == 1) // do stuff
{
//do stuff
}
else if(action == 2) // do stuff
{
//do stuff
}
else
{
// The original quest_accept function
}
you also need to make your pets a quest type so basicly in your eodata.cpp file edit the enf_data
if(newdata.type == ENF::Pet)
newdata.type = ENF::Quest;
thats a good start anyway :D