Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- |AF_Bst.mac 1
- #turbo 40
- #include wait4rez.inc
- #include ninjadvloot.inc
- #include General.inc
- #include Spell_routines.inc
- #event Experience "#*#You have slain#*#"
- #event Experience "#*#has been slain by#*#"
- #event Experience "#*#You gain party experience#*#"
- #event Experience "#*#You gained raid experience#*#"
- #event faraway "Your Target is too far away, get closer!"
- #event IRC "<#1#> #2#"
- #event SetVar "[MQ2] set: #1# #2#"
- #event nosee "You cannot see your target."
- #event CantHit "You can't hit them from here."
- #event Zone "You have entered #1#."
- #event Zone "LOADING, PLEASE WAIT..."
- #event NotHold "Your spell did not take hold."
- #event Help "[MQ2] Help"
- #chat tell
- #chat chat
- Sub main
- /declare dummy int local
- /call GeneralDeclares
- /call GeneralDeclares2
- /call event_zone
- /squelch /alias /Bsthelp /echo help
- /echo Beastlord Script Started 1
- :Mainloop
- /varset MacroState MainLoop
- /delay 1
- /doevents
- /if ( ${Followflag} || ${Me.Invis} ) /goto :Mainloop
- /call DpsMode
- /call MedTime
- /if (${Me.Dead}) /call wait4rez
- /if (${DoLoot} && !${Me.Moving} && !${Me.Invis}) /call LootMobs
- /if (!${CheckExpTimer} && ${AutoExpAdjust}) /call AutoAdjustExp
- /if (${Me.PctEndurance}<=18 && ${Me.CombatAbilityReady[Respite]} && !${Me.Combat} && !${Me.Invis}) /disc Respite
- /call pet
- /call buffs
- /goto :Mainloop
- /return
- Sub GeneralDeclares
- /declare Followflag int outer 0
- /declare Y float outer
- /declare X float outer
- /declare Counter int local
- /declare iMobID int outer
- /declare iMobCount int outer 0
- /declare iMobArray int outer 15
- /declare iMobList[16] int outer
- /declare iDebuffList[16] int outer
- /declare iniName string outer Bst_${Me.Name}.ini
- /declare bufftimer timer outer
- /declare MainMobID int outer
- /declare p int local
- /declare TempAggroTimer timer outer
- /declare TempIgnoreTimer timer outer
- /declare CurrentTarget int outer
- /declare following string outer
- /declare TempStickSetting int outer
- /declare validTarget int outer
- /declare irctimer timer outer 0s
- /declare WithStandTimer timer outer
- /declare CantHit int outer
- /declare acquiretimer timer outer 0
- /call DeclareIniVar RangeItem string Settings ""
- /call DeclareIniVar RangeItemSummon string Settings ""
- /call DeclareIniVar MobRadius int SETTINGS 10 /radius
- /call DeclareIniVar DpsMode int Settings 1 /dps
- /call DeclareIniVar MainAssist string Settings somebody /ma
- /call DeclareIniVar SecondAssist string Settings somebody
- /call DeclareIniVar TrippleAssist string Settings somebody
- /call DeclareIniVar EventsMaster string Settings somebody
- /call DeclareIniVar StickSetting string Settings 35 /sticksetting
- /call DeclareIniVar AssistDistance int Settings 80 /assistdistance
- /call DeclareIniVar AssistAt int Settings 98 /assistat
- /call DeclareIniVar DoLoot int Settings 0 /Doloot
- /call DeclareIniVar UseDisc int Settings 0 /UseDisc
- /Call DeclareIniVar WhenToBurn int Settings 95 /burn
- /Call DeclareIniVar Endurance int Settings 5 /Endurance
- /Call DeclareIniVar Petbuff1 string pet /petbuff1
- /Call DeclareIniVar Petbuff2 string pet /petbuff2
- /Call DeclareIniVar Petbuff3 string pet /petbuff3
- /Call DeclareIniVar Pethaste string pet /pethaste
- /Call DeclareIniVar Petshrink string pet /petshrink
- /Call DeclareIniVar Pet string pet /pet
- /Call DeclareIniVar BV string Disc NULL /bv
- /Call DeclareIniVar Naturesfury string Disc NULL /Naturesfury
- /Call DeclareIniVar Growl string pet NULL /Growl
- /Call DeclareIniVar SE string Buffs NULL /SE
- /return
- Sub Pet
- /varset MacroState Pet
- /if (${Cast.Ready[${Pet}]} && !${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Pet}"
- /if (${Cast.Ready[${Petbuff1}]} && !${Me.PetBuff[${Petbuff1}]} && ${Spell[${Petbuff1}].Stacks[0]} && ${Me.PctMana}>=20 && ${Me.Pet.ID} && !${Me.Combat}) /cast "${Petbuff1}"
- /if (${Cast.Ready[${Petbuff2}]} && !${Me.PetBuff[${Petbuff2}]} && ${Spell[${Petbuff2}].Stacks[0]} && ${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Petbuff2}"
- /if (${Cast.Ready[${Petbuff3}]} && !${Me.PetBuff[${Petbuff3}]} && ${Spell[${Petbuff3}].Stacks[0]} && ${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Petbuff3}"
- /if (${Cast.Ready[${Pethaste}]} && !${Me.PetBuff[${Pethaste}]} && ${Spell[${Pethaste}].Stacks[0]} && ${Me.PctMana}>=20 && ${Me.Pet.ID} && !${Me.Combat}) /cast "${Pethaste}"
- /if (${Cast.Ready[${Petshrink}]} && ${Me.Pet.Height}>=1 && !${Me.Combat}) /cast "${Petshrink}"
- /return
- Sub Buffs
- /if (${Cast.Ready[${SE}]} && !${Me.Buff[${SE}].ID} && !${Me.Combat} && ${Me.PctMana}>=25) /cast "${SE}"
- /return
- Sub DpsMode
- /doevents
- /call GetTarget
- /if (${validTarget} && ${Target.PctHPs}<=${AssistAt} && ${Target.Type.Equal[NPC]} && ${Target.Distance} < ${AssistDistance} && ${Target.ID}) /goto :KillTarget
- /return
- :Killtarget
- :loop
- /doevents
- /delay 1
- /call Attack
- /call CheckHealth
- /if (!${validTarget} || ${ExcludeList.Find[${Target.DisplayName}]}) /multiline ; /squelch /target clear; /attack off; /return
- /if (${Target.Type.Equal["Corpse"]} || !${Target.ID}) /multiline ; /squelch /target clear; /varset validTarget 0; /attack off; /return
- /if (${validTarget}) /goto :loop
- :end
- /return
- Sub GetMob
- /varset MacroState GetMob
- /declare MobID int local
- /declare i int local
- /declare MobLvl int local 5
- /declare MobToKill int local 0
- /declare MobDistance int local ${MobRadius}
- /declare Mobs int local
- /if (${Me.Dead}) /call wait4rez
- /delay 3
- /if (${Target.ID} && ${Target.Type.Equal[npc]} && !${ExcludeList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
- /varset MobToKill ${Target.ID}
- /goto :end
- }
- /if (${SpawnCount[npc los Range 5 110 radius 50 zradius 50 targetable]}) {
- /varset Mobs ${SpawnCount[npc los Range 5 110 radius 50 zradius 50 targetable]}
- /for i 1 to ${Mobs}
- /varset MobID ${NearestSpawn[${i}, npc los Range 5 110 radius 50 zradius 50 targetable].ID}
- /if (${Spawn[id ${MobID}].Level}>${MobLvl} && ${Spawn[id ${MobID}].Type.Equal[NPC]} && !${ExcludeList.Find[${Spawn[id ${MobID}].CleanName}]} && ${Spawn[id ${MobID}].CleanName.Length}>1 || ${MezzImmuneList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
- /varset MobToKill ${MobID}
- /varset MobLvl ${Spawn[id ${MobID}].Level}
- /if (${MezzImmuneList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
- /echo ${Spawn[ID ${MobID}].CleanName}]} Is Mezzimmune So i'm going after him!
- /goto :end
- }
- /if (${Spawn[id ${MobID}].Named} || ${NameList.Find[${Spawn[ID ${MobID}]}].CleanName}) /goto :end
- }
- /next i
- /goto :end
- }
- /if (${SpawnCount[npc los Range 5 110 radius ${MobRadius} zradius 50 targetable]}) {
- /varset Mobs ${SpawnCount[npc los Range 5 110 radius ${MobRadius} zradius 50 targetable]}
- /for i 1 to ${Mobs}
- /varset MobID ${NearestSpawn[${i}, npc los Range 5 110 radius ${MobRadius} zradius 50 targetable].ID}
- /if (${Spawn[id ${MobID}].Type.Equal[NPC]} && ${Spawn[id ${MobID}].LineOfSight} && !${ExcludeList.Find[${Spawn[id ${MobID}].CleanName}]} && ${Spawn[id ${MobID}].CleanName.Length}>1 && !${TempIgnoreTimer${MobID}}) {
- /varset MobToKill ${MobID}
- /varset MobLvl ${Spawn[id ${MobID}].Level}
- /goto :end
- }
- /next i
- }
- :end
- /if (${Spawn[${MobToKill}].Type.NotEqual[Aura]}) {
- /target id ${MobToKill}
- /varset TempAggroTimer 20s
- /varset CantHit 0
- /varset CurrentTarget ${Target.ID}
- /if (${Target.ID}) /squelch /face fast
- /if (!${Defined[TempIgnoreTimer${MobToKill}]}) /declare TempIgnoreTimer${MobToKill} timer outer
- } else {
- /return
- }
- /delay 1s ${Target.Type.Equal[NPC]}
- /return
- Sub Attack
- /varset MacroState Attack
- /if (${Me.Sitting}) /squelch /stand
- /if (!${Melee.Combat}) /killthis
- /if (${Melee.Combat}) /face fast
- /if (${Me.CombatAbilityReady[${BV}]} && ${Me.PctEndurance}>=${Endurance} && ${Target.PctHPs}<94 && ${Me.Combat}) /doability "${BV}"
- /if (${Me.PctMana}>=20 && ${Me.CombatState.Equal[Combat]}) /call cast "${Growl}"
- /if (${UseDisc}) /call UseDisc
- /return
- Sub UseDisc
- /varset MacroState UseDisc
- /if (${Me.Dead}) /call wait4rez
- /return
- Sub CheckHealth
- /varset MacroState CheckHealth
- /if (${Me.Dead}) /call wait4rez
- /return
- Sub Checkall
- /doevents
- /varset MacroState checkall
- /declare MobID int local
- /declare i int local
- /declare mobcount int local
- /declare Mobs int local
- /if (${Me.Dead}) /call wait4rez
- /if (${Target.Type.Equal[Corpse]} || ${Target.Type.Equal[PC]}) {
- /squelch /target clear
- /call interrupt
- /return
- }
- /if (${DpsMode}) /return
- /call CheckName
- /return
- Sub GetTarget
- /varset MacroState GetTarget
- /declare i int local
- /declare tempID int local ${Target.ID}
- /if (${Me.Moving}) /return
- /if (${Spawn[${MainAssist}].ID}) {
- /assist ${MainAssist}
- } else /if (${Spawn[${SecondAssist}].ID}) {
- /assist ${SecondAssist}
- } else /if (${Spawn[${TripleAssist}].ID}) {
- /assist ${TripleAssist}
- }
- /delay 2
- /if (${ExcludeList.Find[${Target.DisplayName}]}) /goto :notgood
- /if ( ( ${Spawn[${tempID}].Type.Equal[npc]} || ( ${Spawn[${tempID}].Type.Equal[pet]} && !${Spawn[${tempID}].Master.Type.Equal[pc]} ) ) && ( ( ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${AssistDistance}*2]} id ${tempID}].ID} && ${Spawn[pc ${mainTank}].Distance3D}<=${AssistDistance} ) || !${Spawn[pc ${mainTank}].ID} || ${Spawn[pc ${mainTank}].Distance3D}>200 ) && ${tempID}!=${petID} && ( ${aggroAnim.Find[|${Spawn[${tempID}].Animation}|]} || ${Spawn[${tempID}].PctHPs}<${AssistAt} || ${Me.TargetOfTarget.Type.Equal[pc]} || ${Me.TargetOfTarget.Master.Type.Equal[pc]} ) ) {
- /varset validTarget 1
- /varset CurrentTarget ${Target.ID}
- } else {
- :notgood
- /varset validTarget 0
- }
- /return
- Sub DeclareIniVar(string name,string varType,string section,string value,string alias)
- /if ( !${Defined[${name}]} ) /declare ${name} ${varType} outer
- /varset ${name} ${Ini[${iniName},${section},${name.Left[1].Upper}${name.Right[-1]},"${value}"]}
- /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}"
- /if ( ${Defined[alias]} ) /squelch /alias ${alias} /echo set: ${name}
- /return
- Sub Irc
- /Call DeclareIniVar IRCServer string Settings "localhost 6667"
- /Call DeclareIniVar IRCChannel string Settings "Main"
- /i quit
- /iconnect ${IRCServer} ${IRCCchannel} ${Me}
- /timed 30 /i join #${IRCChannel}
- /varset irctimer 30s
- /return
- Sub Event_nosee
- /varset MacroState NOSEE
- /if (${Target.Distance} >50 && ${SpawnCount[npc radius 50]} || ${Target.Distance} > ${MobRadius}) /squelch /target clear
- /doevents flush nosee
- /varset MainMobID 0
- /delay 1
- /return
- Sub CheckName
- /declare lMobID int local
- /declare Counter int local
- /declare lMobToKill int local 0
- /declare Mobs int local
- /if (!${SpawnCount[npc radius 50 zradius 30]}) /return
- /varset Mobs ${SpawnCount[npc radius 50 zradius 30 los]}
- /for Counter 1 to ${Mobs}
- /varset lMobID ${NearestSpawn[${Counter},npc radius 50 zradius 30].ID}
- /if (${Spawn[id ${lMobID}].LineOfSight} && !${Spawn[id ${lMobID}].CleanName.Find[s corpse]} && !${ExcludeList.Find[${Spawn[id ${lMobID}].CleanName}]} && (${Spawn[id ${lMobID}].Named} || ${NameList.Find[${Spawn[${lMobID}]}].CleanName} || ${MezzImmuneList.Find[${Spawn[${lMobID}]}].CleanName} ) ) {
- /if (${Target.ID}!= ${lMobID} && !${NameList.Find[${Target.ID}].CleanName} && !${MezzImmuneList.Find[${Target.ID}].CleanName} ) /target id ${lMobID}
- /delay 1s ${Target.ID}==${lMobID}
- /return
- }
- /next Counter
- /return
- Sub Event_Experience
- /varset MacroState Experience
- /if (${DpsMode}) /varset validTarget 0
- /return
- Sub checkammo
- /if (${FindItemCount[${RangeItemSummon}]} < 30) {
- /if (${FindItem[${RangeItem}].ID}) {
- /call cast "${RangeItem}" Item 0
- /delay 6s ${Cursor.ID}
- /timed 5 /autoinventory
- /delay 2s !${Cursor.ID}
- }
- }
- /return
- Sub Event_faraway
- /varset MacroState Faraway
- /delay 10s !${Me.Moving}
- /if (!${Me.Moving}) /multiline ; /squelch /stick; /squelch /killthis
- /delay 5
- :end
- /doevents flush faraway
- /return
- Sub Event_CantHit
- /varset CantHit ${Math.Calc[${CantHit}+1]}
- /if (${CantHit} > 15) /multiline ; /varset TempIgnoreTimer${Target.ID} 60s;/squelch /target clear
- /return
- Sub Event_NotHold
- /if (${Defined[TempIgnoreTimer${Target.ID}]}) /multiline ; /varset TempIgnoreTimer${Target.ID} 60s;/squelch /target clear
- /doevents flush NotHold
- /delay 3
- /return
- Sub Event_Help
- /echo Beastlord Script Help
- /echo /Dps On/Off - When turned on the Macro will not cast any aggro spells and will not taunt. It will start assisting someone else and just attack and use dps Type spells.
- /echo /MA ToonName - This is to be used with dps mode. This basically sets who you're going to be assisting.
- /echo /sticksetting # - This is your stick Range that you want to use. If you set it to high the Macro will try to compensate and Find Max melee. This is only for DPS mode.
- /echo /Assistdistance # - This is how close the mob has to be before it will start attacking when it reaches the desired health. This is only for DPS mode.
- /echo /Assistat # - This is the health the mob has to be before it decides to even attack If the mob is close enough. This is only for DPS Mode.
- /echo /Doloot On/Off - Turns looting On and Off.
- /echo /DoAura On/Off - Turns Aura On and Off.
- /echo /UseDisc On/Off - Burns Disc's on named On and Off.
- /echo /AutoSit On/Off - Turns Auto Sitting on or off. Will try to sit If either Mana or Endurance is under 90%.
- /echo /Autoadjustexp On/Off - Turns on whether you want the Macro to auto adjust Whether your Exp goes to Level or AAs.
- /echo /Maintexplvl # - This is the minimum amount of Exp you want in the Level you're currently at to have before the AutoAdjuster will make Exp go to AAs.
- /echo /MaxLevel # - This is the Level your toon needs to be before it even decides to go to AAs.
- /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement