
Got it to hide with ChatGPT. If someones interested replace the LuaText.
local Version = 1.2
Rage = {}
Rage.Class = {
[GameData.CareerLine.CHOPPA] = {Mainimage="Choppa_Rage", Animation="Choppa_Rage_Animation", Eye="Choppa_Eye"},
[GameData.CareerLine.BLACK_ORC]= {Mainimage="Choppa_Rage", Animation="Choppa_Rage_Animation", Eye="Choppa_Eye"},
[GameData.CareerLine.SLAYER] = {Mainimage="Slayer_Rage", Animation="Slayer_Rage_Animation", Eye="Slayer_Eye"}
}
function Rage.init()
Rage.Enabled = false
RegisterEventHandler(SystemData.Events.ENTER_WORLD, "Rage.Enable")
RegisterEventHandler(SystemData.Events.INTERFACE_RELOADED, "Rage.Enable")
end
function Rage.Enable()
if Rage.Enabled == false then
if GameData.Player.career.line ~= GameData.CareerLine.CHOPPA
and GameData.Player.career.line ~= GameData.CareerLine.BLACK_ORC
and GameData.Player.career.line ~= GameData.CareerLine.SLAYER then return end
CreateWindow("RageWindow", true)
RegisterEventHandler(SystemData.Events.PLAYER_CAREER_RESOURCE_UPDATED, "Rage.Resc")
RegisterEventHandler(SystemData.Events.PLAYER_COMBAT_FLAG_UPDATED, "Rage.UpdateCombatState")
TextLogAddEntry("Chat", 0, L"<icon57> Rage Loaded")
LayoutEditor.RegisterWindow("RageWindow", L"Rage", L"Rage", true, true, true, nil)
AnimatedImageStartAnimation("RageWindowFlames", 0, true, true, 0)
AnimatedImageStartAnimation("RageWindowRedSmoke", 0, true, true, 0)
AnimatedImageStartAnimation("RageWindowYellowSmoke", 0, true, true, 0)
WindowSetAlpha("RageWindowFlames",0)
WindowSetShowing("RageWindowEyes",false)
WindowSetShowing("RageWindowYellowSmoke",false)
WindowSetShowing("RageWindowRedSmoke",false)
DynamicImageSetTexture("RageWindowPicture", Rage.Class[GameData.Player.career.line].Mainimage, 165,204)
DynamicImageSetTextureSlice("RageWindowPicture","Normal")
DynamicImageSetTexture("RageWindowEyes", Rage.Class[GameData.Player.career.line].Mainimage,165,204)
DynamicImageSetTextureSlice("RageWindowEyes", Rage.Class[GameData.Player.career.line].Eye)
AnimatedImageSetTexture("RageWindowYellowSmoke", Rage.Class[GameData.Player.career.line].Animation)
AnimatedImageSetTexture("RageWindowRedSmoke", Rage.Class[GameData.Player.career.line].Animation)
Rage.Enabled = true
Rage.UpdateCombatState()
end
end
function Rage.shtdwn()
UnregisterEventHandler(SystemData.Events.ENTER_WORLD, "Rage.Enable")
UnregisterEventHandler(SystemData.Events.INTERFACE_RELOADED, "Rage.Enable")
UnregisterEventHandler(SystemData.Events.PLAYER_CAREER_RESOURCE_UPDATED, "Rage.Resc")
UnregisterEventHandler(SystemData.Events.PLAYER_COMBAT_FLAG_UPDATED, "Rage.UpdateCombatState")
end
function Rage.UpdateCombatState()
if GameData.Player.inCombat then
WindowSetShowing("RageWindow", true)
else
WindowSetShowing("RageWindow", false)
end
end
function Rage.Resc()
local Resource = GetCareerResource(GameData.BuffTargetType.SELF)
if GameData.Player.career.line == GameData.CareerLine.CHOPPA or GameData.Player.career.line == GameData.CareerLine.SLAYER then
if Resource >= 75 then
WindowSetTintColor("RageWindowFlames", 255, 100, 100)
WindowSetTintColor("RageWindowEyes", 255, 100, 100)
DynamicImageSetTextureSlice("RageWindowPicture","Berzerk")
elseif Resource < 75 and Resource >= 25 then
DynamicImageSetTextureSlice("RageWindowPicture","Fury")
WindowSetTintColor("RageWindowEyes", 255, 255, 255)
else
DynamicImageSetTextureSlice("RageWindowPicture","Normal")
WindowSetTintColor("RageWindowFlames", 255, 255, 255)
end
WindowSetAlpha("RageWindowFlames",Resource/100)
LabelSetText("RageWindowName",towstring(Resource))
WindowSetShowing("RageWindowEyes",Resource >= 25 )
WindowSetShowing("RageWindowYellowSmoke",Resource < 75 and Resource >= 25)
WindowSetShowing("RageWindowRedSmoke",Resource >= 75)
elseif GameData.Player.career.line == GameData.CareerLine.BLACK_ORC then
if Resource == 2 then
WindowSetTintColor("RageWindowFlames", 255, 100, 100)
WindowSetTintColor("RageWindowEyes", 255, 100, 100)
DynamicImageSetTextureSlice("RageWindowPicture","Berzerk")
elseif Resource == 1 then
DynamicImageSetTextureSlice("RageWindowPicture","Fury")
WindowSetTintColor("RageWindowEyes", 255, 255, 255)
else
DynamicImageSetTextureSlice("RageWindowPicture","Normal")
WindowSetTintColor("RageWindowFlames", 255, 255, 255)
end
WindowSetAlpha("RageWindowFlames",(Resource*50)/100)
LabelSetText("RageWindowName",towstring(Resource))
WindowSetShowing("RageWindowEyes",Resource >= 1 )
WindowSetShowing("RageWindowYellowSmoke",Resource == 1)
WindowSetShowing("RageWindowRedSmoke",Resource == 2)
end
end
--Mouse over Tooltip stuff
function Rage.OnMouseOver(flags, x, y)
local data = EA_CareerResourceData[GameData.Player.career.line]
GetStringFormat (EA_CareerResourceData[GameData.Player.career.line].tooltipPointsId,{GetCareerResource(GameData.BuffTargetType.SELF),data.maxPool})
Tooltips.CreateTextOnlyTooltip (SystemData.MouseOverWindow.name)
Tooltips.SetTooltipText (1, 1, GetString (data.tooltipLabelId))
Tooltips.SetTooltipColorDef (1, 1, Tooltips.COLOR_HEADING)
Tooltips.SetTooltipText (2, 1, GetString (data.tooltipDescriptionId))
Tooltips.SetTooltipText (3, 1, GetString (data.tooltipPointsId,{GetCareerResource(GameData.BuffTargetType.SELF),data.maxPool}))
Tooltips.SetTooltipColorDef (3, 1, Tooltips.COLOR_HEADING)
Tooltips.Finalize ()
local anchor = Tooltips.ANCHOR_WINDOW_VARIABLE
if( DoesWindowExist( "MouseOverTargetWindow" ) and SystemData.Settings.GamePlay.staticAbilityTooltipPlacement )
then
anchor = Tooltips.ANCHOR_MOUSE_OVER_TARGET_WINDOW
end
Tooltips.AnchorTooltip (anchor)
end
-- Art by: Gojiragwar, Coded by: Sullemunk, Modified to hide outside combat