Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Guys, in the spell script, I want to implement a spell between 58208 and 58223 that randomly casts s

[DiscordArchive] Guys, in the spell script, I want to implement a spell between 58208 and 58223 that randomly casts s

[DiscordArchive] Guys, in the spell script, I want to implement a spell between 58208 and 58223 that randomly casts s

rektbyfaith
Administrator
0
06-04-2024, 11:56 AM
#1
Archived author: 老爷爷 • Posted: 2024-06-04T11:56:27.894000+00:00
Original source

Guys, in the spell script, I want to implement a spell between 58208 and 58223 that randomly casts spell between 58208 and 58223 when I cast spell 58207. Is that right?
rektbyfaith
06-04-2024, 11:56 AM #1

Archived author: 老爷爷 • Posted: 2024-06-04T11:56:27.894000+00:00
Original source

Guys, in the spell script, I want to implement a spell between 58208 and 58223 that randomly casts spell between 58208 and 58223 when I cast spell 58207. Is that right?

rektbyfaith
Administrator
0
06-04-2024, 11:59 AM
#2
Archived author: 老爷爷 • Posted: 2024-06-04T11:59:16.740000+00:00
Original source

`//spell 58207
class spell_Lich_King_vo_blocker : public AuraScript
{
PrepareAuraScript(spell_Lich_King_vo_blocker);
//spell 58208-58223
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo
({ SPELL_LICHKINGDK001,SPELL_LICHKINGDK002,SPELL_LICHKINGDK003,
SPELL_LICHKINGDK004,SPELL_LICHKINGDK005,SPELL_LICHKINGDK006,
SPELL_LICHKINGDK007, SPELL_LICHKINGDK008,SPELL_LICHKINGDK009,
SPELL_LICHKINGDK010, SPELL_LICHKINGDK011, SPELL_LICHKINGDK012,
SPELL_LICHKINGDK013, SPELL_LICHKINGDK014,SPELL_LICHKINGDK015,
SPELL_LICHKINGDK016
});
}

void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* caster = GetCaster();
caster->CastSpell(eventInfo.GetProcTarget(), urand(SPELL_LICHKINGDK001, SPELL_LICHKINGDK016));
}

void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_Lich_King_vo_blocker::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};`
rektbyfaith
06-04-2024, 11:59 AM #2

Archived author: 老爷爷 • Posted: 2024-06-04T11:59:16.740000+00:00
Original source

`//spell 58207
class spell_Lich_King_vo_blocker : public AuraScript
{
PrepareAuraScript(spell_Lich_King_vo_blocker);
//spell 58208-58223
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo
({ SPELL_LICHKINGDK001,SPELL_LICHKINGDK002,SPELL_LICHKINGDK003,
SPELL_LICHKINGDK004,SPELL_LICHKINGDK005,SPELL_LICHKINGDK006,
SPELL_LICHKINGDK007, SPELL_LICHKINGDK008,SPELL_LICHKINGDK009,
SPELL_LICHKINGDK010, SPELL_LICHKINGDK011, SPELL_LICHKINGDK012,
SPELL_LICHKINGDK013, SPELL_LICHKINGDK014,SPELL_LICHKINGDK015,
SPELL_LICHKINGDK016
});
}

void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* caster = GetCaster();
caster->CastSpell(eventInfo.GetProcTarget(), urand(SPELL_LICHKINGDK001, SPELL_LICHKINGDK016));
}

void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_Lich_King_vo_blocker::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};`

rektbyfaith
Administrator
0
06-04-2024, 12:44 PM
#3
Archived author: Honey • Posted: 2024-06-04T12:44:53.836000+00:00
Original source

For new support related questions, please use <#1247452612077420544>
rektbyfaith
06-04-2024, 12:44 PM #3

Archived author: Honey • Posted: 2024-06-04T12:44:53.836000+00:00
Original source

For new support related questions, please use <#1247452612077420544>

rektbyfaith
Administrator
0
06-20-2024, 05:59 PM
#4
Archived author: Gibbs Greatly • Posted: 2024-06-20T17:59:19.760000+00:00
Original source

With playerbots if bots are around you
rektbyfaith
06-20-2024, 05:59 PM #4

Archived author: Gibbs Greatly • Posted: 2024-06-20T17:59:19.760000+00:00
Original source

With playerbots if bots are around you

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