[DiscordArchive] I am very new at Lua scripting, can someone see...
[DiscordArchive] I am very new at Lua scripting, can someone see...
Archived author: Needle • Posted: 2025-01-05T19:11:15.872000+00:00
Original source
Archived author: Needle • Posted: 2025-01-05T19:11:16.427000+00:00
Original source
Thread automatically created by Revanas in <#415944535718494208>
Archived author: Exced™ • Posted: 2025-01-05T19:14:06.500000+00:00
Original source
-- Define the spell IDs and buff IDs
local SPELL_JUDGEMENT = 800001 -- Judgement spell ID
local BUFF_SEAL_OF_RIGHTEOUSNESS = 21084 -- Seal of Righteousness buff ID
local SPELL_JUDGEMENT_OF_RIGHTEOUSNESS = 20187 -- Judgement of Righteousness spell ID
-- Event triggered when a spell is cast
local function OnSpellCast(event, player, spell, skipCheck)
-- Check if the spell cast is Judgement
if spell:GetEntry() == SPELL_JUDGEMENT then
-- Check if the player has the Seal of Righteousness buff
if player:HasAura(BUFF_SEAL_OF_RIGHTEOUSNESS) then
-- Get the player's target
local target = player:GetVictim()
-- Check if the target is valid and alive
if target and target:IsAlive() and player:GetDistance(target) <= 30 then -- Check distance (30 yards is a common range)
-- Cast Judgement of Righteousness on the target
player:CastSpell(target, SPELL_JUDGEMENT_OF_RIGHTEOUSNESS)
-- Remove the Seal of Righteousness buff from the player
player:RemoveAura(BUFF_SEAL_OF_RIGHTEOUSNESS)
end
end
end
end
-- Register the event for spell cast
RegisterPlayerEvent(5, OnSpellCast) -- Event 5 corresponds to spell cast events
try this maybe? im fairly new as well
Archived author: Revanas • Posted: 2025-01-05T19:22:16.579000+00:00
Original source
Nothing
Archived author: Revanas • Posted: 2025-01-05T19:26:54.817000+00:00
Original source
I seperated the script, the Judgement of Righteousness just wont be cast on target
Archived author: Exced™ • Posted: 2025-01-05T19:37:16.699000+00:00
Original source
hmm
Archived author: Revanas • Posted: 2025-01-05T19:43:26.885000+00:00
Original source
I made a check, it seems that whenever i cast judgement, game thinks Seal of Righteousness is not active
Archived author: Hil • Posted: 2025-01-05T20:24:42.411000+00:00
Original source
u sure ur casting the correct ranks? diff spell ids.
Archived author: Revanas • Posted: 2025-01-05T20:25:38.979000+00:00
Original source
Yah, did a lot of testing, the best I got is that it would do damage, but no judgement animation would play
Archived author: Revanas • Posted: 2025-01-05T20:28:05.427000+00:00
Original source
its either i get judgement animation to play but nothing happens or i do damage but no judgement cast