[DiscordArchive] Honey did you have to use the DBC files to find a spell ID of `11` for `Frostbolt`?
[DiscordArchive] Honey did you have to use the DBC files to find a spell ID of `11` for `Frostbolt`?
Archived author: Honey • Posted: 2024-05-12T11:46:19.102000+00:00
Original source
You can use `triggered = true` to bypass all checks. But it makes the spell instant, too.
Archived author: Michael Crilly • Posted: 2024-05-12T11:46:40.511000+00:00
Original source
Aye, I am doing that.
Archived author: Michael Crilly • Posted: 2024-05-12T11:46:51.496000+00:00
Original source
```lua
local npcId = 40000
local haveHealed = false
local personalSpell = 15744
local personalHeal = 635
local personalMessage = "i pec u!!"
local function CastPersonalSpell(eventId, dely, calls, creature)
creature:CastSpell(creature:GetVictim(), personalSpell, true)
end
local function OnEnterCombat(event, creature, target)
creature:SendUnitYell(personalMessage, 0)
creature:RegisterEvent(CastPersonalSpell, 3000, 3)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
creature:RemoveEvents()
end
local function OnDamageTaken(event, creature, attacker, damage)
if(creature:GetHealthPct() < 50 and not haveHealed) then
creature:CastSpell(creature, personalHeal, true)
haveHealed = true
end
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
RegisterCreatureEvent(npcId, 4, OnDied)
-- RegisterCreatureEvent(npcId, 9, OnDamageTaken)```
Archived author: Michael Crilly • Posted: 2024-05-12T11:48:29.108000+00:00
Original source
Does the model being used by the creature effect things?
Archived author: Honey • Posted: 2024-05-12T11:48:55.254000+00:00
Original source
I don't think so o
Archived author: Michael Crilly • Posted: 2024-05-12T11:49:02.788000+00:00
Original source
Rabbit does nothing but melee.
2024-05-12_21-47-31.mp4
Archived author: Honey • Posted: 2024-05-12T11:49:09.486000+00:00
Original source
You can use the same function for died and leave combat btw
Archived author: Michael Crilly • Posted: 2024-05-12T11:49:20.837000+00:00
Original source
Rabbit's code: ```lualocal npcId = 40001
local haveHealed = false
local personalSpell = 3150
local personalHeal = 635
local personalMessage = "nibble nibble"
local function CastPersonalSpell(eventId, dely, calls, creature)
creature:CastSpell(creature:GetVictim(), personalSpell, true)
end
local function OnEnterCombat(event, creature, target)
creature:SendUnitYell(personalMessage, 0)
creature:RegisterEvent(CastPersonalSpell, 3000, 3)
end
local function OnLeaveCombat(event, creature)
creature:RemoveEvents()
end
local function OnDied(event, creature, killer)
if(killer:GetObjectType() == "Player") then
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
end
creature:RemoveEvents()
end
local function OnDamageTaken(event, creature, attacker, damage)
if(creature:GetHealthPct() < 50 and not haveHealed) then
creature:CastSpell(creature, personalHeal, true)
haveHealed = true
end
end
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
-- RegisterCreatureEvent(npcId, 4, OnDied)
-- RegisterCreatureEvent(npcId, 9, OnDamageTaken)```
Archived author: Michael Crilly • Posted: 2024-05-12T11:50:47.803000+00:00
Original source
Rabbit isn't saying personal message neither, it seems.