582 and 594 seem to be fleeing tasks.
When someone is drawing his weapon and fighting me, there are tasks in this order: 343, 355, 364 and 428 (I think the 428 is the fighting one, the others are for drawing guns or going into some stance, I suppose).
When NPCs are walking around and I shoot them, tasks I get are 47 and 320 (I guess 320 is the walking one and 47 is being hit or so?).
Have not found the bleeding one yet 😕
Edit: 603 seems to be writhing on the ground. 121 is in a chain of multiple tasks when someone is dying. 608 seems to be the last task in a chain when dying on the ground while writhing. When someone is burning, its 39 then 588.
I suppose bleeding out (at least some versions of them) is one of those: 56, 57, 243 (more tests necessary, though - cant say anything right now)
Here is the code for drawing the tasks on screen, in case anyone wants to try stuff (draws a list of tasks on the screen, the ped you are aiming at is doing):
char c[40];
std::string text = "NPC Task ID: ";
Player player = PLAYER::PLAYER_ID();
Ped playerPed = PLAYER::PLAYER_PED_ID();
strcpy(c, text.c_str());
DrawText(0.15, 0.15, c);
if (WEAPON::IS_PED_WEAPON_READY_TO_SHOOT(playerPed))
{
Entity playerTarget;
if (PLAYER::GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(player, &playerTarget))
{
for (int g = 0; g < 999; g++)
{
if (g != 582 && g != 594 && AI::GET_IS_TASK_ACTIVE(playerTarget, g))
{
if (text.find("," + std::to_string(g) + ",") == string::npos)
{
if (text == "NPC Task ID: ") text += std::to_string(g);
else text += "," + std::to_string(g);
strcpy(c, text.c_str());
DrawText(0.15, 0.15, c);
}
}
}
}
}
Edit 2: Could it be that there is no task for the artery shot behavior? It seems to me that every time I think I have the right task id, it turns out not being it^^