Forums WoW Modding Support Archives Azerothcore Discord Archives [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?

[DiscordArchive] Guys, how do you get a creature to use a "shooting skill" in the script?

rektbyfaith
Administrator
0
06-11-2023, 07:11 AM
#1
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?
rektbyfaith
06-11-2023, 07:11 AM #1

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?

rektbyfaith
Administrator
0
06-11-2023, 07:13 AM
#2
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();
}`
rektbyfaith
06-11-2023, 07:13 AM #2

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();
}`

rektbyfaith
Administrator
0
06-11-2023, 07:15 AM
#3
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.
rektbyfaith
06-11-2023, 07:15 AM #3

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.

rektbyfaith
Administrator
0
06-11-2023, 07:17 AM
#4
Archived author: 老爷爷 • Posted: 2023-06-11T07:17:18.770000+00:00
Original source

The code is in serverscriptsEasternKingdomszone_westfall.cpp
rektbyfaith
06-11-2023, 07:17 AM #4

Archived author: 老爷爷 • Posted: 2023-06-11T07:17:18.770000+00:00
Original source

The code is in serverscriptsEasternKingdomszone_westfall.cpp

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)