DruidBot (formerly RaidDruid)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

pandera13
orc pawn
orc pawn
Posts: 15
Joined: Sat Mar 05, 2005 11:07 pm

Post by pandera13 » Thu Mar 31, 2005 12:13 am

wouldnt happen to be invis would ya? Druid will never cast or do anything if invised

fallon
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sat Dec 18, 2004 7:37 pm
Location: Kuwait
Contact:

Post by fallon » Thu Apr 21, 2005 10:46 pm

I've gotten a few reports of problems with the current version. However I haven't had a working copy of MQ2 in a week or 2. New version of MQ2 is out, and I'll hopefully have time by this weekend to take a look at things.

Rambo
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Mar 16, 2005 6:49 pm

Post by Rambo » Fri Apr 22, 2005 4:29 pm

I am not very good at this stuff yet and I haven't had a chance to fully test but maybe someone could glance over this and see if it is ok and give it a stamp of approval. I think I have all the required TLO fixes done, still a couple spots in the macro that I am not sure about yet though.

Raiddruid.mac

Code: Select all

|THE ALL INCLUSIVE RAID DRUID MACRO v6.91
|THIS IS A CULMINATION OF ALL MY RECENT DRUID MACROS COMBINED INTO ONE GRANDDADDY OF A MACRO
|IT'S STILL A WORK IN PROGRESS, BUT IT'S PRETTY MUCH EVERYTHING I'VE ALWAYS WANTED IN A
|DRUID MACRO.
#include common/Spell_Routines.inc
#include common/feedme.inc
#include common/wait4rez.inc
#include common/Buffbeg.inc
#include DruidBot/RDLoadIni.inc
#include DruidBot/RDEvents.inc
#include DruidBot/RDDeclares.inc
|#CHAT group
|#CHAT guild
#CHAT tell

Sub Main
/echo Uber Raid Druid Macro Online, hold onto your seatbelt!
/call RDDeclares
/if (${RDVersion.NotEqual[${Ini[DruidBot/RD_${Me.CleanName}.ini,Settings,Version]}]}) /call LoadAliases
/call LoadIni
/call BuffBegDeclares
/call FeedMeDeclares
:mainloop
/call FeedMe
/call BuffBeg
/if (${Me.Invis}) {
  /delay 1
  /goto :mainloop
}
/call CheckGroup
/call ClickRods
/call DoWoW
/call CheckBuffs
/if (${SpawnCount[npc radius ${NPCRadius} zradius ${NPCZRadius}]}) {
  /call DoAssistHeal
  /call DoAEHeal
  /call assistMA1
}
/doevents
/call AutoSit
/goto :mainloop
/return

Sub ClickRods
/call CheckGroup
/if (${ClickRods} && ${FindItem[=Rod of Mystical Transvergance].InvSlot} && !${RodTimer} && ${Me.PctMana}<${RodMana}) {
  /call Cast "Rod of Mystical Transvergance" item
  /varset RodTimer 310s
}
/return

Sub DoWoW
/declare i int local
/if (${RDPause} && ${DoWoW} && ${Me.AltAbilityReady[Wrath of the Wild]}) {
  /for i 1 to 3
  /call CheckGroup
  /if (${Spawn[pc ${MA${i}}].ID} && ${Spawn[pc ${MA${i}}].Distance}<100) {
    /target pc ${MA${i}}
    /delay 5 ${Target.ID}==${Spawn[pc ${MA1}].ID}
    /if (${Target.ID}==${Spawn[pc ${MA${i}}].ID}) {
      /if (${ReportWoW} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} Wrath of the Wild @ ${Target.CleanName}
      /varset SpamTimer ${SpamDelay}
      /call Cast "Wrath of the Wild" alt
    }
    /return
  }
  /next i
}
/return

Sub DoRC
/declare i int local
/for i 1 to 20
/if (${DoRC} && ${Me.AltAbilityReady[${RCAA}]} && ${RCDebuffs.Find[${Me.Buff[${i}].Spell}]} && !${Me.Moving} && !${Me.Casting.ID}) {
  /if (${ReportRC} && !${SpamTimer}) /${ChatChannel} ${RCAA} inc
  /varset SpamTimer ${SpamDelay}
  /call Cast "${RCAA}" alt 10s Check4Pad
}
/next i
/return

Sub DoAssistHeal
/if (${AssistHeal}) {
  /declare index        int local
  /declare NPCArray[50] int local
  /declare NPCsInRange  int local
  /varset NPCsInRange ${SpawnCount[npc radius ${NPCRadius} zradius ${NPCZRadius}]}
  /for index ${NPCsInRange} downto 1
  /if (!${index}) /return
  /varset NPCArray[${index}] ${NearestSpawn[${index}, npc].ID}
  /next index
  /for index ${NPCsInRange} downto 1
  /if (${RDPause}) {
    /squelch /target id ${NPCArray[${index}]}
    /if (${Target.LineOfSight}) {
      /assist
      /delay 5 ${Target.Type.Equal[PC]}
      /call ShouldIHeal
      /call AutoSit
    }
    /doevents
    /next index
  }
}
/return

Sub DoAEHeal
/if (${AEHeal}) {
  /declare index        int local
  /declare PCArray[100] int local
  /declare PCsInRange   int local
  /varset PCsInRange ${SpawnCount[pc radius ${PCRadius} zradius ${PCZRadius}]}
  /for index ${PCsInRange} downto 1
  /varset PCArray[${index}] ${NearestSpawn[${index}, pc].ID}
  /next index
  /for index ${PCsInRange} downto 1
  /if (${RDPause}) {
    /target id ${PCArray[${index}]}
    /delay 2
    /call ShouldIHeal
    /call AutoSit
    /doevents
    /next index
  }
}
/return

