From f085b3bd893b406cf6ca0a34a2b99c18af7d1d6b Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Thu, 15 May 2025 21:19:05 +0200 Subject: [PATCH] Piece of shit stupid fucking cunt worthless server --- FreshShit/RayOfHope/init.lua | 9 ++++++- FreshShit/RayOfHope/trigger1.lua | 9 ++++--- FreshShit/RayOfHope/trigger2.lua | 40 ++++++++++++++++++-------------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/FreshShit/RayOfHope/init.lua b/FreshShit/RayOfHope/init.lua index 67975b9..2743c5f 100644 --- a/FreshShit/RayOfHope/init.lua +++ b/FreshShit/RayOfHope/init.lua @@ -1,6 +1,13 @@ aura_env.rayActive = false -aura_env.debug = false +aura_env.debug = true -- Init values for display aura_env.totalHealAbsorb = 0 aura_env.totalDmgAbsorb = 0 + +aura_env.spellID = 197268 +-- aura_env.spellID = 207472 + +-- This just simply does not work on russian wow +-- Because it reports SPELL_MISSED instead of SPELL_ABSORBED +-- And SPELL_MISSED does not carry amount data diff --git a/FreshShit/RayOfHope/trigger1.lua b/FreshShit/RayOfHope/trigger1.lua index c622eb6..6424812 100644 --- a/FreshShit/RayOfHope/trigger1.lua +++ b/FreshShit/RayOfHope/trigger1.lua @@ -14,12 +14,11 @@ function( dstRaidFlags, spellID ) - local rayActive = aura_env.rayActive - if aura_env.debug then rayActive = false end + -- if aura_env.debug then rayActive = false end -- print(string.format("rayActive: %s, eventtype: %s", tostring(rayActive), tostring(eventtype))) - if not rayActive and eventtype == "SPELL_AURA_APPLIED" then - if aura_env.debug then spellID = 197268 end - if spellID == 197268 and srcGUID == UnitGUID("player") then + if not aura_env.rayActive and eventtype == "SPELL_AURA_APPLIED" then + -- if aura_env.debug then spellID = 197268 end + if spellID == aura_env.spellID and srcGUID == UnitGUID("player") then if aura_env.debug then print("Ray applied") end aura_env.rayActive = true diff --git a/FreshShit/RayOfHope/trigger2.lua b/FreshShit/RayOfHope/trigger2.lua index 4bc98cc..b0c492d 100644 --- a/FreshShit/RayOfHope/trigger2.lua +++ b/FreshShit/RayOfHope/trigger2.lua @@ -15,9 +15,12 @@ function( dstRaidFlags, ... ) - local rayActive = aura_env.rayActive - if aura_env.debug then rayActive = true end - if rayActive and (eventtype == "SPELL_ABSORBED" or eventtype == "SPELL_HEAL_ABSORBED") then + aura_env.rayActive = true + if aura_env.debug and aura_env.rayActive then + print(string.format("aura_env.rayActive: %s, eventtype: %s", tostring(aura_env.rayActive), tostring(eventtype))) + end + -- if aura_env.debug then aura_env.rayActive = true end + if aura_env.rayActive and (eventtype == "SPELL_MISSED" or eventtype == "SPELL_HEAL_ABSORBED") then local spellID, spellName, spellSchool, aSrcGUID, aSrcName, _, _, aSpellID, aSpellName, aSpellSchool, aSpellAmountAbsorbed, somebullshit, horseshit = ... local function debuggerprinter() @@ -42,6 +45,7 @@ function( print(str) end end + debuggerprinter() -- Ray absorbed heal -- srcName = Player -- dstName = RoH Target @@ -50,15 +54,14 @@ function( -- aSpellID = Absorbed Heal SpellID -- aSpellAmountAbsorbed = duh; if eventtype == "SPELL_HEAL_ABSORBED" then - if aura_env.debug then spellID = 197268 end - if srcGUID == UnitGUID("player") and spellID == 197268 then - debuggerprinter() + -- if aura_env.debug then spellID = 197268 end + if srcGUID == UnitGUID("player") and spellID == aura_env.spellID then if aura_env.debug then local str = string.format( "Ray of Hope absorbed %s's heal, %s, for %d.", - aSrcName, - aSpellName, - aSpellAmountAbsorbed + tostring(aSrcName), + tostring(aSpellName), + tostring(aSpellAmountAbsorbed) ) print(str) end @@ -76,15 +79,14 @@ function( -- aSrcName = Player -- aSpellID = RoH spellID if eventtype == "SPELL_ABSORBED" then - if aura_env.debug then aSpellID = 197268 end - if aSrcGUID == UnitGUID("player") and aSpellID == 197268 then - debuggerprinter() + -- if aura_env.debug then aSpellID = 197268 end + if aSrcGUID == UnitGUID("player") and aSpellID == aura_env.spellID then if aura_env.debug then local str = string.format( "Ray of Hope absorbed %s's damage, %s, for %d.", - srcName, - spellName, - aSpellAmountAbsorbed + tostring(srcName), + tostring(spellName), + tostring(aSpellAmountAbsorbed) ) print(str) end @@ -98,11 +100,11 @@ function( -- Ray expire if aura_env.rayActive and eventtype == "SPELL_AURA_REMOVED" then local spellID = ... - if spellID == 197268 and srcGUID == UnitGUID("player") then + if srcGUID == UnitGUID("player") and spellID == aura_env.spellID then if aura_env.debug then print("Ray removed.") - print("RoH heals taken: ", aura_env.totalHealAbsorb) - print("RoH dmg taken: ", aura_env.totalDmgAbsorb) + print("RoH heals taken: ", tostring(aura_env.totalHealAbsorb)) + print("RoH dmg taken: ", tostring(aura_env.totalDmgAbsorb)) -- 1.5 represents the 50% modifier to heals into ray local net = aura_env.totalHealAbsorb * 1.5 - aura_env.totalDmgAbsorb @@ -118,5 +120,7 @@ function( aura_env.rayActive = false end + -- else + -- print(string.format("Ray not active (%s) or event fucked %s", tostring(aura_env.rayActive), tostring(eventtype))) end end