ServUO Version
Publish Unknown
Ultima Expansion
Mondain's Legacy
Hi all, using a RunUO 2.2 server and I've implemented sleeping in a rolled out bedroll to advance the time by 8 hours. This helps to pass the night (or advance to it) and recharge all of the stats. This is for a single player server but I'd love to notice other players to hop into a bed/bedroll and go to sleep. Similar feel as Minecraft or Valheim.

Also, graphically, is it possible to get the screen to go black like the death screen shows momentarily for 15-30 seconds? This would simulate the character shutting their eyes and sleeping.

Any help is appreciated, thanks all.
 
Theoretically - it is possible. But at the same time, the inscription "you're death" will appear, which is unlikely you want to see.
If you are using clients around version 7.0.22 or higher, then they already have Flash effects of this kind, which allow you to apply darkening or vice versa brightening like flash effects. However, these effects were added in the RunUO 2.3 release and may not be in your build. However, you could check for them, or just add them if your client matches.

There is an even simpler way - it's just to send a black gump with Closable = false; draggable=false; properties and a size that covers the dimensions of the client's screen. This will even allow you to display a message like "You're sleeping ".
 
Thanks Juzzver, I think your suggestion with sending a gump is the route I'll go with. I'll produce that with a resting image and message. Play some resting music theme music and then close it out with a callback on the timer. I looked at the Packets.cs file and it did not have the screen flash effects implemented. I'm using ClassicUO, so maybe the client would support it? The client is targeted at version 7.0.15.1. I haven't done a code dive into client code so I don't know how ClassicUO does or doesn't restrict or adds features to work with different server versions.
 
Back