ScanBuffs
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.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
iconID |
Optional. Keep only the buffs with this icon ID, a plain number. Bless is 30018 ($7542). |
Reading the results
Section titled “Reading the results”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.
Examples
Section titled “Examples”List every active buff in the journal:
scanbuffsfor %i 1 #BuffCnt{ set #BuffIndex %i event sysmessage #BuffName : #BuffTime s}haltRecast Bless when it is about to run out:
scanbuffs 30018if #BuffCnt = 0 || #BuffTime < 10 display ok Time to recast Bless.haltTell a closed buff bar from an empty one:
scanbuffsif #BuffBarOpen = #false display ok Open the buff bar first.halt- The buff bar window must be open. The data lives in the client’s
BuffIconsgump. With the window closed,#BuffCntis0and the other variables readN/A. The sameN/Aappears 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, sostr pos #BuffName Blessworks. #BuffTimeupdates 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 shows0.- 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,#BuffTimeand#BuffIndexreadN/Auntil the nextScanBuffsorset #BuffIndex.#BuffCntis always the live count. Inside a loop over#BuffIndex, positions can shift if a buff ends meanwhile: runScanBuffsagain if you need a fixed list.
Reforged notes
Section titled “Reforged notes”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.