[DiscordArchive] Guys, how do you get a creature to use a "shooting skill" in the script?
[DiscordArchive] Guys, how do you get a creature to use a "shooting skill" in the script?
Archived author: 老爷爷 • Posted: 2023-06-11T07:11:47.855000+00:00
Original source
Guys, how do you get a creature to use a "shooting skill" in the script?
Archived author: 老爷爷 • Posted: 2023-06-11T07:13:24.258000+00:00
Original source
void Update(const uint32 diff)
{
npc_escortAI::UpdateAI(diff);
` if (!UpdateVictim())
return;
if (me->isAttackReady(BASE_ATTACK))
{
if (!me->IsWithinDist(me->GetVictim(), ATTACK_DISTANCE))
DoCastVictim(SPELL_SHOOT, true);
else
{
me->SetSheath(SHEATH_STATE_MELEE);
me->AttackerStateUpdate(me->GetVictim());
}
me->resetAttackTimer();
}`
Archived author: 老爷爷 • Posted: 2023-06-11T07:15:04.648000+00:00
Original source
It does not shoot at the enemy, Will only lock the enemy in a daze.
Archived author: 老爷爷 • Posted: 2023-06-11T07:17:18.770000+00:00
Original source
The code is in serverscriptsEasternKingdomszone_westfall.cpp