Skip to content

ScanBuffs

CommandClientNeeds clientNew in Reforged
scanbuffs [iconID]
Sets
#BuffCnt, #BuffIndex, #BuffID, #BuffCliloc, #BuffName, #BuffDesc, #BuffTime
uo.dll
ScanBuffs

Also searchable as: ScanBuffs · buff bar · buffs · bless · curse · buff timer

ScanBuffs reads the buffs and debuffs shown in the client’s buff bar. Like FindItem, it takes a snapshot, selects the first entry and says how many there are in #BuffCnt. Set #BuffIndex (1-based) to walk through the rest, the way #FindIndex walks FindItem’s results.

ScanBuffs only reads client memory. It writes nothing and patches nothing, so it cannot disturb the client.

Parameter Meaning
iconID Optional. Keep only the buffs with this icon ID, a plain number. Bless is 30018 ($7542).

For the selected buff:

Variable Value
#BuffID Icon ID, a plain number.
#BuffCliloc Cliloc number of the buff’s title.
#BuffName First line of the tooltip, e.g. Bless.
#BuffDesc Second line of the tooltip.
#BuffTime Seconds left, as the tooltip shows them. -1 means the buff has no timer (Hiding, for one).

#BuffCnt is the number of buffs, and #BuffBarOpen tells whether the buff bar window is open at all.

List every active buff in the journal:

scanbuffs
for %i 1 #BuffCnt
{
set #BuffIndex %i
event sysmessage #BuffName : #BuffTime s
}
halt

Recast Bless when it is about to run out:

scanbuffs 30018
if #BuffCnt = 0 || #BuffTime < 10
display ok Time to recast Bless.
halt

Tell a closed buff bar from an empty one:

scanbuffs
if #BuffBarOpen = #false
display ok Open the buff bar first.
halt
  • The buff bar window must be open. The data lives in the client’s BuffIcons gump. With the window closed, #BuffCnt is 0 and the other variables read N/A. The same N/A appears for a buff that has no tooltip text.
  • Texts come from the client’s own cliloc table, so they are in the client’s language. ~1_STR~ arguments are filled in, <br> becomes a space and other markup is dropped. Spaces become _, as in every string variable, so str pos #BuffName Bless works.
  • #BuffTime updates in coarse steps (about every 5 seconds), because that is how often the client refreshes the tooltip. A buff whose timer the client no longer knows shows 0.
  • The variables follow the client live. The selected buff is found again by its icon ID when other buffs come and go. Once it leaves the bar, #BuffID, #BuffCliloc, #BuffName, #BuffDesc, #BuffTime and #BuffIndex read N/A until the next ScanBuffs or set #BuffIndex. #BuffCnt is always the live count. Inside a loop over #BuffIndex, positions can shift if a buff ends meanwhile: run ScanBuffs again if you need a fixed list.

ScanBuffs and all #Buff… variables are new in EasyUO Reforged. No existing command, variable or script changes meaning because of them.

It works on clients whose buff bar layout has been verified: the 7.0.117.1 beta (client_beta.exe) and the fixed-base clients (checked on 7.0.117.1 and on a 2013 client). On any other client the command does nothing and the variables read N/A, so it never reads garbage from an unverified layout.

See also