Start custom taxi flight on talk with npc.

Hello, i would like to know how can i make npc start to flight and take me with him as a mount when i talk to it.

I don’t know if you understand me guys but i want to make something like the Dragon Soul dragon transporters.

How can be this made? Maybe a c++ script or SmartAI?

You mean this? https://youtu.be/6yGi4tG1oT4?t=393

If you want a custom route you can make it by adding it to where the normal routes are (DBC) and just start the path with player->ActivateTaxiPathTo(pathId);
You can also do it with C++, but that requires a function to add / edit the DBC structure or you need to make it make a copy of it into an editable container.

The code below should add a new path from the path nodes you have in a list. If you decide to do it by other means you can use the same logic I guess at least.
However the SetEntry function is not implemented in TC by default.

Note that the path data is not meant to be changed so you should always use same path nodes and pathID when restarting etc.
Players can for example log out during a flight and when they log in they are back where they logged out of the flight. For situation like this Im unsure what happens if the path suddenly is different on login.

[CODE]// Only run this code once per path on start up.

void AddTaxiPath(std::list nodes, uint32 pathid)
{
// not allowed only 1 point
if (nodes.size() < 2)
return;
if (sTaxiPathNodesByPath.size() <= pathId)
sTaxiPathNodesByPath.resize(pathId + 1);
sTaxiPathNodesByPath[pathId].clear();
sTaxiPathNodesByPath[pathId].resize(nodes.size());
static uint32 nodeId = 500;
uint32 startNode = nodeId;
uint32 index = 0;
for (std::list::iterator it = nodes.begin(); it != nodes.end(); ++it)
{
TaxiPathNodeEntry& entry = it;
TaxiNodesEntry
nodeEntry = new TaxiNodesEntry();
entry.PathID = pathId;
entry.NodeIndex = nodeId;
nodeEntry->ID = index;
nodeEntry->map_id = entry.MapID;
nodeEntry->x = entry.LocX;
nodeEntry->y = entry.LocY;
nodeEntry->z = entry.LocZ;
nodeEntry->MountCreatureID[0] = mountH;
nodeEntry->MountCreatureID[1] = mountA;
sTaxiNodesStore.SetEntry(nodeId++, nodeEntry);
sTaxiPathNodesByPath[pathId].set(index++, new TaxiPathNodeEntry(entry));
}
if (startNode >= nodeId)
return;
sTaxiPathSetBySource[startNode][nodeId - 1] = TaxiPathBySourceAndDestination(pathId, price);
TaxiPathEntry* pathEntry = new TaxiPathEntry();
pathEntry->from = startNode;
pathEntry->to = nodeId - 1;
pathEntry->ID = pathId;
pathEntry->price = price;
sTaxiPathStore.SetEntry(pathId, pathEntry);
}
[/CODE]

You mean this? https://youtu.be/6yGi4tG1oT4?t=393

If you want a custom route you can make it by adding it to where the normal routes are (DBC) and just start the path with player->ActivateTaxiPathTo(pathId);
You can also do it with C++, but that requires a function to add / edit the DBC structure or you need to make it make a copy of it into an editable container.

The code below should add a new path from the path nodes you have in a list. If you decide to do it by other means you can use the same logic I guess at least.
However the SetEntry function is not implemented in TC by default.

Note that the path data is not meant to be changed so you should always use same path nodes and pathID when restarting etc.
Players can for example log out during a flight and when they log in they are back where they logged out of the flight. For situation like this Im unsure what happens if the path suddenly is different on login.

// Only run this code once per path on start up.

void AddTaxiPath(std::list nodes, uint32 pathid)
{
// not allowed only 1 point
if (nodes.size() < 2)
return;
if (sTaxiPathNodesByPath.size() <= pathId)
sTaxiPathNodesByPath.resize(pathId + 1);
sTaxiPathNodesByPath[pathId].clear();
sTaxiPathNodesByPath[pathId].resize(nodes.size());
static uint32 nodeId = 500;
uint32 startNode = nodeId;
uint32 index = 0;
for (std::list::iterator it = nodes.begin(); it != nodes.end(); ++it)
{
TaxiPathNodeEntry& entry = it;
TaxiNodesEntry
nodeEntry = new TaxiNodesEntry();
entry.PathID = pathId;
entry.NodeIndex = nodeId;
nodeEntry->ID = index;
nodeEntry->map_id = entry.MapID;
nodeEntry->x = entry.LocX;
nodeEntry->y = entry.LocY;
nodeEntry->z = entry.LocZ;
nodeEntry->MountCreatureID[0] = mountH;
nodeEntry->MountCreatureID[1] = mountA;
sTaxiNodesStore.SetEntry(nodeId++, nodeEntry);
sTaxiPathNodesByPath[pathId].set(index++, new TaxiPathNodeEntry(entry));
}
if (startNode >= nodeId)
return;
sTaxiPathSetBySource[startNode][nodeId - 1] = TaxiPathBySourceAndDestination(pathId, price);
TaxiPathEntry* pathEntry = new TaxiPathEntry();
pathEntry->from = startNode;
pathEntry->to = nodeId - 1;
pathEntry->ID = pathId;
pathEntry->price = price;
sTaxiPathStore.SetEntry(pathId, pathEntry);
}

​So is there any other easier way to to that? I cant understand the logic of this code. What do you mean by starting it with player->ActivateTaxiPathTo(pathId);?

​Ok i understand it but how can i edit the dbc files under linux?