EC Add center notifications for luck ending and potion of glorious fortune ending

If you, like me, want a more obvious notification of the ending of your hour of luck from a statue or the ending of the hour of glorious fortune than the disappearing of the buff icons, I have a solution for you.

I have created the following two center notifications:


To use them
Download the following two DDS files from my github repository
https://github.com/TimStotelmeyer/Ultima-Online/blob/main/cst_YourLuckJustEnded.dds
https://github.com/TimStotelmeyer/Ultima-Online/blob/main/cst_GloriousFortuneJustEnded.dds
and put them in your "Textures\My Textures" directory

Add the following lines to the file Textures\Textures.xml at the bottom of the Assets section
		<Texture name="CST_YouAreFree" file="Textures/cst_YouFree.dds"/>
<!-- start of added entries -->
<Texture name="CST_YOURLUCKJUSTENDED" file="Textures/My Textures/cst_YourLuckJustEnded.dds"/>
<Texture name="CST_GLORIOUSFORTUNEJUSTENDED" file="Textures/My Textures/cst_GloriousFortuneJustEnded.dds"/>
<!-- end of added entries-->
</Assets>

Add the following code to the function CenterScreenText.SendCenterScreenTexture in the file sources\CenterScreenText.lua
--start of added code	
if ( message == "yourluckjustended" ) then
DynamicImageSetTexture( "CenterScreenTextImage", "CST_YOURLUCKJUSTENDED", 0, 0 )
DynamicImageSetTextureDimensions( "CenterScreenTextImage", 640, 80 )
WindowSetDimensions("CenterScreenTextImage", 640, 80 )
WindowStopAlphaAnimation("CenterScreenTextImage")
WindowSetAlpha("CenterScreenTextImage", 0)
WindowStartAlphaAnimation("CenterScreenTextImage", Window.AnimationType.LOOP, 0.5, 1, 1, false, 0, 3)
local sid = 1065
PlaySound(1, sid, WindowData.PlayerLocation.x,WindowData.PlayerLocation.y,WindowData.PlayerLocation.z)
CenterScreenText.LOWHPMEStarted = false
CenterScreenText.LOWHPPetStarted = false
end

if ( message == "gloriousfortunejustended" ) then
DynamicImageSetTexture( "CenterScreenTextImage", "CST_GLORIOUSFORTUNEJUSTENDED", 0, 0 )
DynamicImageSetTextureDimensions( "CenterScreenTextImage", 640, 80 )
WindowSetDimensions("CenterScreenTextImage", 640, 80 )
WindowStopAlphaAnimation("CenterScreenTextImage")
WindowSetAlpha("CenterScreenTextImage", 0)
WindowStartAlphaAnimation("CenterScreenTextImage", Window.AnimationType.LOOP, 0.5, 1, 1, false, 0, 3)
local sid = 62
PlaySound(1, sid, WindowData.PlayerLocation.x,WindowData.PlayerLocation.y,WindowData.PlayerLocation.z)
CenterScreenText.LOWHPMEStarted = false
CenterScreenText.LOWHPPetStarted = false
end

--end of added coded

Add the following code to the function BuffDebuff.Update in the file source\BuffDebuffWindow.lua
			else
BuffDebuff.Timers[key] = 0
BuffDebuff.HandleBuffRemoved(key)
--start of added code
if( key == 1187 ) then --glorious fortune potion
CenterScreenText.SendCenterScreenTexture("gloriousfortunejustended")
end
--end of added code
end

Add the following code to the function TextParsing.CenterScreenText in the file source\TextParsing.lua
--start of added code
if ( SystemData.TextID == 1079552) then -- Your luck just ended
CenterScreenText.SendCenterScreenTexture("yourluckjustended")
end
--end of added code


Comments

  • GrimbeardGrimbeard Posts: 2,213
    Why can't we get these and all the other great fixes added in so we don't have to risk messing up something doing it ourselves? 
  • WhitewolfWhitewolf Posts: 216
    edited October 2023
    Grimbeard said:
    Why can't we get these and all the other great fixes added in so we don't have to risk messing up something doing it ourselves? 
    lol that is the question of the  decade. players know more about fixing bugs in UO then the people payed to fix the bugs in UO. unless they have players coding and working on NL there is no hope for it.
  • SethSeth Posts: 2,924
    @Mariah this post needs to archive with the rest of EC tutorials
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • GrimbeardGrimbeard Posts: 2,213
    Seth said:
    @ Mariah this post needs to archive with the rest of EC tutorials
    Why can't these things be directly added ?? @Kyronix @Community Manager
  • Pinco's UI has that already ;)
  • SethSeth Posts: 2,924
    Pinco's UI has that already ;)
    Tried Pinco, it's too heavily mod... 
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
  • SethSeth Posts: 2,924
    Grimbeard said:
    Seth said:
    @ Mariah this post needs to archive with the rest of EC tutorials
    Why can't these things be directly added ?? @ Kyronix @ "Community Manager"
    +⁹99⁹99999999999
    If it ain't broke, don't fix it. 
    ESRB warning: Some Blood. LOTS of Alcohol. Some Violence. LOTS of Bugs
Sign In or Register to comment.