Discussion in 'Scripts' started by byaussy, May 28, 2013.

  1. byaussy

    byaussy Member

    Messages:
    29
    I thought this might be handy for folks that might need to retrieve the AmountRemaining value for a maintaned spell or effect. This will retrieve the amount of hit points remaining on a ward, the amount of triggers remaining on a reactive heal, etc.

    Just pass in the name (or partial name) of the maintained effect you want and it will return the AmountRemaining.

    Code (Text):

    function main(int _Skip=0)
    {
        call GetRemainingValue "Malevolent Diatribe"
        echo ${Return}
    }


    function GetRemainingValue(string SpellName)
    {
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_1.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_1.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_2.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_2.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_3.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_3.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_4.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_4.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_5.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_5.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_6.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_6.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_7.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_7.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_8.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_8.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_9.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_9.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_10.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_10.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_11.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_11.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_12.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_12.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_13.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_13.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_14.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_14.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_15.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_15.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_16.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_16.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_17.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_17.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_18.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_18.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_19.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_19.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_20.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_20.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_21.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_21.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_22.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_22.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_23.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_23.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_24.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_24.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_25.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_25.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_26.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_26.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_27.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_27.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_28.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_28.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_29.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_29.AmountRemaining"].ShortLabel}
        if ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_30.Name"].Label.Find[${SpellName}]}
            return ${EQ2DataSourceContainer[GameData].GetDynamicData["Maintained.Spell_30.AmountRemaining"].ShortLabel}
    }


     
  2. lixleon

    lixleon Member

    Messages:
    85
    The value from this script is non-numeric, how can I convert it to numeric?
    Last edited: Jul 20, 2015

Share This Page