Zenbot Wiki Buffs

Buffs

From Zenbot Wiki
Revision as of 16:04, 1 April 2023 by 電池 (talk | contribs) (Created page with "=== Obtaining buff.obj === ==== Through obj.buff ==== This is the recommended way to obtain buffs ===== Example 1 - hash ===== local DravenSpinningAttack = player.buff[`DravenSpinningAttack`] print("Player has " .. (DravenSpinningAttack and "a spinning axe!" or "nothing?")) ===== Example 2 - string ===== local function getApheliosManager(t) return player.buff["Aphelios" .. t .. "Manager"] end if getApheliosManager("Infernum") then print("Player has...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Obtaining buff.obj

Through obj.buff

This is the recommended way to obtain buffs

Example 1 - hash
local DravenSpinningAttack = player.buff[`DravenSpinningAttack`]

print("Player has " .. (DravenSpinningAttack and "a spinning axe!" or "nothing?"))
Example 2 - string
local function getApheliosManager(t)
    return player.buff["Aphelios" .. t .. "Manager"]
end

if getApheliosManager("Infernum") then
    print("Player has ApheliosInfernumManager")
end
Example 3 - type
local slow = player.buff[Buff.Slow]

if slowthen
    print("Player is slowed until ", slow.endTime)
end