Anyway, here is the sample macro code, which can run by itself, but should be fairly easy to implement in other macros.
Code: Select all
Sub Main
/declare SoHisLow int outer 0
/declare HoPisLow int outer 0
/declare OakisLow int outer 0
/declare SymbisLow int outer 0
/declare WunshiisLow int outer 0
/declare HasteisLow int outer 0
/declare SGisLow int outer 0
/declare FortisLow int outer 0
/declare LionisLow int outer 0
/declare ChampisLow int outer 0
/declare GrimisLow int outer 0
/declare SIisLow int outer 0
/declare cheaphasteisLow int outer 0
/declare ToTisLow int outer 0
/declare DMFisLow int outer 0
/declare GoDisLow int outer 0
/declare PoSisLow int outer 0
/declare frisLow int outer 0
/declare crisLow int outer 0
/declare mrisLow int outer 0
/declare drisLow int outer 0
/declare prisLow int outer 0
/declare encs string outer
/declare clrs string outer
/declare shms string outer
/declare rngs string outer
/declare drus string outer
/declare necs string outer
/declare dropBBB int outer 0
/declare dropSA int outer 0
/declare dropC int outer 0
/declare dropAoR int outer 0
/declare dropSV int outer 0
/declare deadguildies int outer 0
/declare buffchecktimer timer outer 0
:ForeverLoop
/doevents
/if ((${buffchecktimer} < 240 && !${Me.Combat}) || (${buffchecktimer} == 0 && ${Me.Combat})) {
| /echo checking buffs
/varset buffchecktimer 30s
/if (${SpawnCount[guild corpse]} > ${deadguildies}) /maps guild corpse
/varset deadguildies ${SpawnCount[guild corpse]}
/varset dropBBB outer 0
/varset dropSA outer 0
/varset dropC outer 0
/varset dropAoR outer 0
/varset dropSV outer 0
/if (${Me.Buff["Spiritual Dominion"].ID} || ${Me.Buff["Spiritual Ascendance"].ID}) /varset dropSA 1
/if (${Me.Buff["Hastened Thoughts"].ID} || ${Me.Buff["Aura of Devotion"].ID} || ${Me.Buff["Aura of Reverence"].ID}) /varset dropAoR 1
/if (${Me.Buff["Brell's Brawny Bulwark"].ID} || ${Me.Buff["Brell's Stalwart Shield"].ID} || ${Me.Buff["Brell's Mountainous Barrier"].ID}) /varset dropBBB 1
/if (${Me.Buff["Clairvoyance"].ID} || ${Me.Buff["Voice of Clairvoyance"].ID}) /varset dropC 1
/if (${Me.Buff["Spiritual Vitality"].ID} || ${Me.Buff["Spiritual Vigor"].ID}) /varset dropSV 1
| sample for doing a buff that has only 1 version
| /varset isLow 0
| /if (${Me.Buff["buff name"].Duration} < 100) /varset isLow 1
| /if (${Me.Buff["buff name"].ID} == NULL) /varset isLow 2
| sample for doing a buff that has 2 versions (group&single for example)
| /varset isLow 0
| /if ((${Me.Buff["buff 1 name"].Duration} < 100 && ${Me.Buff["buff 1 name"].ID} != NULL) || (${Me.Buff["buff 2 name"].Duration} < 100 && ${Me.Buff["buff 2 name"].ID} != NULL)) /varset isLow 1
| /if (${Me.Buff["buff 1 name"].ID} == NULL && ${Me.Buff["buff 2 name"].ID} == NULL) /varset isLow 2
/varset rngs ${If[${NearestSpawn[1,guild ranger].ID},${NearestSpawn[1,ranger guild]} ,]}${If[${NearestSpawn[2,guild ranger].ID},${NearestSpawn[2,ranger guild]} ,]}${If[${NearestSpawn[3,guild ranger].ID},${NearestSpawn[3,ranger guild]} ,]}
/varset encs ${If[${NearestSpawn[1,guild enc].ID},${NearestSpawn[1,enc guild]} ,]}${If[${NearestSpawn[2,guild enc].ID},${NearestSpawn[2,enc guild]} ,]}${If[${NearestSpawn[3,guild enc].ID},${NearestSpawn[3,enc guild]} ,]}
/varset clrs ${If[${NearestSpawn[1,guild clr].ID},${NearestSpawn[1,clr guild]} ,]}${If[${NearestSpawn[2,guild clr].ID},${NearestSpawn[2,clr guild]} ,]}${If[${NearestSpawn[3,guild clr].ID},${NearestSpawn[3,clr guild]} ,]}
/varset drus ${If[${NearestSpawn[1,guild druid].ID},${NearestSpawn[1,druid guild]} ,]}${If[${NearestSpawn[2,guild druid].ID},${NearestSpawn[2,druid guild]} ,]}${If[${NearestSpawn[3,guild druid].ID},${NearestSpawn[3,druid guild]} ,]}
/varset shms ${If[${NearestSpawn[1,guild shm].ID},${NearestSpawn[1,shm guild]} ,]}${If[${NearestSpawn[2,guild shm].ID},${NearestSpawn[2,shm guild]} ,]}${If[${NearestSpawn[3,guild shm].ID},${NearestSpawn[3,shm guild]} ,]}
/varset necs ${If[${NearestSpawn[1,guild nec].ID},${NearestSpawn[1,nec guild]} ,]}${If[${NearestSpawn[2,guild nec].ID},${NearestSpawn[2,nec guild]} ,]}${If[${NearestSpawn[3,guild nec].ID},${NearestSpawn[3,nec guild]} ,]}
/varset SIisLow 0
/if (${Me.Buff["See Invisible"].Duration} < 100) /varset SIisLow 1
/if (${Me.Buff["See Invisible"].ID} == NULL) /varset SIisLow 2
/varset cheaphasteisLow 0
/if (${Me.Buff["Miraculous Visions"].Duration} < 50 && ${Me.Buff["Aura of Rage"].ID} && ${Me.Buff["Celerity"].ID} == NULL && ${Me.Buff["Speed of Salik"].ID} == NULL && ${Me.Buff["Hastening of Salik"].ID} == NULL && ${Me.Buff["Talisman of Alacrity"].ID} == NULL) /varset cheaphasteisLow 1
/if (${Me.Buff["Miraculous Visions"].ID} == NULL && ${Me.Buff["Celerity"].ID} == NULL && ${Me.Buff["Speed of Salik"].ID} == NULL && ${Me.Buff["Hastening of Salik"].ID} == NULL && ${Me.Buff["Talisman of Alacrity"].ID} == NULL) /varset cheaphasteisLow 2
/varset GrimisLow 0
/if (${Me.Buff["Aura of Rage"].Duration} < 50 && ${Me.Buff["Aura of Rage"].ID}) /varset GrimisLow 1
/if (${Me.Buff["Aura of Rage"].ID} == NULL && ${Me.Buff["Strength of the Hunter"].ID} == NULL && ${Me.Buff["Spiritual Vitality"].ID} == NULL) /varset GrimisLow 2
/varset ChampisLow 0
/if (${Me.Buff["Champion"].Duration} < 30) /varset ChampisLow 1
/if (${Me.Buff["Champion"].ID} == NULL) /varset ChampisLow 2
/varset LionisLow 0
/if ((${Me.Buff["Lion's Strength"].Duration} < 150 && ${Me.Buff["Lion's Strength"].ID} != NULL) || (${Me.Buff["Spirit of Might"].Duration} < 150 && ${Me.Buff["Spirit of Might"].ID} != NULL) || (${Me.Buff["Talisman of Might"].Duration} < 150 && ${Me.Buff["Talisman of Might"].ID} != NULL)) /varset LionisLow 1
/if (${Me.Buff["Lion's Strength"].ID} == NULL && ${Me.Buff["Spirit of Might"].ID} == NULL && ${Me.Buff["Champion"].ID} == NULL && ${Me.Buff["Talisman of Might"].ID} == NULL) /varset LionisLow 2
/varset FortisLow 0
/if ((${Me.Buff["Spirit of Fortitude"].Duration} < 150 && ${Me.Buff["Spirit of Fortitude"].ID} != NULL) || (${Me.Buff["Talisman of Fortitude"].Duration} < 150 && ${Me.Buff["Talisman of Fortitude"].ID} != NULL)) /varset FortisLow 1
/if (${Me.Buff["Spirit of Fortitude"].ID} == NULL && ${Me.Buff["Talisman of Fortitude"].ID} == NULL) /varset FortisLow 2
/varset HasteisLow 0
/if ((${Me.Buff["Hastening of Salik"].Duration} < 150 && ${Me.Buff["Hastening of Salik"].ID} != NULL) || (${Me.Buff["Speed of Salik"].Duration} < 150 && ${Me.Buff["Speed of Salik"].ID} != NULL)) /varset HasteisLow 1
/if (${Me.Buff["Hastening of Salik"].ID} == NULL && ${Me.Buff["Speed of Salik"].ID} == NULL) /varset HasteisLow 2
/varset WunshiisLow 0
/if ((${Me.Buff["Talisman of Wunshi"].Duration} < 200 && ${Me.Buff["Talisman of Wunshi"].ID} != NULL) || (${Me.Buff["Wunshi's Focusing"].Duration} < 200 && ${Me.Buff["Wunshi's Focusing"].ID} != NULL)) /varset WunshiisLow 1
/if (${Me.Buff["Talisman of Wunshi"].ID} == NULL && ${Me.Buff["Wunshi's Focusing"].ID} == NULL) /varset WunshiisLow 2
/varset SymbisLow 0
/if ((${Me.Buff["Balikor's Mark"].Duration} < 200 && ${Me.Buff["Balikor's Mark"].ID} != NULL) || (${Me.Buff["Symbol of Balikor"].Duration} < 200 && ${Me.Buff["Symbol of Balikor"].ID} != NULL)) /varset SymbisLow 1
/if (${Me.Buff["Balikor's Mark"].ID} == NULL && ${Me.Buff["Symbol of Balikor"].ID} == NULL && ${Me.Buff["Conviction"].ID} == NULL && ${Me.Buff["Hand of Conviction"].ID} == NULL) /varset SymbisLow 2
/varset OakisLow 0
/if ((${Me.Buff["Blessing of Steeloak"].Duration} < 200 && ${Me.Buff["Blessing of Steeloak"].ID} != NULL) || (${Me.Buff["Steeloak Skin"].Duration} < 200 && ${Me.Buff["Steeloak Skin"].ID} != NULL)) /varset OakisLow 1
/if (${Me.Buff["Blessing of Steeloak"].ID} == NULL && ${Me.Buff["Steeloak Skin"].ID} == NULL && ${Me.Buff["Conviction"].ID} == NULL && ${Me.Buff["Hand of Conviction"].ID} == NULL) /varset OakisLow 2
/varset HoPisLow 0
/if (${Me.Buff["Howl of the Predator"].Duration} < 200) /varset HoPisLow 1
/if (${Me.Buff["Howl of the Predator"].ID} == NULL) /varset HoPisLow 2
/varset SoHisLow 0
/if (${Me.Buff["Strength of the Hunter"].Duration} < 200) /varset SoHisLow 1
/if (${Me.Buff["Strength of the Hunter"].ID} == NULL) /varset SoHisLow 2
/varset SGisLow 0
/if (${Me.Buff["Savage Guard"].Duration} < 100) /varset SGisLow 1
/if (${Me.Buff["Savage Guard"].ID} == NULL) /varset SGisLow 2
/varset frisLow 0
/if (${Me.Buff["Aura of Burning Arcanum"].Duration} < 100) /varset frisLow 1
/if (${Me.Buff["Aura of Burning Arcanum"].ID} == NULL) /varset frisLow 2
/varset crisLow 0
/if (${Me.Buff["Aura of Freezing Arcanum"].Duration} < 100) /varset crisLow 1
/if (${Me.Buff["Aura of Freezing Arcanum"].ID} == NULL) /varset crisLow 2
/varset mrisLow 0
/if (${Me.Buff["Aura of Thundering Arcanum"].Duration} < 100) /varset mrisLow 1
/if (${Me.Buff["Aura of Thundering Arcanum"].ID} == NULL) /varset mrisLow 2
/varset drisLow 0
/if (${Me.Buff["Aura of Blight Arcanum"].Duration} < 100) /varset drisLow 1
/if (${Me.Buff["Aura of Blight Arcanum"].ID} == NULL) /varset drisLow 2
/varset prisLow 0
/if (${Me.Buff["Aura of Venemous Arcanum"].Duration} < 100) /varset prisLow 1
/if (${Me.Buff["Aura of Venemous Arcanum"].ID} == NULL) /varset prisLow 2
/varset ToTisLow 0
/if (${Me.Buff["Talisman of the Tribunal"].Duration} < 100) /varset ToTisLow 1
/if (${Me.Buff["Talisman of the Tribunal"].ID} == NULL) /varset ToTisLow 2
/varset GoDisLow 0
/if (${Me.Buff["Guard of Druzzil"].Duration} < 100) /varset GoDisLow 1
/if (${Me.Buff["Guard of Druzzil"].ID} == NULL) /varset GoDisLow 2
/varset PoSisLow 0
/if (${Me.Buff["Protection of Seasons"].Duration} < 100) /varset PoSisLow 1
/if (${Me.Buff["Protection of Seasons"].ID} == NULL) /varset PoSisLow 2
/varset DMFisLow 0
/if ((${Me.Buff["Dead Men Floating"].Duration} < 200 && ${Me.Buff["Dead Men Floating"].ID} != NULL) || (${Me.Buff["Dead Man Floating"].Duration} < 200 && ${Me.Buff["Dead Man Floating"].ID} != NULL)) /varset DMFisLow 1
/if (${Me.Buff["Dead Men Floating"].ID} == NULL && ${Me.Buff["Dead Man Floating"].ID} == NULL) /varset DMFisLow 2
}
/goto :ForeverLoop
/returnCode: Select all
;fr=3,230,290,255,255,255,${If[${frisLow} == 1,FR ${Me.Buff["Aura of Burning Arcanum"].Duration.Time},]}
;fr2=3,230,290,255,255,255,${If[${frisLow} == 2,FR Missing,]}
;cr=3,230,302,255,255,255,${If[${crisLow} == 1,CR ${Me.Buff["Aura of Freezing Arcanum"].Duration.Time},]}
;cr2=3,230,302,255,255,255,${If[${crisLow} == 2,CR Missing,]}
;mr=3,230,314,255,255,255,${If[${mrisLow} == 1,MR ${Me.Buff["Aura of Thundering Arcanum"].Duration.Time},]}
;mr2=3,230,314,255,255,255,${If[${mrisLow} == 2,MR Missing,]}
dr=3,230,326,255,255,255,${If[${drisLow} == 1,DR ${Me.Buff["Aura of Blight Arcanum"].Duration.Time},]}
dr2=3,230,326,255,255,255,${If[${drisLow} == 2,DR Missing,]}
;pr=3,230,338,255,255,255,${If[${prisLow} == 1,PR ${Me.Buff["Aura of Venemous Arcanum"].Duration.Time},]}
;pr2=3,230,338,255,255,255,${If[${prisLow} == 2,PR Missing,]}
SoH=3,3,290,255,255,255,${If[${SoHisLow} == 1,SoH ${Me.Buff["Strength of the Hunter"].Duration.Time} ${rngs},]}
SoH2=3,3,290,255,255,255,${If[${SoHisLow} == 2,SoH Missing ${rngs},]}
HoP=3,3,302,255,255,255,${If[${HoPisLow} == 1,HoP ${Me.Buff["Howl of the Predator"].Duration.Time} ${rngs},]}
HoP2=3,3,302,255,255,255,${If[${HoPisLow} == 2,HoP Missing ${rngs},]}
Oak=3,3,314,255,255,255,${If[${OakisLow} == 1,Oak ${If[${Me.Buff["Blessing of Steeloak"].ID},${Me.Buff["Blessing of Steeloak"].Duration.Time},${Me.Buff["Steeloak Skin"].Duration.Time}]} ${drus},]}
Oak2=3,3,314,255,255,255,${If[${OakisLow} == 2,Oak Missing ${drus},]}
Sym=3,3,326,255,255,255,${If[${SymbisLow} == 1,Symbol ${If[${Me.Buff["Balikor's Mark"].ID},${Me.Buff["Balikor's Mark"].Duration.Time},${Me.Buff["Symbol of Balikor"].Duration.Time}]} ${clrs},]}
Sym2=3,3,326,255,255,255,${If[${SymbisLow} == 2,Symbol Missing ${clrs},]}
Wun=3,3,338,255,255,255,${If[${WunshiisLow} == 1,Wunshi ${If[${Me.Buff["Talisman of Wunshi"].ID},${Me.Buff["Talisman of Wunshi"].Duration.Time},${Me.Buff["Wunshi's Focusing"].Duration.Time}]} ${shms},]}
Wun2=3,3,338,255,255,255,${If[${WunshiisLow} == 2,Wunshi Missing ${shms},]}
Has=3,3,350,255,255,255,${If[${HasteisLow} == 1,Haste ${If[${Me.Buff["Hastening of Salik"].ID},${Me.Buff["Hastening of Salik"].Duration.Time},${Me.Buff["Speed of Salik"].Duration.Time}]} ${encs},]}
Has2=3,3,350,255,255,255,${If[${HasteisLow} == 2,Haste Missing ${encs},]}
For=3,3,362,255,255,255,${If[${FortisLow} == 1,Fort ${If[${Me.Buff["Spirit of Fortitude"].ID},${Me.Buff["Spirit of Fortitude"].Duration.Time},${Me.Buff["Talisman of Fortitude"].Duration.Time}]} ${shms},]}
For2=3,3,362,255,255,255,${If[${FortisLow} == 2,Fort Missing ${shms},]}
Lio=3,3,374,255,255,255,${If[${LionisLow} == 1,Lion's ${If[${Me.Buff["Lion's Strength"].ID},${Me.Buff["Lion's Strength"].Duration.Time},${Me.Buff["Spirit of Might"].Duration.Time}]} ${drus} ${shms},]}
Lio2=3,3,374,255,255,255,${If[${LionisLow} == 2,Lion's Missing ${drus} ${shms},]}
Champ=3,3,386,255,255,255,${If[${ChampisLow} == 1,Champ ${Me.Buff["Champion"].Duration.Time} ${shms},]}
Grim=3,3,398,255,255,255,${If[${GrimisLow} == 1,Grim ${Me.Buff["Aura of Rage"].Duration.Time},]}
Grim2=3,3,398,255,255,255,${If[${GrimisLow} == 2,Grim Missing,]}
SI=3,3,410,255,255,255,${If[${SIisLow} == 1,SI ${Me.Buff["See Invisible"].Duration.Time},]}
SI2=3,3,410,255,255,255,${If[${SIisLow} == 2,SI Missing,]}
SG=3,3,422,255,255,255,${If[${SGisLow} == 1,SG ${Me.Buff["Savage Guard"].Duration.Time},]}
SG2=3,3,422,255,255,255,${If[${SGisLow} == 2,SG Missing,]}
CH=3,3,434,255,255,255,${If[${cheaphasteisLow} == 1,MV ${Me.Buff["Miraculous Visions"].Duration.Time},]}
CH2=3,3,434,255,255,255,${If[${cheaphasteisLow} == 2,MV Missing,]}
ToT=3,3,446,255,255,255,${If[${ToTisLow} == 1,ToT ${Me.Buff["Talisman of the Tribunal"].Duration.Time} ${shms},]}
ToT2=3,3,446,255,255,255,${If[${ToTisLow} == 2,ToT Missing ${shms},]}
GoD=3,3,458,255,255,255,${If[${GoDisLow} == 1,GoD ${Me.Buff["Guard of Druzzil"].Duration.Time} ${encs},]}
GoD2=3,3,458,255,255,255,${If[${GoDisLow} == 2,GoD Missing ${encs},]}
PoS=3,3,470,255,255,255,${If[${PoSisLow} == 1,PoS ${Me.Buff["Protection of Seasons"].Duration.Time} ${drus},]}
PoS2=3,3,470,255,255,255,${If[${PoSisLow} == 2,PoS Missing ${drus},]}
DMF=3,3,482,255,255,255,${If[${DMFisLow} == 1,DMF ${If[${Me.Buff["Dead Men Floating"].ID},${Me.Buff["Dead Men Floating"].Duration.Time},${Me.Buff["Dead Man Floating"].Duration.Time}]} ${necs},]}
DMF2=3,3,482,255,255,255,${If[${DMFisLow} == 2,DMF Missing ${necs},]}
dropBBB=3,350,290,255,255,255,${If[${dropBBB} == 1,Drop BBB!,]}
dropSA=3,350,302,255,255,255,${If[${dropSA} == 1,Drop SA!,]}
dropC=3,350,314,255,255,255,${If[${dropC} == 1,Drop C!,]}
dropAoR=3,350,326,255,255,255,${If[${dropAoR} == 1,Drop AoR!,]}
dropSV=3,350,338,255,255,255,${If[${dropSV} == 1,Drop SV!,]}



