All pastes #948603 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-19 08:48 UTC
rendered paste body
        variable int BuffNum = 0
        method buffsearch(string SearchString)
        {
                BuffNum:Set[0]
                do
                {
                                ; Searching for Name AND Effect, since effect usually contains "Increase <Statname>" this will also Match for debuffs, but who cares.
                                if ( ${Me.Buff[${Buffnum}].Name.Find[${SearchString}]} || ${Me.Buff[${Buffnum}].Effect.Find[${SearchString}]} ) && !${Me.Buff[${Buffnum}].Harmful}
                                                return ${Buffnum}
                }
                while ${Me.Buff[${Buffnum:Inc}](exists)}

                return FALSE
        }