Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [Ubertip] => Bitter, but refreshing.
            [Art] => ReplaceableTextures\CommandButtons\BTNINV_Flask_01.blp
            [abilList] => Array
                (
                )

            [Name] => Bottomless Mana Flask
        )

    [settings] => Array
        (
            [balanceTip] => Array
                (
                )

            [goldcost] => 900
            [author] => Ashbringer
            [authorDisplay] => |cffff6600Ashbringer|r
            [version] => 1.0
            [rarity] => rare
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Item Creation
                    [code] => set itm.userInt = 0
    call itm.setCharges(itm.userInt)
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [1] => Array
                (
                    [name] => Periodic
                    [code] => local Tower tower = itm.getCarrier()
    local real max_mana = GetUnitState(tower.getUnit(), UNIT_STATE_MAX_MANA)
    local integer start = itm.userInt

    if itm.userInt<50 then
        set itm.userInt = itm.userInt + 1
    endif
    
    if max_mana > 0 then
        if (GetUnitState(tower.getUnit(), UNIT_STATE_MANA) / max_mana) < 0.3 then
            call tower.addManaPerc(0.01 * I2R(itm.userInt))
            call Effect.createScaled("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl", tower.getX(), tower.getY(), 35, 270, 1.0).setLifetime(2.0)
        
            set itm.userInt = 0
        endif
    endif
    
    if itm.userInt != start then
        call itm.setCharges(itm.userInt)
    endif
                    [values] => Array
                        (
                            [explain] => The flask gains |cffFFFF801|r charge every |cffFFFF804|r seconds, up to |cffFFFF8050|r maximum. Automatically consume all charges if current mana is below |cffFFFF8030%|r, restoring |cffFFFF801%|r of maximum mana per charge.
                            [visible] => true
                            [goldcost] => 900
                            [PERIODIC_period] => 4
                            [name] => Bottomless Bottoms Up
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)