[DiscordArchive] you mean the escort npc you posted above?
[DiscordArchive] you mean the escort npc you posted above?
Archived author: Miracololx • Posted: 2025-07-31T10:07:35.908000+00:00
Original source
you mean the escort npc you posted above?
Archived author: Crane • Posted: 2025-07-31T10:11:12.341000+00:00
Original source
yes
Archived author: Miracololx • Posted: 2025-07-31T10:13:49.952000+00:00
Original source
ah nwm i see
Archived author: Miracololx • Posted: 2025-07-31T10:14:06.687000+00:00
Original source
did you try to debug if Start(false, true, who->GetGUID()); gets called?
Archived author: Miracololx • Posted: 2025-07-31T10:15:21.174000+00:00
Original source
could try to compile in debug mode, set a breakpoint to see if this line gets called
Archived author: Crane • Posted: 2025-07-31T10:18:32.207000+00:00
Original source
I have already built a debug in the script to see if the function is called and the chat text appears but it does not start
Archived author: Miracololx • Posted: 2025-07-31T10:19:14.844000+00:00
Original source
so faction gets also changed after boarding and spell is casted?
no errors in logs?
Archived author: Crane • Posted: 2025-07-31T10:21:21.253000+00:00
Original source
Everything works after mounting, he speaks my debug text, he casts the spell that the NPCs summon and I get attacked by the NPCs, everything works but he doesn't start to run the waypoint
and yes no error logs
Archived author: Crane • Posted: 2025-07-31T10:23:06.632000+00:00
Original source
mom
EscortAI::Start: (script: npc_frosthound) is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn (GUID Full: 0xF1500073ED000381 Type: Vehicle Entry: 29677 Low: 897) in my console
Archived author: Crane • Posted: 2025-07-31T10:27:13.943000+00:00
Original source
```c++
struct npc_frosthound : public EscortAI
{
npc_frosthound(Creature* creature) : EscortAI(creature) {}
void AttackStart(Unit* /*who*/) override {}
void JustEngagedWith(Unit* /*who*/) override {}
void EnterEvadeMode(EvadeReason /*why*/) override {}
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
{
if (who->GetTypeId() == TYPEID_PLAYER)
{
if (apply)
Start(false, true, who->GetGUID());
me->CastSpell(me, SPELL_SUMMON_PURSUERS_PERIODIC, true);
}
}
void JustDied(Unit* /*killer*/) override {}
void OnCharmed(bool /*apply*/) override {}
void Reset() override
{
me->SetReactState(REACT_PASSIVE);
}
void UpdateAI(uint32 diff) override
{
EscortAI::UpdateAI(diff);
if (!UpdateVictim())
return;
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
{
Player* player = GetPlayerForEscort();
if (!player)
return;
switch (waypointId)
{
case 1:
me->TextEmote("You've been seen! Use the net and Freezing elixir to keep the dwarves away!", nullptr, true);
break;
case 33:
me->TextEmote("The frosthound has located the thief's hiding place. Confront him!", 0, true);
player->KilledMonsterCredit(29677);
break;
}
}
void JustSummoned(Creature* summon) override
{
summon->ToTempSummon()->SetTempSummonType(TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
summon->ToTempSummon()->InitStats(20000);
if (urand(0, 1))
summon->GetMotionMaster()->MoveFollow(me, 0.0f, 0.0f);
else if (summon->AI())
summon->AI()->AttackStart(me);
}
};```