gelatine87

Cell Health Bar Direction

Apr 26th, 2025
10,409
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.63 KB | Gaming | 0 0
  1. -- Settings
  2. -- Possible values:
  3. --    "LTR"     - Left to Right,
  4. --    "RTL"     - Right to Left,
  5. --    "TTB"    - Top to Bottom,
  6. --    "BTT"    - Bottom to top
  7. local FILL_DIRECTION = "BTT"
  8.  
  9. local ATTENUATE_DEAD_BARS = true
  10.  
  11. local function reanchorOutlets(P, outlet, healthBar)
  12.     P.ClearPoints(outlet)
  13.     P.Point(outlet, "TOPLEFT", healthBar:GetStatusBarTexture(), "TOPRIGHT")
  14.     P.Point(outlet, "BOTTOMLEFT", healthBar:GetStatusBarTexture(), "BOTTOMRIGHT")
  15. end
  16.  
  17. local function reanchorInlets(P, inlet, healthBar)
  18.     P.ClearPoints(inlet)
  19.     P.Point(inlet, "TOPLEFT", healthBar:GetStatusBarTexture())
  20.     P.Point(inlet, "BOTTOMLEFT", healthBar:GetStatusBarTexture())
  21. end
  22.  
  23. local function reanchorVerticalOutlets(P, outlet, healthBar)
  24.     P.ClearPoints(outlet)
  25.     P.Point(outlet, "TOPLEFT", healthBar:GetStatusBarTexture(), "BOTTOMLEFT")
  26.     P.Point(outlet, "TOPRIGHT", healthBar:GetStatusBarTexture(), "BOTTOMRIGHT")
  27. end
  28.  
  29. local function reanchorVerticalInlets(P, inlet, healthBar)
  30.     P.ClearPoints(inlet)
  31.     P.Point(inlet, "TOPLEFT", healthBar:GetStatusBarTexture())
  32.     P.Point(inlet, "TOPRIGHT", healthBar:GetStatusBarTexture())
  33. end
  34.  
  35. local function applyFillDirection()
  36.     Cell.funcs.IterateAllUnitButtons(function(b)
  37.             local P = Cell.pixelPerfectFuncs
  38.             local healthBar = b.widgets.healthBar
  39.             local healthBarLoss = b.widgets.healthBarLoss
  40.            
  41.             if FILL_DIRECTION == "LTR" then
  42.                 healthBar:SetOrientation("HORIZONTAL")
  43.                 healthBar:SetReverseFill(true)
  44.                
  45.                 P.ClearPoints(healthBarLoss)
  46.                 P.Point(healthBarLoss, "TOPLEFT", healthBar:GetStatusBarTexture(), "TOPRIGHT")
  47.                 P.Point(healthBarLoss, "BOTTOMRIGHT", healthBar, "BOTTOMRIGHT")
  48.                
  49.                 reanchorOutlets(P, b.widgets.damageFlashTex, healthBar)
  50.                 reanchorOutlets(P, b.widgets.incomingHeal, healthBar)
  51.                 reanchorOutlets(P, b.widgets.shieldBar, healthBar)
  52.                
  53.                 reanchorInlets(P, b.widgets.shieldBarR, healthBar)
  54.                 reanchorInlets(P, b.widgets.absorbsBar, healthBar)
  55.                
  56.             elseif FILL_DIRECTION == "RTL" then
  57.                 healthBar:SetOrientation("HORIZONTAL")
  58.                 healthBar:SetReverseFill(false)
  59.                
  60.                 P.ClearPoints(healthBarLoss)
  61.                 P.Point(healthBarLoss, "TOPLEFT", healthBar, "TOPLEFT")
  62.                 P.Point(healthBarLoss, "BOTTOMRIGHT", healthBar:GetStatusBarTexture(), "BOTTOMLEFT")
  63.                
  64.                 reanchorOutlets(P, b.widgets.damageFlashTex, healthBar)
  65.                 reanchorOutlets(P, b.widgets.incomingHeal, healthBar)
  66.                 reanchorOutlets(P, b.widgets.shieldBar, healthBar)
  67.                
  68.                 reanchorInlets(P, b.widgets.shieldBarR, healthBar)
  69.                 reanchorInlets(P, b.widgets.absorbsBar, healthBar)
  70.                
  71.             elseif FILL_DIRECTION == "TTB" then
  72.                 healthBar:SetOrientation("VERTICAL")
  73.                 healthBar:SetReverseFill(false)
  74.                
  75.                 P.ClearPoints(healthBarLoss)
  76.                 P.Point(healthBarLoss, "TOPLEFT", healthBar, "TOPLEFT")
  77.                 P.Point(healthBarLoss, "BOTTOMRIGHT", healthBar:GetStatusBarTexture(), "TOPRIGHT")
  78.                
  79.                 reanchorVerticalOutlets(P, b.widgets.damageFlashTex, healthBar)
  80.                 reanchorVerticalOutlets(P, b.widgets.incomingHeal, healthBar)
  81.                 reanchorVerticalOutlets(P, b.widgets.shieldBar, healthBar)
  82.                
  83.                 reanchorVerticalInlets(P, b.widgets.shieldBarR, healthBar)
  84.                 reanchorVerticalInlets(P, b.widgets.absorbsBar, healthBar)
  85.                
  86.             elseif FILL_DIRECTION == "BTT" then
  87.                 healthBar:SetOrientation("VERTICAL")
  88.                 healthBar:SetReverseFill(true)
  89.                
  90.                 P.ClearPoints(healthBarLoss)
  91.                 P.Point(healthBarLoss, "TOPLEFT", healthBar:GetStatusBarTexture(), "BOTTOMLEFT")
  92.                 P.Point(healthBarLoss, "BOTTOMRIGHT", healthBar, "BOTTOMRIGHT")
  93.                
  94.                 reanchorVerticalOutlets(P, b.widgets.damageFlashTex, healthBar)
  95.                 reanchorVerticalOutlets(P, b.widgets.incomingHeal, healthBar)
  96.                 reanchorVerticalOutlets(P, b.widgets.shieldBar, healthBar)
  97.                
  98.                 reanchorVerticalInlets(P, b.widgets.shieldBarR, healthBar)
  99.                 reanchorVerticalInlets(P, b.widgets.absorbsBar, healthBar)
  100.             end
  101.            
  102.             -- Special cases
  103.             local overAbsorbGlow = b.widgets.overAbsorbGlow
  104.             local overShieldGlow = b.widgets.overShieldGlow
  105.             P.ClearPoints(overAbsorbGlow)
  106.             P.ClearPoints(overShieldGlow)
  107.            
  108.             if FILL_DIRECTION == "LEFT_TO_RIGHT" or FILL_DIRECTION == "RIGHT_TO_LEFT" then
  109.                 P.Point(overAbsorbGlow, "TOPRIGHT")
  110.                 P.Point(overAbsorbGlow, "BOTTOMRIGHT")
  111.                 P.Point(overShieldGlow, "TOPLEFT")
  112.                 P.Point(overShieldGlow, "BOTTOMLEFT")
  113.             else
  114.                 P.Point(overAbsorbGlow, "TOP")
  115.                 P.Point(overShieldGlow, "TOP")
  116.             end
  117.     end)
  118. end
  119.  
  120. function hookCell()
  121.     if Cell.__fill_direction_hook_installed then return end
  122.    
  123.     if ATTENUATE_DEAD_BARS then
  124.         local F = Cell.funcs
  125.         local oldGetHealthBarColor = F.GetHealthBarColor
  126.         F.GetHealthBarColor = function(...)
  127.             local colors = {oldGetHealthBarColor(...)}
  128.             if not isDeadOrGhost then
  129.                 return unpack(colors)
  130.             end
  131.             return colors[4], colors[5], colors[6], colors[1], colors[2], colors[3]
  132.         end
  133.        
  134.         Cell.funcs.IterateAllUnitButtons(function(button)
  135.                 local originalSetVertexColor = button.widgets.healthBarLoss.SetVertexColor
  136.                 button.widgets.healthBarLoss.SetVertexColor = function(self, r, g, b, a)
  137.                     local dead = button.states.isDeadOrGhost or button.states.isDead
  138.                     if dead then
  139.                         r, g, b, a = button.widgets.healthBar:GetStatusBarColor()
  140.                     end
  141.                     originalSetVertexColor(self, r, g, b, a)
  142.                 end
  143.         end)
  144.     end
  145.    
  146.     local B = Cell.bFuncs
  147.     hooksecurefunc(B, "SetOrientation", function()
  148.             applyFillDirection()
  149.     end)
  150.    
  151.     applyFillDirection()
  152.     Cell.__fill_direction_hook_installed = true
  153. end
  154.  
  155. hookCell()
  156. Cell.RegisterCallback("AddonLoaded", "FillDirectionHook", hookCell)
Tags: WoW Addons Cell
Advertisement
Comments
  • Vinyuxor
    239 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment