Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] has anyone managed to change spell values in lua?

[DiscordArchive] has anyone managed to change spell values in lua?

[DiscordArchive] has anyone managed to change spell values in lua?

Pages (3): Previous 1 2 3
rektbyfaith
Administrator
0
04-15-2024, 09:04 PM
#21
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)
```
rektbyfaith
04-15-2024, 09:04 PM #21

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)
```

Pages (3): Previous 1 2 3
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)