Sub ShouldIHeal
:ShouldIHealAgain
/if (${HealFD} && ${Target.State.NotEqual["FEIGN"]} && (${String[${Target.Class}].Equal[Monk]} || ${String[${Target.Class}].Equal[Necromancer]} || ${String[${Target.Class}].Equal["Shadow Knight"]})) /return
/if (${Target.Type.Equal[PC]} && ${Target.PctHPs}<${HealPct} && ${Target.Distance}<${Spell[${FastHealID}].Range} && ${Me.CurrentMana}>${Spell[${FastHealID}].Mana}) {
  :ShouldIWait
  /if (${Me.Moving} || ${Me.Casting.ID} || (${Me.Gem[${FastHeal}]} && !${Me.SpellReady[${FastHeal}]})) /goto :ShouldIWait
  /if (${ReportHeals} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${FastHeal} @ ${Target.CleanName} the ${Target.Class}
  /varset SpamTimer ${SpamDelay}
  /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
  /varset SitTimer ${SitDelay}
  /goto :ShouldIHealAgain
}
/call CheckGroup
/return

Sub CheckHP
/if (${Me.Casting.ID}==${TankHealID} && ${Target.ID}==${Spawn[pc ${MA1}].ID}) {
  /call CheckPPS
  /if (${Target.PctHPs}>${TankHealPct} && ${TankTTL}>200 && ${castEndTime}<40) {
    /call DoInterrupt
    /return
  }
  /if (${Target.PctHPs}<=${Math.Calc[${TankHealPct}/2]} && ${castEndTime}>=50) {
    /if (${Me.Casting.ID}) {
      /if (!${Me.Mount.ID}) {
        /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
        /varset SpamTimer ${SpamDelay}
        /call Interrupt
        /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
      } else {
        /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
        /varset SpamTimer ${SpamDelay}
        /call Interrupt
        /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
        /if (${UseMount} && ${Me.PctMana}<${MedPct}) /call Cast "${MountItem}" item
      }
    }
  }
}
/if (${Me.Casting.ID}!=${TankHealID} && ${Target.PctHPs}>=${CancelPct}) {
  /if (${WaitToCancel} && ${castEndTime}>5) /return
  /call DoInterrupt
}
/if (${HealMeFirst} && ${Me.Casting.ID} && ${Me.PctHPs}<=${HealPct} && ${Target.ID}!=${Me.ID}) {
  /if (!${Me.Mount.ID}) {
    /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting} to heal myself
    /varset SpamTimer ${SpamDelay}
    /call Interrupt
    /target id ${Me.ID}
    /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
  } else {
    /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting} to heal myself
    /varset SpamTimer ${SpamDelay}
    /call Interrupt
    /target id ${Me.ID}
    /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
    /if (${UseMount} && ${Me.PctMana}<${MedPct}) /call Cast "${MountItem}" item
  }
}
/if (${HealFD} && ${Target.State.NotEqual["FEIGN"]} && (${String[${Target.Class}].Equal[Monk]} || ${String[${Target.Class}].Equal[Necromancer]} || ${String[${Target.Class}].Equal["Shadow Knight"]})) /call DoInterrupt
/return

Sub DoInterrupt
/if (${Me.Casting.ID}) {
  /if (!${Me.Mount.ID}) {
    /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
    /varset SpamTimer ${SpamDelay}
    /call Interrupt
  } else {
    /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
    /varset SpamTimer ${SpamDelay}
    /call Interrupt
    /if (${UseMount} && ${Me.PctMana}<${MedPct}) /call Cast "${MountItem}" item
  }
}
/return

