Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

shorten hp/mana by k or m #1

Description

@mwonng

i put a code which might be good or more friendly than AbbreviateLargeNumbers for target, especially for boss hp,hope it would be help.

local function FormatNumber(val)
    if val >= 10^6 then
        return string.format("%.2fm", val / 10^6)
    elseif val >= 10^3 then
        return string.format("%.1fk", val / 10^3)
    else
        return tostring(val)
    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions