I'm making the switch back over to Stuf from when I played a few years ago, and instead of icons for different statuses (pvp, comabt, etc.), I want to use text as indicators instead. The one I'm really having problems with right now is Resting. I know it's possible to have text representing when a player is resting, but I can't seem to get the code right. Here is an example of what I already have.

The red period is PvP, and the green period is In Combat, which is written as [hpred_if_pvp:.][hpthreshold_if_selfcombat:.]. I once had all the different codes, but that was a different computer. Any help anyone can provide would be awesome.

- - - Updated - - -

Okay, so after a whole day of searching and trying different methods, I still can't get an end result. I found the original code on an old UI thread, but it won't work since it was made for DogTags. I've been trying to tweak it to work for Stuf, but it's a no go. Here is the original code:

function(unit, cache, textframe)
if IsResting() and not InCombatLockdown() then
return "ZZZ"

Anyone know how it would be written for the custom Lua?