Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] I am very new at Lua scripting, can someone see...

[DiscordArchive] I am very new at Lua scripting, can someone see...

[DiscordArchive] I am very new at Lua scripting, can someone see...

Pages (4): 1 2 3 4 Next
rektbyfaith
Administrator
0
01-05-2025, 07:11 PM
#1
Archived author: Needle • Posted: 2025-01-05T19:11:15.872000+00:00
Original source

rektbyfaith
01-05-2025, 07:11 PM #1

Archived author: Needle • Posted: 2025-01-05T19:11:15.872000+00:00
Original source

rektbyfaith
Administrator
0
01-05-2025, 07:11 PM
#2
Archived author: Needle • Posted: 2025-01-05T19:11:16.427000+00:00
Original source

Thread automatically created by Revanas in <#415944535718494208>
rektbyfaith
01-05-2025, 07:11 PM #2

Archived author: Needle • Posted: 2025-01-05T19:11:16.427000+00:00
Original source

Thread automatically created by Revanas in <#415944535718494208>

rektbyfaith
Administrator
0
01-05-2025, 07:14 PM
#3
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
rektbyfaith
01-05-2025, 07:14 PM #3

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

rektbyfaith
Administrator
0
01-05-2025, 07:22 PM
#4
Archived author: Revanas • Posted: 2025-01-05T19:22:16.579000+00:00
Original source

Nothing
rektbyfaith
01-05-2025, 07:22 PM #4

Archived author: Revanas • Posted: 2025-01-05T19:22:16.579000+00:00
Original source

Nothing

rektbyfaith
Administrator
0
01-05-2025, 07:26 PM
#5
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
rektbyfaith
01-05-2025, 07:26 PM #5

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

rektbyfaith
Administrator
0
01-05-2025, 07:37 PM
#6
Archived author: Exced™ • Posted: 2025-01-05T19:37:16.699000+00:00
Original source

hmm
rektbyfaith
01-05-2025, 07:37 PM #6

Archived author: Exced™ • Posted: 2025-01-05T19:37:16.699000+00:00
Original source

hmm

rektbyfaith
Administrator
0
01-05-2025, 07:43 PM
#7
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
rektbyfaith
01-05-2025, 07:43 PM #7

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

rektbyfaith
Administrator
0
01-05-2025, 08:24 PM
#8
Archived author: Hil • Posted: 2025-01-05T20:24:42.411000+00:00
Original source

u sure ur casting the correct ranks? diff spell ids.
rektbyfaith
01-05-2025, 08:24 PM #8

Archived author: Hil • Posted: 2025-01-05T20:24:42.411000+00:00
Original source

u sure ur casting the correct ranks? diff spell ids.

rektbyfaith
Administrator
0
01-05-2025, 08:25 PM
#9
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
rektbyfaith
01-05-2025, 08:25 PM #9

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

rektbyfaith
Administrator
0
01-05-2025, 08:28 PM
#10
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
rektbyfaith
01-05-2025, 08:28 PM #10

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

Pages (4): 1 2 3 4 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)