Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [Name] => Speed Demon's Reward
            [Art] => ReplaceableTextures\CommandButtons\BTNMedalionOfCourage.blp
            [Ubertip] => Rewards the player with gold and exp for fighting non-stop
            [abilList] => Array
                (
                )

        )

    [settings] => Array
        (
            [author] => Palandu
            [authorDisplay] => |cffbdb76bPalandu|r
            [balanceTip] => Array
                (
                )

            [rarity] => uncommon
            [goldcost] => 144
            [version] => 1.0
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Item Creation
                    [code] => set itm.userInt = -101
   set itm.userInt2 = -101
   set itm.userReal = 0
                    [values] => Array
                        (
                            [visible] => false
                            [name] => 
                            [goldcost] => 0
                            [explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => On Tower Details
                    [code] => call palandu_SpeedBoard.setValue(0, formatFloat(itm.userReal,1))
    return palandu_SpeedBoard
                    [values] => Array
                        (
                            [0] => Array
                                (
                                    [_value] => 0
                                    [typ] => string
                                )

                        )

                )

            [2] => Array
                (
                    [name] => Header
                    [code] => globals
        MultiboardValues palandu_SpeedBoard
    endglobals
    
    //Do not remove or rename this function!
    //Put your initialization tasks here, this function will be called on map init
    private function init takes nothing returns nothing
        set palandu_SpeedBoard = MultiboardValues.create(1)
        call palandu_SpeedBoard.setKey(0, "Total Gold Awarded")
	endfunction
                    [values] => Array
                        (
                            [visible] => false
                            [name] => 
                            [goldcost] => 144
                            [explain] => 
                        )

                )

            [3] => Array
                (
                    [name] => On Attack
                    [code] => local Creep c = Event.getTarget()
    local integer creepLevel = c.getSpawnLevel()
    local real rewardValue
    local Unit t
    
    if itm.userInt > 0 and itm.userInt < creepLevel then
        set rewardValue = 12.0 - (Game.getGameTime() - itm.userInt2)/25
        if rewardValue > 0 then
            set t = itm.getCarrier()
            call t.getOwner().giveGold(rewardValue, t.getUnit(), true, true)
            call t.addExp(rewardValue/2)
            set itm.userReal = itm.userReal + rewardValue
        endif
    endif
    
    set itm.userInt = IMaxBJ(itm.userInt, creepLevel) //so that it can only go up
    set itm.userInt2 = Game.getGameTime()
                    [values] => Array
                        (
                            [visible] => true
                            [name] => Speed Award
                            [goldcost] => 0
                            [explain] => Any time the carrier manages to attack the next creep wave within |cffFFFF8012|r seconds of attacking the current one, it receives bonus exp and gold as a Speed Award. The gold award amount is equal to |cffFFFF8012|r minus the time interval between attacking the different creep waves. The exp award is half of the gold award.
                            [ONATTACK_chance] => 1.0
                            [ONATTACK_chanceLevelAdd] => 0.0
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)