Sub CheckGroup
/declare i           int local
/declare MyTarget    int local
/declare WorstHPs    int local 100
/declare WorstID     int local
/declare WorstMember int local
/declare StartHPs    int local
/if (${RDPause} && !${Me.Moving} && !${Me.Casting.ID} && !${CheckGroupTimer}) {
  /call DoRC
  /call DoSotW
  /if (${UseCH} && ${Spawn[pc ${MA1}].ID}) {
    :RecheckTank
    /target id ${Spawn[pc ${MA1}].ID}
    /delay 5 ${Target.ID}==${Spawn[pc ${MA1}].ID}
    /if (!${Spawn[pc group ${MA1}].ID}) /delay 3
    /call CheckPPS
    /if (${Target.ID}==${Spawn[pc ${MA1}].ID} && (${TankTTL}<250 || ${Target.PctHPs}<${TankHealPct}) && ${Target.Distance}<${Spell[${TankHealID}].Range} && ${Me.CurrentMana}>${Spell[${TankHealID}].Mana}) {
      :ShouldICH
      /if (${Me.Moving} || ${Me.Casting.ID} || (${Me.Gem[${TankHeal}]} && !${Me.SpellReady[${TankHeal}]})) /goto :ShouldICH
      /if (${ReportHeals} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${TankHeal} @ ${Target.CleanName} the ${Target.Class}
      /varset SpamTimer ${SpamDelay}
      /call Cast "${TankHeal}" ${TankHealGem} 1s CheckHP
      /varset SitTimer ${SitDelay}
      /goto :RecheckTank
    }
  }
  /if (${HealGroup}) {
    :RecheckGroup
    /for i 0 to ${Group.Members}
    /if (${HealMeFirst} && ${Me.PctHPs}<${HealPct}) {
      /varset WorstHPs 0
      /varset WorstID ${Me.ID}
      /varset WorstMember ${Math.Calc[${i} + 1]}
    }
    /if (${DAArray[${Math.Calc[${i}+1]},2]} && (${Group.Member[${i}].PctHPs}>=${Math.Calc[${DAArray[${Math.Calc[${i}+1]},1]}+5]} || ${DAArray[${Math.Calc[${i}+1]},1]}>${Group.Member[${i}].PctHPs})) {
      /varset DAArray[${Math.Calc[${i}+1]},1] 0
      /varset DAArray[${Math.Calc[${i}+1]},2] 0
    }
    /if (${HealFD} && ${Target.State.NotEqual["FEIGN"]} && (${String[${Target.Class}].Equal[Monk]} || ${String[${Target.Class}].Equal[Necromancer]} || ${String[${Target.Class}].Equal["Shadow Knight"]})) /goto :NextCheckGroup
    /if ((${UseCH} || ${Group.Member[${i}].PctHPs}>${TankHealPct}) && ${Group.Member[${i}].ID}==${Spawn[pc ${MA1}].ID}) /goto :NextCheckGroup
    /if (${Group.Member[${i}].PctHPs}<=${WorstHPs} && ${Group.Member[${i}].ID} && ${Group.Member[${i}].Distance}<${Spell[${FastHealID}].Range}) {
      /varset WorstHPs ${Group.Member[${i}].PctHPs}
      /varset WorstID ${Group.Member[${i}].ID}
      /varset WorstMember ${Math.Calc[${i} + 1]}
    }
    /doevents
    :NextCheckGroup
    /next i
    /if (${WorstHPs}<${HealPct} && !${DAArray[${WorstMember},2]} && ${Me.CurrentMana}>${Spell[${FastHealID}].Mana}) {
      /varset MyTarget ${Target.ID}
      /target id ${WorstID}
      /varset StartHPs ${Target.PctHPs}
      :ShouldIPad
      /if (${Me.Moving} || ${Me.Casting.ID} || (${Me.Gem[${FastHeal}]} && !${Me.SpellReady[${FastHeal}]})) /goto :ShouldIPad
      /if (${ReportHeals} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${FastHeal} @ ${Target.CleanName} the ${Target.Class}
      /varset SpamTimer ${SpamDelay}
      /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
      /if (${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}<${Math.Calc[${StartHPs}+5]} && ${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}>=${StartHPs}) {
        /varset DAArray[${WorstMember},1] ${StartHPs}
        /varset DAArray[${WorstMember},2] 1
      }
      /target id ${MyTarget}
      /varset SitTimer ${SitDelay}
      /varset WorstHPs 100
      /goto :RecheckGroup
    }
  }
  /varset WorstHPs 100
  /if (${HealPets}) {
    :RecheckPets
    /for i 0 to ${Group.Members}
    /if (${Group.Member[${i}].Pet.PctHPs}<=${WorstHPs} && ${Group.Member[${i}].Pet.ID} && ${Group.Member[${i}].Pet.Distance}<${Spell[${PetHealID}].Range}) {
      /varset WorstHPs ${Group.Member[${i}].Pet.PctHPs}
      /varset WorstID ${Group.Member[${i}].Pet.ID}
    }
    /next i
    /if (${WorstHPs}<${PetHealPct} && ${Me.CurrentMana}>${Spell[${PetHealID}].Mana}) {
      /varset MyTarget ${Target.ID}
      /target id ${WorstID}
      :ShouldIPadPet
      /if (${Me.Moving} || ${Me.Casting.ID} || (${Me.Gem[${PetHeal}]} && !${Me.SpellReady[${PetHeal}]})) /goto :ShouldIPadPet
      /if (${ReportHeals} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${PetHeal} @ ${Target.CleanName}
      /varset SpamTimer ${SpamDelay}
      /call Cast "${PetHeal}" ${PetHealGem} 1s CheckHP
      /target id ${MyTarget}
      /varset SitTimer ${SitDelay}
      /varset WorstHPs 100
      /goto :RecheckPets
    }
  }
  /varset CheckGroupTimer ${CheckGroupInterval}
}
/return

Sub DoSotW
/declare i             int local
/declare GroupMember   int local
/declare GroupTotalHPs int local
/declare MyTarget    int local
/if (!${SotWCheckTimer} && ${DoSotW} && !${Me.Casting.ID} && ${Me.AltAbilityReady[${SotWAA}]}) {
  /varset GroupMember ${Math.Calc[${Group}+1]}
  /for i 0 to ${Group.Members}
  /if (${Group[${i}].ID}) {
    /varset GroupTotalHPs ${Math.Calc[${GroupTotalHPs}+${Group.Member[${i}].PctHPs}]}
  } else {
    /varset GroupTotalHPs ${Math.Calc[${GroupTotalHPs}+100]}
  }
  /next i
  /if (${Math.Calc[${GroupTotalHPs}/${GroupMember}]}<${SotWPct}) {
    /varset SotWCheckTimer 15s
    /varset GroupTotalHPs 0
    /delay 1s
    /if (!${Me.Buff[Celestial Regeneration].ID} && !${Me.Buff[Celestial Rejuvenation].ID} && !${Me.Buff[Ethereal Elixir].ID} && !${Me.Buff[Spirit of the Wood].ID} && !${Me.Buff[Spirit of the Grove].ID} && !${Me.Buff[Ancestral Aid].ID}) {
      /for i 0 to ${Group.Members}
      /if (${Group[${i}].ID}) {
        /varset GroupTotalHPs ${Math.Calc[${GroupTotalHPs}+${Group.Member[${i}].PctHPs}]}
      } else {
        /varset GroupTotalHPs ${Math.Calc[${GroupTotalHPs}+100]}
      }
      /next i
      /if (${Math.Calc[${GroupTotalHPs}/${GroupMember}]}<${SotWPct}) {
        /varset MyTarget ${Target.ID}
        /target id ${Me.ID}
        /delay 1s ${Target.ID}==${Me.ID}
        /if (${ReportSotW} && !${SpamTimer}) /${ChatChannel} ${SotWAA} inc
        /varset SpamTimer ${SpamDelay}
        /call Cast "${SotWAA}" alt 10s
        /target id ${MyTarget}
      }
    }
  }
}
/varset GroupTotalHPs 0
/return

Sub Check4Pad
/declare i           int local
/declare MyTarget    int local
/declare WorstHPs    int local 100
/declare WorstID     int local
/declare WorstMember int local
/declare StartHPs    int local
/if (!${CheckGroupTimer}) {
  /if (${UseCH} && ${Spawn[pc ${MA1}].ID} && ${Me.Casting.ID}) {
    /target id ${Spawn[pc ${MA1}].ID}
    /delay 5 ${Target.ID}==${Spawn[pc ${MA1}].ID}
    /if (!${Spawn[pc group ${MA1}].ID}) /delay 3
    /call CheckPPS
    /if (${Target.ID}==${Spawn[pc ${MA1}].ID} && (${TankTTL}<150 || ${Target.PctHPs}<${TankHealPct}) && ${Target.Distance}<${Spell[${TankHealID}].Range} && ${Me.CurrentMana}>${Spell[${TankHealID}].Mana}) {
      /if (${Me.Casting.ID}) {
        /if (!${Me.Mount.ID}) {
          /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
          /varset SpamTimer ${SpamDelay}
          /call Interrupt
          /if (${ReportHeals} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${TankHeal} @ ${Target.CleanName} the ${Target.Class}
          /varset SpamTimer ${SpamDelay}
          /call Cast "${TankHeal}" ${TankHealGem} 1s CheckHP
          /varset SitTimer ${SitDelay}
          /varset castReturn CAST_INTERRUPTED
        } else {
          /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
          /varset SpamTimer ${SpamDelay}
          /call Interrupt
          /if (${ReportHeals} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${TankHeal} @ ${Target.CleanName} the ${Target.Class}
          /varset SpamTimer ${SpamDelay}
          /call Cast "${TankHeal}" ${TankHealGem} 1s CheckHP
          /varset SitTimer ${SitDelay}
          /varset castReturn CAST_INTERRUPTED
          /if (${UseMount} && ${Me.PctMana}<${MedPct}) /call Cast "${MountItem}" item
        }
      }
    }
  }
  /if (${Stop4Pad}) {
    /for i 0 to ${Group.Members}
    /if (${HealMeFirst} && ${Me.PctHPs}<${HealPct}) {
      /varset WorstHPs 0
      /varset WorstID ${Me.ID}
      /varset WorstMember ${Math.Calc[${i} + 1]}
    }
    /if (${DAArray[${Math.Calc[${i}+1]},2]} && (${Group.Member[${i}].PctHPs}>=${Math.Calc[${DAArray[${Math.Calc[${i}+1]},1]}+5]} || ${DAArray[${Math.Calc[${i}+1]},1]}>${Group.Member[${i}].PctHPs})) {
      /varset DAArray[${Math.Calc[${i}+1]},1] 0
      /varset DAArray[${Math.Calc[${i}+1]},2] 0
    }
    /if (${HealFD} && ${Target.State.NotEqual["FEIGN"]} && (${String[${Target.Class}].Equal[Monk]} || ${String[${Target.Class}].Equal[Necromancer]} || ${String[${Target.Class}].Equal["Shadow Knight"]})) /goto :NextCheck4Pad
    /if ((${UseCH} || ${Group.Member[${i}].PctHPs}>${TankHealPct}) && ${Group.Member[${i}].ID}==${Spawn[pc ${MA1}].ID}) /goto :NextCheck4Pad
    /if (${Group.Member[${i}].PctHPs}<=${WorstHPs} && ${Group.Member[${i}].ID} && ${Group.Member[${i}].Distance}<${Spell[${FastHealID}].Range}) {
      /varset WorstHPs ${Group.Member[${i}].PctHPs}
      /varset WorstID ${Group.Member[${i}].ID}
      /varset WorstMember ${Math.Calc[${i} + 1]}
    }
    /doevents
    :NextCheck4Pad
    /next i
    /if (${WorstHPs}<${HealPct} && !${DAArray[${WorstMember},2]} && ${Me.CurrentMana}>${Spell[${FastHealID}].Mana}) {
      /varset MyTarget ${Target.ID}
      /if (${Me.Casting.ID}) {
        /if (!${Me.Mount.ID}) {
          /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
          /varset SpamTimer ${SpamDelay}
          /call Interrupt
          /call DoSotW
          /target id ${WorstID}
          /varset StartHPs ${Target.PctHPs}
          /if (${ReportHeals} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${FastHeal} @ ${Target.CleanName} the ${Target.Class}
          /varset SpamTimer ${SpamDelay}
          /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
          /if (${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}<${Math.Calc[${StartHPs}+5]} && ${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}>=${StartHPs}) {
            /varset DAArray[${WorstMember},1] ${StartHPs}
            /varset DAArray[${WorstMember},2] 1
          }
          /varset castReturn CAST_INTERRUPTED
        } else {
          /if (${ReportInterrupts} && !${SpamTimer}) /${ChatChannel} Interrupting ${Me.Casting}
          /varset SpamTimer ${SpamDelay}
          /call Interrupt
          /call DoSotW
          /target id ${WorstID}
          /if (${ReportHeals} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${FastHeal} @ ${Target.CleanName} the ${Target.Class}
          /varset SpamTimer ${SpamDelay}
          /call Cast "${FastHeal}" ${FastHealGem} 1s CheckHP
          /if (${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}<${Math.Calc[${StartHPs}+5]} && ${Group.Member[${Math.Calc[${WorstMember}-1]}].PctHPs}>=${StartHPs}) {
            /varset DAArray[${WorstMember},1] ${StartHPs}
            /varset DAArray[${WorstMember},2] 1
          }
          /varset castReturn CAST_INTERRUPTED
          /if (${UseMount} && ${Me.PctMana}<${MedPct}) /call Cast "${MountItem}" item
        }
        /target id ${MyTarget}
        /varset SitTimer ${SitDelay}
      }
    }
  }
  /varset CheckGroupTimer ${CheckGroupInterval}
}
/return

Sub CheckPPS
/if (${TankLastPct}>${Target.PctHPs} && ${Target.PctHPs}!=100) {
  /varcalc TotalTankHits ${TotalTankHits} + ${Math.Calc[${TankLastPct}-${Target.PctHPs}]}
}
/varset TankPPS ${Math.Calc[${TotalTankHits}/((1001-${TankPPSTimer})/10)]}
/if (${TankPPSTimer}<=900) {
  /varcalc TotalTankHits ${TankPPS}
  /varcalc TankPPSTimer 1000
}
/if (!${TankPPS}) {
  /varset TankTTL 3000
} else {
  /varset TankTTL ${Math.Calc[(${Target.PctHPs}/${TankPPS})*10].Int}
}
/varset TankLastPct ${Target.PctHPs}
/return

Sub assistMA1
/declare i int local
/if (${RDPause} && ${AssistMA} && !${Me.Casting.ID} && !${Me.Moving}) {
  /for i 1 to 3
  /call CheckGroup
  /if (!${Spawn[pc ${MA${i}}].ID}) /goto :NextMA
  /assist ${Spawn[${MA${i}}].CleanName}
  /delay 5 ${Target.Type.Equal[NPC]}
  /if (${Target.Type.Equal[NPC]}) {
    /varset MATarget ${Target.ID}
    /goto :Stuff
  }
  :NextMA
  /next i
}
:Stuff
/if (${MATarget}!=${DebuffTarget}) {
  /call ResetTimers
  /varset DebuffTarget ${MATarget}
}
/if (${Target.PctHPs}>=${StopHPs} && ${Target.PctHPs}<=${EngageHPs} && ${Target.ID}==${MATarget}) {
  /call ClickEpic
  /call DebuffIt
  /call DoTIt
  /call Nukeit
  /call SnareIt
}
/return

Sub ClickEpic
/call CheckGroup
/doevents
/target id ${MATarget}
/delay 5 ${Target.ID}==${MATarget}
/if (${RDPause} && !${WaitTimer} && ${UseEpic} && !${EpicTimer} && ${Target.ID}==${MATarget} && ${Target.ID}==${NearestSpawn[npc named].ID} && ${Target.LineOfSight} && ${Target.Distance}<${Spell[Nature's Blight].Range} && ${Target.PctHPs}>=${StopHPs} && ${Target.PctHPs}<=${EngageHPs}) {
  /if (${ReportEpic} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} Clicking Epic on ${Target.CleanName}
  /varset SpamTimer ${SpamDelay}
  /call Cast "Staff of Living Brambles" item 2s Check4Pad
  /varset EpicTimer 605s
  /varset SitTimer ${SitDelay}
}
/return

Sub DebuffIt
/declare ResistCounter int local
/declare i             int local
/if (${DebuffTotal}) {
  /for i 1 to ${DebuffTotal}
  /if ((${Me.PctMana}>${NukePctMana} || ${DebuffGem[${i}].Equal[item]}) && !${WaitTimer} && ${DoDebuffs} && ${RDPause} && !${Me.Moving} && !${Me.Casting.ID} && ${Target.PctHPs}>=${StopHPs} && ${Target.PctHPs}<=${DebuffHPs}) {
    /if ((${WhichNuke}==${DebuffSpellSet[${i}]} || !${DebuffSpellSet[${i}]}) && !${DebuffTimer${i}}) {
      /varset ResistCounter 0
      :RecastDebuff
      /call CheckGroup
      /doevents
      /target id ${MATarget}
      /delay 5 ${Target.ID}==${MATarget}
      /if (${Target.PctHPs}<${SnareHPs} && !${SnareTimer} && ${DoSnare}) /call SnareIt
      /if (${SitTimer} && !${Me.Gem[${Debuff[${i}]}]} && !${Me.Mount.ID} && ${DebuffGem[${i}].NotEqual[item]}) /goto :RecastDebuff
      /if (${Target.Type.Equal[NPC]} && ${Target.ID}==${MATarget} && ${Target.LineOfSight} && ${Target.Distance}<${Spell[${DebuffID[${i}]}].Range}) {
        /call Cast "${Debuff[${i}]}" ${DebuffGem[${i}]} 10s Check4Pad
        /varset SitTimer ${SitDelay}
      } else {
        /return
      }
      /if (${castReturn.Equal[CAST_RESISTED]}) {
        /varset ResistCounter ${Math.Calc[${ResistCounter}+1]}
        /if (${ResistCounter}>=${DebuffRecasts}) {
          /if (${ReportDebuffs} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} resisted ${Debuff[${i}]} ${DebuffRecasts} times, giving up
          /varset SpamTimer ${SpamDelay}
          /varset DebuffTimer${i} 10000s
          /goto :NextDebuff
        } else {
          /goto :RecastDebuff
        }
      } else /if (${castReturn.Equal[CAST_INTERRUPTED]}) {
        /goto :RecastDebuff
      } else /if (${castReturn.Equal[CAST_CANCELLED]}) {
        /goto :RecastDebuff
      } else /if (${castReturn.Equal[CAST_SUCCESS]}) {
        /if (${ReportDebuffs} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} debuffed with ${Debuff[${i}]}
        /varset SpamTimer ${SpamDelay}
        /varset DebuffTimer${i} ${Math.Calc[${Spell[${DebuffID[${i}]}].Duration.TotalSeconds}-6]}s
      } else /if (${castReturn.Equal[CAST_IMMUNE]}) {
        /varset DebuffTimer${i} 1000s
        /goto :NextDebuff
      } else /if (${SpellNotHold}) {
        /varset DebuffTimer${i} 1000s
        /goto :NextDebuff
      }
    }
  }
  :NextDebuff
  /next i
}
/return

Sub DoTIt
/declare ResistCounter int local
/declare i             int local
/if (${DoTTotal}) {
  /for i 1 to ${DoTTotal}
  /if ((${Me.PctMana}>${NukePctMana} || ${DebuffGem[${i}].Equal[item]}) && !${WaitTimer} && ${DoDoTs} && ${RDPause} && !${Me.Moving} && !${Me.Casting.ID} &&  ${Target.PctHPs}>${DoTMinHPs} && ${Target.PctHPs}<=${DoTHPs}) {
    /if ((${WhichNuke}==${DoTSpellSet[${i}]} || !${DoTSpellSet[${i}]}) && !${DoTTimer${i}}) {
      /varset ResistCounter 0
      :RecastDoT
      /call CheckGroup
      /doevents
      /target id ${MATarget}
      /delay 5 ${Target.ID}==${MATarget}
      /if (${Target.PctHPs}<${SnareHPs} && !${SnareTimer} && ${DoSnare}) /call SnareIt
      /if (${SitTimer} && !${Me.Gem[${DoT[${i}]}]} && !${Me.Mount.ID} && ${DoTGem[${i}].NotEqual[item]}) /goto :RecastDoT
      /if (${Target.Type.Equal[NPC]} && ${Target.ID}==${MATarget} && ${Target.LineOfSight} && ${Target.Distance}<${Spell[${DoTID[${i}]}].Range}) {
        /call Cast "${DoT[${i}]}" ${DoTGem[${i}]} 10s Check4Pad
        /varset SitTimer ${SitDelay}
      } else {
        /return
      }
      /if (${castReturn.Equal[CAST_RESISTED]}) {
        /varset ResistCounter ${Math.Calc[${ResistCounter}+1]}
        /if (${ResistCounter}>=${DoTRecasts}) {
          /if (${ReportDoTs} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} resisted ${DoT[${i}]} ${DoTRecasts} times, giving up
          /varset SpamTimer ${SpamDelay}
          /varset DoTTimer${i} 10000s
          /goto :NextDoT
        } else {
          /goto :RecastDoT
        }
      } else /if (${castReturn.Equal[CAST_INTERRUPTED]}) {
        /goto :RecastDoT
      } else /if (${castReturn.Equal[CAST_CANCELLED]}) {
        /goto :RecastDoT
      } else /if (${castReturn.Equal[CAST_SUCCESS]}) {
        /if (${ReportDoTs} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} DoTed with ${DoT[${i}]}
        /varset SpamTimer ${SpamDelay}
        /varset DoTTimer${i} ${Math.Calc[${Spell[${DoTID[${i}]}].Duration.TotalSeconds}-6]}s
      } else /if (${castReturn.Equal[CAST_IMMUNE]}) {
        /varset DoTTimer${i} 1000s
        /goto :NextDoT
      } else /if (${SpellNotHold}) {
        /varset DoTTimer${i} 1000s
        /goto :NextDoT
      }
    }
  }
  :NextDoT
  /next i
}
/return

Sub Nukeit
/call CheckGroup
/doevents
/target id ${MATarget}
/delay 5 ${Target.ID}==${MATarget}
/if (${Target.PctHPs}<${SnareHPs} && !${SnareTimer} && ${DoSnare}) /call SnareIt
/if (${Me.PctMana}>${NukePctMana} && !${NukeTimer} && !${WaitTimer} && ${DoNukes} && ${RDPause} && !${Me.Moving} && !${Me.Casting.ID} && ${Target.PctHPs}>${StopHPs} && ${Target.PctHPs}<${NukeHPs} && (!${SitTimer} || ${Me.Gem[${MyNukes[${WhichNuke}]}]} || ${Me.Mount.ID})) {
  /if (${Target.Type.Equal[NPC]} && ${Target.ID}==${MATarget} && ${Target.LineOfSight} && ${Target.Distance}<${Spell[${MyNukes[${WhichNuke}]}].Range}) {
    /call Cast "${MyNukes[${WhichNuke}]}" ${NukeGem} 5s Check4Pad
    /varset SitTimer ${SitDelay}
    /varset NukeTimer ${NukeDelay}
  }
}
/return

Sub SnareIt
/declare ResistCounter int local
/if (!${WaitTimer} && ${DoSnare} && ${RDPause} && !${Me.Moving} && !${Me.Casting.ID} && ${Target.PctHPs}<=${SnareHPs}) {
  /if (!${SnareTimer}) {
    /varset ResistCounter 0
    :RecastSnare
    /call CheckGroup
    /doevents
    /target id ${MATarget}
    /delay 5 ${Target.ID}==${MATarget}
    /if (${SitTimer} && !${Me.Gem[${SnareSpell}]} && !${Me.Mount.ID}) /goto :RecastSnare
    /if (${Target.Type.Equal[NPC]} && ${Target.ID}==${MATarget} && ${Target.LineOfSight} && ${Target.Distance}<${Spell[${SnareSpellID}].Range}) {
      /call Cast "${SnareSpell}" ${SnareGem} 5s Check4Pad
      /varset SitTimer ${SitDelay}
    } else {
      /return
    }
    /if (${castReturn.Equal[CAST_IMMUNE]}) {
      /if (${ReportSnares} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} is IMMUNE to ${SnareSpell}
      /varset SpamTimer ${SpamDelay}
      /varset SnareTimer 10000s
      /return
    } else /if (${SpellNotHold}) {
      /varset SnareTimer 10000s
      /return
    } else /if (${castReturn.Equal[CAST_RESISTED]}) {
      /varset ResistCounter ${Math.Calc[${ResistCounter}+1]}
      /if (${ResistCounter}>=${SnareRecasts}) {
        /if (${ReportSnares} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} resisted ${SnareSpell} ${SnareRecasts} times, giving up
        /varset SpamTimer ${SpamDelay}
        /varset SnareTimer 10000s
        /return
      } else {
        /goto :RecastSnare
      }
    } else /if (${castReturn.Equal[CAST_INTERRUPTED]}) {
      /goto :RecastSnare
    } else /if (${castReturn.Equal[CAST_CANCELLED]}) {
      /goto :RecastSnare
    } else /if (${castReturn.Equal[CAST_SUCCESS]}) {
      /if (${ReportSnares} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} ${Spawn[${MATarget}].CleanName} Snared
      /varset SpamTimer ${SpamDelay}
      /varset SnareTimer ${Math.Calc[${Spell[${SnareSpellID}].Duration.TotalSeconds}-6]}s
    }
  }
}
/return

Sub ResetTimers
/declare i int local
/for i 1 to 5
/varset DebuffTimer${i} 0
/varset DoTTimer${i} 0
/next i
/varset SitTimer 0
/varset SnareTimer 0
/varset WaitTimer 0
/return

Sub TargetGuy
/squelch /target clear
/target id ${BuffGuy}
/if (!${Target.ID}==${BuffGuy}) {
  /varset TargetReturn TARGET_FAILED
  /return
}
/varset TargetReturn TARGET_SUCCESS
/return

Sub CheckBuffs
/declare i        int local
/declare a        int local
/declare MyTarget int local
/if (${RDPause} && ${SelfBuffTotal} && ${SelfBuffs} && !${SelfBuffTimer} && !${Me.Moving} && !${Me.Casting.ID} && (!${SitTimer} || ${Me.Gem[${SelfBuff[${i}]}]} || ${Me.Mount.ID})) {
  /for i 1 to ${SelfBuffTotal}
  /call CheckGroup
  /if (${Me.Buff[${SelfBuffIcon[${i}]}].Duration}<10 && ${Me.CountBuffs}<=${SelfBuffCount[${i}]}) {
    /for a 1 to 20
    /if (${SelfBuffBlock[${i}].Find[${Me.Buff[${a}].Spell}]}) /goto :NextSelfBuff
    /next a
    /if (!${Outdoors} && !${SelfBuffIndoors[${i}]}) /goto :NextSelfBuff
    /varset MyTarget ${Target.ID}
    /squelch /target myself
    /if (${ReportSelfBuffs} && !${SpamTimer}) /${ChatChannel} Buffing myself with ${SelfBuff[${i}]}
    /varset SpamTimer ${SpamDelay}
    /if (${SelfBuffGem[${i}].Equal[item]}) {
      /call Cast "${SelfBuff[${i}]}" item 1s Check4Pad
    } else /if (${SelfBuffGem[${i}].Equal[alt]} && ${Me.AltAbilityReady[${SelfBuff[${i}]}]}) {
      /call Cast "${SelfBuff[${i}]}" alt 1s Check4Pad
    } else /if (${Me.CurrentMana}>${Spell[${SelfBuffID[${i}]}].Mana}) {
      /call Cast "${SelfBuff[${i}]}" ${SelfBuffGem[${i}]} 1s Check4Pad
    }
    /target id ${MyTarget}
  }
  :NextSelfBuff
  /next i
  /varset SelfBuffTimer ${SelfBuffRecheck}
}
/return

Sub AutoSit
/if (!${SpamTimer} && ${Me.PctMana}==100) {
  /if (${ReportFM}) /${ChatChannel} ${Me.PctMana}m, GTG
  /varset SpamTimer ${SpamDelay}
  /varset ReportFM 0
}
/if (!${Me.Casting.ID} && !${Me.Moving} && ${Me.PctMana}<${MedPct} && !${Me.Mount.ID}) {
  /if (${AutoSit} && !${SitTimer} && ${Me.Standing} && !${Spawn[npc radius 20 zradius 100].ID}) {
    /sit
    /varset SitTimer ${SitDelay}
  }
  /if (${UseMount} && !${NoMount}) {
    /call Cast "${MountItem}" item 5s Check4Pad
  }
}
/return

Sub ToggleVar(string Line)
/if (!${Line.Arg[3].Length}) {
  /if (${RDTempVar}) {
    /varset RDTempVar 0
  } else {
    /varset RDTempVar 1
  }
}
/if (${Line.Arg[3].Equal[ON]} || ${Line.Arg[3].Equal[TRUE]} || ${Line.Arg[3].Equal[1]}) {
  /varset RDTempVar 1
}
/if (${Line.Arg[3].Equal[OFF]} || ${Line.Arg[3].Equal[FALSE]} || ${Line.Arg[3].Equal[0]}) {
  /varset RDTempVar 0
}
/return

Sub Event_Chat(string ChatType,string Sender,string ChatText)
/declare a        int local
/declare i        int local
/declare MyTarget int local
/if (!${RDPause} || !${DoBuffTotal} || !${DoBuffs}) /return
:WaitToBuff
/if (${Me.Moving} || ${Me.Casting.ID} || (${Me.Gem[${DoBuff[${i}]}]} && !${Me.SpellReady[${DoBuff[${i}]}]}) || (${SitTimer} && !${Me.Gem[${DoBuff[${i}]}]} && !${Me.Mount.ID})) {
  /call CheckGroup
  /goto :WaitToBuff
}
/for i 1 to ${DoBuffTotal}
/for a 1 to ${DoBuffAliases[${i}].Count[|]}
/if (${ChatText.Find[${DoBuffAliases[${i}].Arg[${a},|]}]}) {
  /call CheckGroup
  /if (!${Outdoors} && !${DoBuffIndoors[${i}]}) /goto :NextDoBuff
  /varset MyTarget ${Target.ID}
  /varset BuffGuy ${Spawn[pc ${Sender}].ID}
  /call TargetGuy
  /if (${TargetReturn.Equal[TARGET_SUCCESS]}) {
    /if (${ReportDoBuffs} && !${SpamTimer}) /tt Buffing you with ${DoBuff[${i}]}
    /if (${ReportDoBuffs} && !${SpamTimer} && ${Target.CleanName.NotEqual[NULL]}) /${ChatChannel} Buffing ${Target.CleanName} with ${DoBuff[${i}]}
    /varset SpamTimer ${SpamDelay}
    /if (${DoBuffGem[${i}].Equal[item]} && (${Target.Distance}<${Spell[${DoBuffID[${i}]}].Range} || ${Target.Distance}<${Spell[${DoBuffID[${i}]}].AERange})) {
      /call Cast "${DoBuff[${i}]}" item 1s Check4Pad
    }
    /if (${DoBuffGem[${i}].Equal[alt]} && ${Me.AltAbilityReady[${DoBuff[${i}]}]} && (${Target.Distance}<${Spell[${DoBuffID[${i}]}].Range} || ${Target.Distance}<${Spell[${DoBuffID[${i}]}].AERange})) {
      /call Cast "${DoBuff[${i}]}" alt 1s Check4Pad
    }
    /if (${Me.CurrentMana}>${Spell[${DoBuffID[${i}]}].Mana} && (${Target.Distance}<${Spell[${DoBuffID[${i}]}].Range} || ${Target.Distance}<${Spell[${DoBuffID[${i}]}].AERange})) {
      /call Cast "${DoBuff[${i}]}" ${DoBuffGem[${i}]} 1s Check4Pad
    }
    /target id ${MyTarget}
  }
}
/next a
:NextDoBuff
/next i
}
/return

somelamedruid
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 08, 2005 10:07 pm

Post by somelamedruid » Wed Apr 27, 2005 8:57 pm

well not a lot has happened with this macro as far as the releases lately, but this is one of the most extensible and cooly modifiable macros I've used for my druid.

A few mods I've put in my own code are.

1. automatic forageing by turning yafm into an .inc

2. Automatic shrinking in the self buff routine using a wand of imperceptability by checking ${Spawn.Height} and seeing if i'm too tall

3. NOT AUTOMATICALLY SITTING when i was paused... damn this annoyed me when using it in groups and got me a lot of aggro. I dont know about you but i pause this sucker when there is trouble.... i.e. the times when i dont want sit aggro.

does anyone else have any cool feature suggestion to add to this awesome project? :D

fallon
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sat Dec 18, 2004 7:37 pm
Location: Kuwait
Contact:

Post by fallon » Wed Apr 27, 2005 9:26 pm

Rambo: Are you sure you were using the latest download? I'm pretty sure I've gotten all the TLO fixes in there already.

Somelamedruid: Post your code for those additions and I'll put them in the next version. Personally I use the MQ2autoskills & MQ2AutoDestroy v3.0 (VIP only) plugins to handle my foraging (AutoDestroy can cause some problems with the feedme routines when they start fighing about where to put something on your cursor). Please post the no-sit on pause thing, definatly a good idea (think there's a similar issue with summoning a mount too).

I'm studying for my MCSE right now and a bit short on EQ & MQ2 time to do my own development, but I'll be more than hapy to roll contributed code into new versions.

somelamedruid
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 08, 2005 10:07 pm

Post by somelamedruid » Wed Apr 27, 2005 10:12 pm

Code: Select all

/if (!${Me.Casting.ID} && !${Me.Moving} && ${Me.PctMana}<${MedPct} && !${Me.Mount.ID} [color=red]&& ${RDPause}[/color]) {
  /if (${AutoSit} && !${SitTimer} && ${Me.Standing} && !${Spawn[npc radius 20 zradius 100].ID}) {
    /sit
    /varset SitTimer ${SitDelay}
  }
  /if (${UseMount} && !${NoMount}) {
    /call Cast "${MountItem}" item 5s Check4Pad
  }
}
this is in Sub AutoSit

new stuff is in red, behold the leetness :roll:

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Apr 28, 2005 8:27 am

Doh, I thought I had something like that in there at one point. It must have gotten lost when I switched summoning and sitting into separate toggles. Originally it would only summon horse outdoors and sit indoors. I broke it down so that you can sit outdoors if you want to, and must have neglected to fix the sit/summon code to use RDPause.

I used to use autodestroy and autoskills too, hence my not adding a yafm type plugin. Fallon does make a good point re: the feedme code fighting with autodestroy at times though. Autoskills has a habit of screwing with spell_routines too if you forage at the same time spell_routines wants to swap an item in. Overall it's a pretty small sub, so it's not a bad idea to just integrate it into the mac so that random plugins don't screw things up for RD, err DruidBot
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Rambo
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Mar 16, 2005 6:49 pm

Post by Rambo » Thu Apr 28, 2005 1:32 pm

Actually Fallon the version I posted is basically A_Druid_00 version with your name changes so that it works with your download and the TLO fixes and no other modifications. I have not tested your version since the first TLO fixes went live and when I download it from your link on the first page I still don't see the TLO changes completed. Am I not downloading the right one? Anyway I just thought I would post a working version but I can remove it if you want?

fallon
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sat Dec 18, 2004 7:37 pm
Location: Kuwait
Contact:

Post by fallon » Thu Apr 28, 2005 5:20 pm

Humm... ya... apparently I didn't upload the version I'm actually using. Tried to quickly throw in the missing fixes 'n stuff here from work, but something is up with my FTP server, will look into it as soon as I can.

somelamedruid
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 08, 2005 10:07 pm

Post by somelamedruid » Fri Apr 29, 2005 6:22 am

I actually began using the MQ2autoskill/destroy method as well. I ran into the swap bug as well. A quick and dirty fixe to this woud be chane the source of MQ2AutoSkills to only fire a forage when the cursor is clear (This may be unwanted... but I'm not sure when it would be) And to make the same provision in whatever code you are using to swap your items, be it via plugin or macro. I've not heavily tested this scheme and I'm not sure exactlly how exactly the cunncurrency of various plugins and macros is handled.

Esentially you need away to ensure that whatever opperations in which you do anything with items on your cursor are atomic.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Fri Apr 29, 2005 8:43 am

Integrating something like yafm into DruidBot would probably be the easiest way of doing this. That way you have no possible way that forage would fire in the middle of another subroutine. Since the Autoskills plugin runs independently of RD, there will always be an off chance that spell_routines needs to swap something during the same instance that Autodestroy wants to clear the cursor. That's my thoughts, any other way would require the plugins be engineered specifically to be DruidBot-friendly. I could be wrong though.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

fallon
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sat Dec 18, 2004 7:37 pm
Location: Kuwait
Contact:

Post by fallon » Fri Apr 29, 2005 5:26 pm

The auto-forrage and auto-keep functions work perfectly in my experience, with the exception of the feedme function.

When the feedme function picks up a food item, the autokeep kicks in and drops the food item back into the first avalable spot (not a problem if you have an open inventory slot). Feedme then fires again, because your still hungry, or is stuck in a loop of somekind & your stuck with a chorus of bags opening and closing until you /feedme.

At least that's my take on the forage issue, although it could be trying to feedme while something else is on the cursor already.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon May 02, 2005 9:08 am

fallon wrote:The auto-forrage and auto-keep functions work perfectly in my experience, with the exception of the feedme function.

When the feedme function picks up a food item, the autokeep kicks in and drops the food item back into the first avalable spot (not a problem if you have an open inventory slot). Feedme then fires again, because your still hungry, or is stuck in a loop of somekind & your stuck with a chorus of bags opening and closing until you /feedme.

At least that's my take on the forage issue, although it could be trying to feedme while something else is on the cursor already.
It's not feedme that causes anything. Feedme will /autoinv until the cursor is clear before attempting to eat. It's the auto-forage in autoskills firing when the macro is in the process of another swap, such as feedme firing or spell routines swapping in an item to cast. Autodestroy only causes minor annoyances such as the auto inventorying of the food before it actually gets eaten.

After some thought, it might be a good idea to modify feedme to turn /autoskills forage and /autokeep off at the top of the sub, and turn it back on after the sub runs. I'm not sure if there's an autoforage value defined in Autoskills, but if it does exist all you need to do is check if it evaluates TRUE, and if it does, turn it off for the duration of that sub. Can do the same thing in spell_routines at the top and bottom. You could do it in the main macro before and after each /call Cast is fired, but that would be a lot of checks.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon May 02, 2005 9:23 am

Code: Select all

Sub EatMe 
/declare mypack         string local 
/declare myslot         string local 
/declare i              int    local 
/declare foodcount      int    local 
/declare foodarray[100] string local 
[color=red]/declare foragevalue int local
/declare keepvalue int local

/if (${Autoforage}) {
  /autoskills forage off
  /varset foragevalue 1
}
/if (${Autokeep}) {
  /autokeep off
  /varset keepvalue 1
}[/color]
/autoinventory 
/if (${Cursor.ID}) /return 
/varset foodcount ${Ini[feedme.ini,Food].Count[Food]} 
/for i 1 to ${foodcount} 
/varset foodarray[${i}] ${Ini[feedme.ini,Food,Food${i}]} 
/next i 
/for i 1 to ${foodcount} 
/if (${FindItemCount[${Ini[feedme.ini,Food,Food${i}]}]}>0) { 
  /varset mypack ${FindItem[${Ini[feedme.ini,Food,Food${i}]}].InvSlot.Pack} 
  /varset myslot ${FindItem[${Ini[feedme.ini,Food,Food${i}]}].InvSlot} 
  /if (${mypack}) { 
    /if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup 
    :WaitForBagOpen 
    /nomodkey /ctrl /itemnotify ${myslot} leftmouseup 
    /if (!${Cursor.ID}) /goto :WaitForBagOpen 
    /nomodkey /itemnotify ${mypack} leftmouseup 
    /nomodkey /itemnotify ${mypack} rightmouseup 
    /nomodkey /itemnotify ${mypack} leftmouseup 
  } else { 
    /nomodkey /itemnotify ${myslot} rightmouseup 
  } 
} else { 
  /next i 
} 
[color=red]/if (${foragevalue}) {
  /varset foragevalue 0
  /autoskills forage on
}
/if (${keepvalue}) {
  /varset keepvalue 0
  /autokeep on
}
[/color]
/return 
Keep in mind that I have no idea what the variables are actually named in Autoskills and Autodestroy, so you'll have to figure those out on your own. You'd have to add the same values into the Drinkme sub as well. This would esentially prevent you from auto-inventorying anything while this sub is running, as well as auto foraging. Add this to spell_routines as well, and all of the current issues with auto swapping would be solved.

I know, I know, I'm a genious. Now let's just hope someone knows the variables as they exist in Autodestroy and Autoskills, because I don't have access to the plugins anymore to look for myself.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Xasiz
a lesser mummy
a lesser mummy
Posts: 43
Joined: Sat May 07, 2005 1:55 pm

Healing NPC's

Post by Xasiz » Tue May 17, 2005 8:15 pm

I can confirm that even as of tonight it still heals NPC's. I experimented in Maiden's Eye and Plane of Nightmare. When CH on main tank is turned off it stops and works fine. I hope this helps.