[DiscordArchive] has anyone managed to change spell values in lua?
[DiscordArchive] has anyone managed to change spell values in lua?
Archived author: tyrallis • Posted: 2024-04-15T21:04:02.728000+00:00
Original source
```lua
local SPELL_ID = 686 -- Shadow Bolt
local INCREASE_AMOUNT = 100
local bonusDamage = false
local function OnSpellCast(event, player, spell)
if spell:GetEntry() == SPELL_ID and not bonusDamage then
bonusDamage= true
-- spell with bonus effect
player:CastCustomSpell(player:GetSelection(), SPELL_ID, true, INCREASE_AMOUNT, nil, nil, nil, player:GetGUID())
bonusDamage= false
end
end
RegisterPlayerEvent(5, OnSpellCast)
```