Add two lines to Init-Personal to setup the vars. (3 if you include the comment)
Code: Select all
Sub Init-Personal
/declare cmds-PERSONAL string outer Personal:
/echo Started CheckBuffs v0.3
/declare myBuffs[16,2] string outer
/Call fnBuffGetCurren
Code: Select all
Sub PersonalMain
/Call fnBuffCheckDroped
/Call fnBuffGetCurrent
/return
Add these functions to the bottom.
Code: Select all
Sub fnBuffCheckDroped
/declare TmpA int local
/declare buffStr string local
/declare buffTellNeeded int local
/varset buffTellNeeded 0
/for TmpA 1 to 16
|/echo ${TmpA} : ${myBuffs[${TmpA},1]} -- ${Me.Buff[${myBuffs[${TmpA},1]}]} -- ${Me.Buff[${myBuffs[${TmpA},1]}].ID}
/if (${myBuffs[${TmpA},2]}) {
/if (!${Me.Buff[${myBuffs[${TmpA},1]}].ID}) {
|/echo Buff Droped - ${myBuffs[${TmpA},1]}
/varset buffStr ${buffStr} ${myBuffs[${TmpA},1]},
/varset buffTellNeeded 1
}
}
/next TmpA
||/if (${buffTellNeeded}) /echo Lost these effects : ${buffStr}
/if (${buffTellNeeded}) /tell ${MasterName} Hook a brother up: ${buffStr}
/return
Sub fnBuffGetCurrent
/declare TmpA int local
/for TmpA 1 to 16
/if (${Me.Buff[${TmpA}].ID}) {
/varset myBuffs[${TmpA},1] ${Me.Buff[${TmpA}]}
/varset myBuffs[${TmpA},2] 1
} else {
/varset myBuffs[${TmpA},1] NULL
/varset myBuffs[${TmpA},2] 0
}
/next TmpA
/return
