Code: Select all
|
|---------------------------------------------------------------------------------
|
| BST Syntax:
|
| Usage: /mac BST
|
| Default settings can be changed by their respective controlling /command
|
| Type /BSThelp for help or /status to see current settings!
|
|---------------------------------------------------------------------------------
| Quick list for equipment slot info
|
| 0 charm
| 1 leftear
| 2 head
| 3 face
| 4 rightear
| 5 neck
| 6 shoulder
| 7 arms
| 8 back
| 9 leftwrist
| 10 rightwrist
| 11 ranged
| 12 hands
| 13 mainhand
| 14 offhand
| 15 leftfinger
| 16 rightfinger
| 17 chest
| 18 legs
| 19 feet
| 20 waist
| 21 ammo
|
|---------------------------------------------------------------------------------
#Chat group
#Chat tell
#Event AttackOn "#*#Auto attack is on#*#"
#Event AttackOff "#*#Auto attack is off#*#"
#Event Enraged "#*#|${Target.CleanName}| has become ENRAGED#*#"
#Event NLEnraged "#*#|${Target.CleanName}| is no longer enraged#*#"
#Event Exp "#*#You gain#*#experience#*#"
#Event Slain "#*# slain#*#"
#Event Zoned "#*#You have entered#*#"
#Event GotHit "#*#hits YOU#*#"
#Event GotMissed "#*#hit YOU#*#"
#Event SpellBounced "#*#Your spell did not take hold#*#"
#Event SwitchWeapon "#*#|${switchtext}|#*#"
#Event Invited "#*#invites you to join a group#*#"
#Event ImDead "You have been slain by#*#"
#Event TogStick "[MQ2] Autostick#*#"
#Event TogLeash "[MQ2] Leash#*#"
#Event TogAuto "[MQ2] Autoassist#*#"
#Event TogDynaggro "[MQ2] Dynaggro#*#"
#Event TogPause "[MQ2] Pause#*#"
#Event TogTSwitch "[MQ2] AutoTargetSwitch#*#"
#Event SetStopFighting "[MQ2] SetStopFighting#*#"
#Event SetEndFloor "[MQ2] SetEndFloor#*#"
#Event SetCloseness "[MQ2] SetCloseness#*#"
#Event SetFirstassist "[MQ2] SetMainassist#*#"
#Event SetSecondassist "[MQ2] SetSecondassist#*#"
#Event SetThirdassist "[MQ2] SetThirdassist#*#"
#Event SetAutoNinja "[MQ2] SetAutoNinja#*#"
#Event SetWeaponSwitch "[MQ2] SetWeaponSwitch#*#"
#Event SetStickDist "[MQ2] SetStickDist#*#"
#Event SetChicken "[MQ2] SetChicken#*#"
#Event SetDisc1 "[MQ2] SetDisc1#*#"
#Event SetDisc2 "[MQ2] SetDisc2#*#"
#Event DragBodies "[MQ2] DragBodies#*#"
#Event LootMyCorpse "[MQ2] LootMyCorpse#*#"
#Event AutoFollow "[MQ2] AutoFollow#*#"
#Event AddMaster "[MQ2] AddMaster#*#"
#Event RemMaster "[MQ2] RemoveMaster#*#"
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"
#Event TogBuff "[MQ2] AutoBuff#*#"
#Event TogPet "[MQ2] Autopet#*#"
#Event TogPetBuff "[MQ2] BuffPet#*#"
#Event TogPetHeal "[MQ2] HealPet#*#"
#Event TogVerbose "[MQ2] Verbose#*#"
#Event TogAutoslow "[MQ2] Autoslow#*#"
#Event TogFerorot "[MQ2] Autofero#*#"
#Event HelpInfo "[MQ2] BST Help#*#"
#Event StatInfo "[MQ2] -------=======(Current Status)=======--------"
#include Spell_Routines.inc
Sub Main
| The spell will be memmed in the listed order.
| Gem1 = Pet/PetHeal
| Gem2 = Pet buff
| Gem3 = Pet Haste
| Gem4 = Mana Regen
| Gem5 = Slow
| Gem6 = Hp buff....SV
| Gem7 = Sow, misc. buffs
| Gem8 = Atk buff
/echo Loading Beastlord Helper... Please Wait!
| *******Edit spells here*******
/declare SpellSlow outer "Sha's Revenge"
/declare SpellDoT outer "Chimera Blood"
/declare SpellPet outer "Spirit of Alladnu"
/declare SpellHeal outer "Muada's Mending"
/declare SpellNuke outer "Glacier Spear"
/declare SpellATK outer "Ferocity"
/declare SpellPetBuff outer "Spirit of Irionu"
/declare SpellPetHeal outer "Healing of Mikkily"
/declare SpellPetHaste outer "Growl of the Beast"
/declare SpellManaRegen outer "Spiritual Ascendance"
/declare SpellHPBuff outer "Spiritual Vitality"
/declare SpellMiscBuff outer "Spirit of Wolf"
/declare SpellStaBuff outer "Infusion of Spirit"
/declare SpellSHMHPBuff outer "Focus of Alladnu"
/declare SpellShrink outer "Shrink"
/declare SpellHaste outer "Celerity"
/declare SpellRegen outer "Feral Vigor"
/declare SpellCurePoison outer "Counteract Poison"
/declare SpellRGC outer "Abolish Disease"
| *******Edit Spell Blocking here*******
/declare SpellHasteBlock string outer |Hastening of Salik|Speed of Salik|Vallon's Quickening|Speed of Vallon|Talisman of Alacrity|
/declare SpellHPBlock string outer |Brell's Brawny Bulwark|Brell's Stalwart Shield|Strength of the Hunter|Strength of Tunare|
/declare SpellSHMHPBlock string outer |Talisman of Wunshi|Wunshi's Focusing|Focus of the Seventh|Focus of Soul|
| *******Edit Spell Clky Buffs/Blocking here*******
/declare SpellBuffClkyUse bool outer TRUE
/declare SpellBuffClkyBlock string outer |Strength of the Hunter|Strength of Tunare|Spiritual Vitality|Spiritual Vigor|
/declare SpellBuffClkyItem outer "Fabled Shrunken Goblin Skull Earring"
/declare SpellBuffClky outer "Aura of Rage"
| *******Edit Pet spells here*******
/declare SpellPetBuffs[2] string outer
/varset SpellPetBuffs[1] "Spirit of Irionu"
/varset SpellPetBuffs[2] "Growl of the Beast"
| /varset SpellPetBuff[3] "Ferocity"
|- *******Edit Pet AA's here*******
/declare SpellPetAAUse bool outer TRUE
/declare SpellPetBuffAA outer "Hobble of Spirits"
|- *******Edit Pet Clky Buffs here (ie epic 1.5)*******
/declare SpellPetClky bool outer TRUE
/declare SpellPetBuffClky outer "Savage Wildcaller's Blessing"
/declare SpellPetBuffClkyItem outer "Savage Lord's Totem"
/declare SpellPetBuffClkySlot int outer 13
/declare SpellPetBuffClkyRecast int outer 3600
|- *******Edit Pet Focus swapping here (ie epic 1.5)*******
/declare PetFocusON bool outer FALSE
/declare PetFocusItem outer "Sphere of Swirling Flame"
/declare PetFocusOld string outer
|- *******Edit Pet Healing here (Note: toggled within game using /Healpet [ON/OFF])*******
/declare HealPetAt int outer 40
| *******End Edit*******
/declare StopFightingHealth int outer 30
/declare MinEndurance int outer 80
/declare isEnraged bool outer FALSE
/declare LDExp float outer ${Me.PctGroupLeaderExp}
/declare AAExp float outer ${Me.PctAAExp}
/declare Exp float outer ${Me.PctExp}
/declare doStick bool outer TRUE
/declare X float outer
/declare Y float outer
/declare behindTarget bool outer FALSE
/declare n int outer
/declare dir int outer
/declare delta int outer
/declare strafedir string outer
/declare closeness int outer 70
/declare doLeash bool outer FALSE
/declare leashlength int outer 0
/declare stakeX int outer
/declare stakeY int outer
/declare leashholder string outer Nobody
/declare doAutoassist bool outer FALSE
/declare mainassist string outer Nobody
/declare firstassist string outer Nobody
/declare secondassist string outer Nobody
/declare thirdassist string outer Nobody
/declare assistpct int outer 98
/declare oldtargetID int outer ${Target.ID}
/declare assisttimer timer outer 0
/declare doDynaggro bool outer FALSE
/declare gotHit bool outer FALSE
/declare aggrotimer timer outer 0
/declare ialias string outer None
/declare doIclick bool outer FALSE
/declare bouncenum int outer 1
/declare ibounce string outer None
/declare itemspellname string outer None
/declare clicktimer timer outer 0
/declare isPaused bool outer FALSE
/declare ninjamode string outer TRUE
/declare ninjadist int outer 300
/declare doSwitch bool outer FALSE
/declare switchtext string outer +Undefined+
/declare weapon1 string outer None
/declare weapon2 string outer None
/declare wstype string outer Detrimental
/declare doTSwitch bool outer TRUE
/declare lastevent string outer None
/declare rngtarget int outer 200
/declare rngtank int outer 100
/declare useMU bool outer FALSE
/declare oldheading string outer Default
/declare doChicken bool outer FALSE
/declare nimblehealth int outer 20
/declare nimbletimer timer outer 0
/declare nimbleactive timer outer 0
/declare chickentimer timer outer 0
/declare doDisc1 bool outer FALSE
/declare disc1 string outer Bestial Fury
/declare disc1end int outer 60
/declare disc1reuse int outer 5
/declare disc1reusetimer timer outer
/declare doDisc2 bool outer FALSE
/declare disc2 string outer Kinesthetics
/declare disc2end int outer 60
/declare disc2reuse int outer 5
/declare disc2reusetimer timer outer 0
/declare discactive timer outer 0
/declare doSummonPet bool outer FALSE
/declare doBuffPet bool outer FALSE
/declare doHealPet bool outer FALSE
/declare Verbose bool outer FALSE
/declare MobSlowed bool outer TRUE
/declare Autoslow bool outer FALSE
/declare AutoBuff bool outer FALSE
/declare LOMon bool outer TRUE
/declare AutoFero bool outer FALSE
/declare SpellPetBuffClkyTimer timer outer 0
/declare slowDuration int outer 3100
/declare DebuffTimers[10] int outer
/declare midfightcast bool outer FALSE
/declare ATKBuffed0 timer outer 0
/declare ATKBuffed1 timer outer 0
/declare ATKBuffed2 timer outer 0
/declare ATKBuffed3 timer outer 0
/declare ATKBuffed4 timer outer 0
/declare ATKBuffed5 timer outer 0
/declare FeroDelay outer 5350
/squelch /alias /status /echo -------=======(Current Status)=======--------
/squelch /alias /BSThelp /echo BST Help
/squelch /alias /stopfight /echo SetStopFighting
/squelch /alias /autostick /echo Autostick
/squelch /alias /leash /echo Leash
/squelch /alias /autoassist /echo Autoassist
/squelch /alias /dynaggro /echo Dynaggro
/squelch /alias /closeness /echo SetCloseness
/squelch /alias /mainassist /echo SetMainassist
/squelch /alias /secondassist /echo SetSecondassist
/squelch /alias /thirdassist /echo SetThirdassist
/squelch /alias /drag /echo DragBodies
/squelch /alias /lootmycorpse /echo LootMyCorpse
/squelch /alias /autofollow /echo AutoFollow
/squelch /alias /iset /echo ItemSet
/squelch /alias /ibounce /echo ItemBounce
/squelch /alias /iclick /echo ItemCast
/squelch /alias /pause /echo Pause
/squelch /alias /autoninja /echo SetAutoNinja
/squelch /alias /addmaster /echo AddMaster
/squelch /alias /remmaster /echo RemoveMaster
/squelch /alias /weaponswitch /echo SetWeaponSwitch
/squelch /alias /targetswitch /echo AutoTargetSwitch
/squelch /alias /stickdist /echo SetStickDist
/squelch /alias /autochicken /echo SetChicken
/squelch /alias /autodisc1 /echo SetDisc1
/squelch /alias /autodisc2 /echo SetDisc2
/squelch /alias /autopet /echo AutoPet
/squelch /alias /BuffPet /echo BuffPet
/squelch /alias /Verbose /echo Verbose
/squelch /alias /Autoslow /echo Autoslow
/squelch /alias /AutoBuff /echo AutoBuff
/squelch /alias /AutoFero /echo AutoFero
/squelch /alias /HealPet /echo HealPet
|-- Read in INI settings, if defined... Leashing is only stored TRUE if there is a Leash-holding Master!
/if (${Ini[BSTSettings.ini,General,StopFightingHealth].NotEqual[NULL]}) /varset StopFightingHealth ${Ini[BSTSettings.ini,General,StopFightingHealth]}
/if (${Ini[BSTSettings.ini,General,MinEndurance].NotEqual[NULL]}) /varset MinEndurance ${Ini[BSTSettings.ini,General,MinEndurance]}
/if (${Ini[BSTSettings.ini,General,AutoStick].NotEqual[NULL]}) /varset doStick ${Ini[BSTSettings.ini,General,AutoStick]}
/if (${Ini[BSTSettings.ini,General,Closeness].NotEqual[NULL]}) /varset closeness ${Ini[BSTSettings.ini,General,Closeness]}
/if (${Ini[BSTSettings.ini,General,Leashing].NotEqual[NULL]}) /varset doLeash ${Ini[BSTSettings.ini,General,Leashing]}
/if (${Ini[BSTSettings.ini,General,LeashHolder].NotEqual[NULL]}) /varset leashholder ${Ini[BSTSettings.ini,General,LeashHolder]}
/if (${Ini[BSTSettings.ini,General,LeashLength].NotEqual[NULL]}) /varset leashlength ${Ini[BSTSettings.ini,General,LeashLength]}
/if (${Ini[BSTSettings.ini,General,AutoAssist].NotEqual[NULL]}) /varset doAutoassist ${Ini[BSTSettings.ini,General,AutoAssist]}
/if (${Ini[BSTSettings.ini,General,AssistPercentage].NotEqual[NULL]}) /varset assistpct ${Ini[BSTSettings.ini,General,AssistPercentage]}
/if (${Ini[BSTSettings.ini,General,MainAssist].NotEqual[NULL]}) /varset mainassist ${Ini[BSTSettings.ini,General,MainAssist]}
/if (${Ini[BSTSettings.ini,General,MainAssist].NotEqual[NULL]}) /varset firstassist ${Ini[BSTSettings.ini,General,MainAssist]}
/if (${Ini[BSTSettings.ini,General,SecondAssist].NotEqual[NULL]}) /varset secondassist ${Ini[BSTSettings.ini,General,SecondAssist]}
/if (${Ini[BSTSettings.ini,General,ThirdAssist].NotEqual[NULL]}) /varset thirdassist ${Ini[BSTSettings.ini,General,ThirdAssist]}
/if (${Ini[BSTSettings.ini,General,DynamicAggro].NotEqual[NULL]}) /varset doDynaggro ${Ini[BSTSettings.ini,General,DynamicAggro]}
/if (${Ini[BSTSettings.ini,General,AutoNinjaMode].NotEqual[NULL]}) /varset ninjamode ${Ini[BSTSettings.ini,General,AutoNinjaMode]}
/if (${Ini[BSTSettings.ini,General,AutoNinjaDistance].NotEqual[NULL]}) /varset ninjadist ${Ini[BSTSettings.ini,General,AutoNinjaDistance]}
/if (${Ini[BSTSettings.ini,General,WeaponSwitching].NotEqual[NULL]}) /varset doSwitch ${Ini[BSTSettings.ini,General,WeaponSwitching]}
/if (${Ini[BSTSettings.ini,General,TargetSwitching].NotEqual[NULL]}) /varset doTSwitch ${Ini[BSTSettings.ini,General,TargetSwitching]}
/if (${Ini[BSTSettings.ini,General,StickRangeToTarget].NotEqual[NULL]}) /varset rngtarget ${Ini[BSTSettings.ini,General,StickRangeToTarget]}
/if (${Ini[BSTSettings.ini,General,StickRangeToTank].NotEqual[NULL]}) /varset rngtank ${Ini[BSTSettings.ini,General,StickRangeToTank]}
/if (${Ini[BSTSettings.ini,General,AutoChicken].NotEqual[NULL]}) /varset doChicken ${Ini[BSTSettings.ini,General,AutoChicken]}
/if (${Ini[BSTSettings.ini,General,NimbleHealth].NotEqual[NULL]}) /varset nimblehealth ${Ini[BSTSettings.ini,General,NimbleHealth]}
/if (${Ini[BSTSettings.ini,General,AutoDisc1].NotEqual[NULL]}) /varset doDisc1 ${Ini[BSTSettings.ini,General,AutoDisc1]}
/if (${Ini[BSTSettings.ini,General,Disc1].NotEqual[NULL]}) /varset disc1 ${Ini[BSTSettings.ini,General,Disc1]}
/if (${Ini[BSTSettings.ini,General,Disc1Endurance].NotEqual[NULL]}) /varset disc1end ${Ini[BSTSettings.ini,General,Disc1Endurance]}
/if (${Ini[BSTSettings.ini,General,Disc1Reuse].NotEqual[NULL]}) /varset disc1reuse ${Ini[BSTSettings.ini,General,Disc1Reuse]}
/if (${Ini[BSTSettings.ini,General,AutoDisc2].NotEqual[NULL]}) /varset doDisc2 ${Ini[BSTSettings.ini,General,AutoDisc2]}
/if (${Ini[BSTSettings.ini,General,Disc2].NotEqual[NULL]}) /varset disc2 ${Ini[BSTSettings.ini,General,Disc2]}
/if (${Ini[BSTSettings.ini,General,Disc2Endurance].NotEqual[NULL]}) /varset disc2end ${Ini[BSTSettings.ini,General,Disc2Endurance]}
/if (${Ini[BSTSettings.ini,General,Disc2Reuse].NotEqual[NULL]}) /varset disc2reuse ${Ini[BSTSettings.ini,General,Disc2Reuse]}
/if (${Ini[BSTSettings.ini,General,AutoPet].NotEqual[NULL]}) /varset doSummonPet ${Ini[BSTSettings.ini,General,AutoPet]}
/if (${Ini[BSTSettings.ini,General,BuffPet].NotEqual[NULL]}) /varset doBuffPet ${Ini[BSTSettings.ini,General,BuffPet]}
/if (${Ini[BSTSettings.ini,General,HealPet].NotEqual[NULL]}) /varset doHealPet ${Ini[BSTSettings.ini,General,HealPet]}
/if (${Ini[BSTSettings.ini,General,AutoFero].NotEqual[NULL]}) /varset AutoFero ${Ini[BSTSettings.ini,General,AutoFero]}
/if (${Ini[BSTSettings.ini,General,Verbose].NotEqual[NULL]}) /varset Verbose ${Ini[BSTSettings.ini,General,Verbose]}
/if (${Ini[BSTSettings.ini,General,Autoslow].NotEqual[NULL]}) /varset Autoslow ${Ini[BSTSettings.ini,General,Autoslow]}
/if (${Ini[BSTSettings.ini,General,AutoBuff].NotEqual[NULL]}) /varset AutoBuff ${Ini[BSTSettings.ini,General,AutoBuff]}
/if (${Ini[BSTSettings.ini,Weapons,Weapon1].NotEqual[NULL]}) /varset weapon1 ${Ini[BSTSettings.ini,Weapons,Weapon1]}
/if (${Ini[BSTSettings.ini,Weapons,Weapon2].NotEqual[NULL]}) /varset weapon2 ${Ini[BSTSettings.ini,Weapons,Weapon2]}
/if (${Ini[BSTSettings.ini,Weapons,SwitchText].NotEqual[NULL]}) /varset switchtext ${Ini[BSTSettings.ini,Weapons,SwitchText]}
/varset wstype ${FindItem[${weapon1}].Spell.SpellType}
|- Build Empty master list in BSTSettings.ini file if it doesn't exist
/if (!${Ini[BSTSettings.ini,Masters,Controller1].Length}) {
|- It's not in there yet
/declare i int local
/for i 1 to 34
/ini "BSTSettings.ini" "Masters" "Controller${i}" "Nobody"
/next i
}
/varset MobSlowed FALSE
/varset LOMon FALSE
/echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/echo Mystikule's Hacked up Beastlord Helper Macro (v5.8.1a) Starting...
/echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
/echo Use "/BSThelp" to display help information
/echo -------=======(Current Status)=======--------
/call MemSpells
:ForeverLoop
|- Service any events
/call CheckGM
/doevents
/if (${Me.SpellReady[${SpellATK}]} && ${AutoFero} && ${Me.PctMana}>50) /call Cast_Fero
/if (${doHealPet} && ${Me.Pet.ID}) /call Heal_Pet
/if (${Autoslow}) /call CheckDebuffTimers
|- If we're stunned or RH is paused, just service events
/if (${Me.State.Equal[STUN]} || ${isPaused}) {
/delay 2
/goto :ForeverLoop
}
|- While fighting or not fighting...
|- Turn attacking back on if enraged target, and no longer facing it
/if (${isEnraged} && ${Target.ID} && ${doAutoassist} && !${Me.Combat}) {
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && ${behindTarget}) {
/attack on
/if (${Me.Sitting} && ${Me.Combat}) /stand
/echo ** Attack re-started (No Enrage Risk): ${Target.CleanName}
}
}
|- Check if we should chicken out
/if (${doChicken} && (${Me.PctHPs}<=${nimblehealth}) && !${chickentimer}) {
/echo Autochicken to the rescue!
/if (!${nimbletimer}) {
/disc Protective Spirit
/echo Nimble mode activated!
/varset nimbletimer 4m
/varset nimbleactive 12s
} else {
/echo ... or not! Can't escape, can't nimble... Farewell!
/varset chickentimer 4s
}
}
|- Stop fighting if we lose our target
/if (${Me.Combat} && !${Target.ID}) {
/attack off
/pet back off
/pet hold
}
|- Are we suposed to stick to a target?
/if (${Me.Combat} || ${Target.ID} && ${doStick} && (${Target.PctHPs}<=${assistpct}) && (${Target.Distance}<${rngtarget}) && ${Target.Type.Equal[NPC]} && !${aggrotimer.Value} && !${Me.TargetOfTarget.Name.Equal[${Me}]}) {
|- Check to see if we're too far from our tank (if applicable)
/if (${doAutoassist} && (${Spawn[${mainassist}].Distance}>${rngtank})) {
/if (${useMU} && ${Stick.Status.Equal[ON]}) /squelch /stick off
/goto :DoneSticking
}
|- Use MQ2MoveUtils ? If so, start sticking and bypass RH movement tools
/if (${useMU} && ${Stick.Status.Equal[OFF]}) {
/if (${Me.Underwater}) {
/squelch /stick ${closeness}% mpause uw
} else {
/squelch /stick ${closeness}% mpause
}
/goto :DoneSticking
}
/if (${Target.ID}) /face ${If[${Me.Underwater},,nolook]}
|- If we're too far away to hit it, get 1 second closer, unless we can hit it in less time
/if (${Target.Distance}>${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]}) {
|- Set current position first before potentially moving (in case we get stuck)
/varset X ${Me.X}
/varset Y ${Me.Y}
/if (!${Target.ID}) /goto :Foreverloop
|- Move
/keypress forward hold
/delay 1s ${Target.Distance}<${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]}
/keypress forward
|- Check to see if we got stuck trying that
/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) {
|- We're stuck, back off a second, move left or right (randomly) for .5 seconds
/echo We're STUCK on something, backing up...
/keypress back hold
/delay 1s
/keypress back
/if (${Math.Rand[2]}) {
/varset strafedir STRAFE_LEFT
} else {
/varset strafedir STRAFE_RIGHT
}
/echo Unsticking: Strafing ${strafedir} a half-second...
/keypress ${strafedir} hold
/delay 5
/keypress ${strafedir}
}
}
/if (!${Target.ID}) /goto :Foreverloop
|- If we are close enough to hit it, lets try to get behind it a little bit at a time
/if (${Target.Distance}<=${Target.MaxRangeTo}) {
/call Check_Behind
/varset behindTarget ${Macro.Return}
|- If we're not behind it, strafe around it a little
/if (!${behindTarget} && ${Me.TargetOfTarget.Name.NotEqual[${Me}]}) {
|- Which way do we strafe?
/varcalc delta ${Me.Heading.Clock}-${Target.Heading.Clock}
/if (${delta}>6) /varcalc delta ${delta}-12
/if (${delta}<-6) /varcalc delta ${delta}+12
/if (${delta}<0) {
/varset strafedir STRAFE_LEFT
} else {
/varset strafedir STRAFE_RIGHT
}
|- Set current position first before moving (in case we get stuck)
/varset X ${Me.X}
/varset Y ${Me.Y}
/if (!${Target.ID}) /goto :Foreverloop
|- Execute a strafe in the correct direction
/keypress ${strafedir} hold
/delay 2
/keypress ${strafedir}
/if (${Target.ID}) /face fast ${If[${Me.Underwater},,nolook]}
|- Check if we're stuck and warn if so (go through target to fix it)
/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) {
/echo We're STUCK trying to get behind target!
/delay 1s
}
}
}
} else {
/if (${useMU} && ${Stick.Status.Equal[ON]}) /squelch /stick off
}
:DoneSticking
|- Check on switching weapons (assuming it's a buff-weapon and buff is down)
/if (${doSwitch} && ${wstype.Equal[Beneficial]}) {
/varset itemspellname ${FindItem[${weapon1}].Spell}
/if (${itemspellname.NotEqual[${Me.Buff[${itemspellname}]}]} && !${FindItem[${weapon1}].InvSlot.Name.Equal[mainhand]} && !${FindItem[${weapon1}].InvSlot.Name.Equal[offhand]}) {
/echo ** Beneficial proc-weapon swapping...
/call Weapon_Swap "${weapon1}" "${weapon2}"
}
}
|- Are we fighting?
/if (${Me.Combat}) {
|- ** We are fighting **
|- Respond to enraged targets
/if (${isEnraged} && ${Target.ID}) {
/pet back off
/pet hold
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && !${behindTarget}) {
/attack off
/echo ** Attack ceased (Enrage Risk): ${Target.CleanName}
}
}
|- Check up on tank(s) health/presence, update main assist as needed
/if (${doAutoassist} && ${mainassist.Equal[Main]}) /goto :BypassTanks
/if (${doAutoassist} && (!${Spawn[${mainassist}].ID} || !${mainassist.Equal[${firstassist}]})) {
/if (${Spawn[${firstassist}].ID}) {
/varset mainassist ${firstassist}
/echo ** Main assist *SWITCHED* to: ${mainassist}
} else /if (${Spawn[${secondassist}].ID}) {
/varset mainassist ${secondassist}
/echo ** Main assist *SWITCHED* to: ${mainassist}
} else /if (${Spawn[${thirdassist}].ID}) {
/varset mainassist ${thirdassist}
/echo ** Main assist *SWITCHED* to: ${mainassist}
} else {
|- Uh oh, all set tanks are dead, zoned or otherwise missing
/varset doAutoassist FALSE
/echo ** All assists are dead or missing!
/echo ** Autoassist is now OFF!
/if (!${leashholder.Equal[Nobody]}) /tell ${leashholder} ACK! All tanks are dead or missing!
}
}
:BypassTanks
|- Check up on our autoassist targets if applicable, and switch if MA switches (1 second checks)
/if (${doTSwitch} && ${doAutoassist} && ${Target.ID} && !${assisttimer}) {
/varset oldtargetID ${Target.ID}
/assist ${mainassist}
/varset assisttimer 1s
}
|- Did we just switch targets? If so, turn off attack and start the loop over!
/if (${doAutoassist} && ${Target.ID}!=${oldtargetID}) {
/echo --> *SWITCH* target to: ${Target.CleanName}
/varset oldtargetID ${Target.ID}
/attack off
/pet back off
/pet hold
/delay 2
/goto :ForeverLoop
}
|- Check for leash tugging and move back to stake some if so
/if (${doLeash}) {
/if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${leashlength})) {
/echo CHOKE! We're at the leash's length! (${leashlength} ft.)
/face ${If[${Me.Underwater},,nolook]} loc ${stakeY},${stakeX}
/keypress forward hold
/delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<10
/keypress forward
|- Slow 180degree turns take time, and we may have turned off attack, so...
/goto :Foreverloop
}
/if (!${leashholder.Equal[Nobody]} && ${Spawn[${leashholder}].ID} && (${Spawn[${leashholder}].Distance}>${leashlength})) {
/echo CHOKE! Tugging on ${leashholder}'s leash! (${leashlength} ft.)
/squelch /face ${If[${Me.Underwater},,nolook]} id ${Spawn[${leashholder}].ID}
/keypress forward hold
/delay 1s ${Spawn[${leashholder}].Distance}<10
/keypress forward
|- Slow 180degree turns take time, and we may have turned off attack, so...
/goto :Foreverloop
}
|- Broken leash check
/if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
/echo ** Master DEAD or ZONED! Leash is BROKEN!
/varset doLeash FALSE
/varset leashholder Nobody
/ini "BSTSettings.ini" "General" "Leashing" "${doLeash}"
/ini "BSTSettings.ini" "General" "LeashHolder" "${leashholder}"
/goto :Foreverloop
}
}
|- Are we standing, have a target, have Kick ready and can we stick it in the back?
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && ${Me.Standing} && ${behindTarget} && (${Target.Distance}<${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]})) {
/if (${Me.AbilityReady["Kick"]}) {
/doability "Kick"
/echo Kicking: ${Target.CleanName}
}
}
|- Are we tanking? If so, just Kick it in the face if we can!
/if (${Target.ID} && ${Me.Standing} && (${aggrotimer.Value} || ${Me.TargetOfTarget.Name.Equal[${Me}]})) {
/if (${Me.AbilityReady["Kick"]}) {
/doability "Kick"
/echo Tanking -> Kicking: ${Target.CleanName}
}
}
|- Are we so hurt we should stop fighting for a bit?
/if (${Me.PctHPs}<=${StopFightingHealth}) {
/attack off
/echo Getting my ass kicked, ceasing combat!
}
|- Shall we do our optional discs?
/if (${doDisc1} && !${disc1reusetimer} && !${discactive} && !${strikeTimer} && ${Me.PctEndurance}>=${disc1end}) {
/disc ${disc1}
/echo Disc #1: ${disc1} activated
/varset disc1reusetimer ${disc1reuse}m
/varset discactive 1m
}
/if (${doDisc2} && !${disc2reusetimer} && !${discactive} && !${strikeTimer} && ${Me.PctEndurance}>=${disc2end}) {
/disc ${disc2}
/echo Disc #2: ${disc2} activated
/varset disc2reusetimer ${disc2reuse}m
/varset discactive 1m
}
} else {
|- ** We are not fighting
|- If we're not hiding or moving, check clicky maintained spells
/if (${Me.Invis} || ${Me.Moving} || ${clicktimer}) /goto :DoneItemChecks
/varset n 1
:ItemCheckLoop
/varset ialias ${Ini[RHItems.ini].Arg[${n},|]}
/if (${ialias.NotEqual[NULL]}) {
|- Obtained an itemalias from the RHItems.ini file
|- We supposed to keep this spell up?
/if (${Ini[RHItems.ini,${ialias},KeepUp].Equal[FALSE]}) /goto :NextItem
|- Scan the item's bounce list for the active bouncers
/varset bouncenum 1
/varset doIclick TRUE
:BounceCheckLoop
/varset ibounce ${Ini[RHItems.ini,${ialias},BounceOff${bouncenum}]}
/if (${ibounce.NotEqual[NULL]}) {
/if (${ibounce.Equal[${Me.Buff[${ibounce}]}]}) /varset doIclick FALSE
} else /goto :DoneBounceChecks
/varcalc bouncenum ${bouncenum}+1
/goto :BounceCheckLoop
:DoneBounceChecks
|- By now we won't click the item if a bouncer spell is on us
|- Just have to check to see if the existing buff is on too
/varset itemspellname ${FindItem[${Ini[RHItems.ini,${ialias},FullName]}].Spell}
/if (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]}) /varset doIclick FALSE
|- Finally, do it if we should
/if (${doIclick}) /docommand /iclick ${ialias}
|- Did we fail to find that previous item? (i.e. Dead and naked at bind point!)
/if (${clicktimer}) /goto :DoneItemChecks
:NextItem
/varcalc n ${n}+1
} else /goto :DoneItemChecks
/goto :ItemCheckLoop
:DoneItemChecks
|- Buffs
/if (${AutoBuff} && ${Me.PctMana}>25 && !${Me.Combat}) {
/if (${Target.Type.Equal[NPC]} && ${Me.TargetOfTarget.Name.Equal[${Me}]}) /goto :nobuffs
/call GroupBuffs
/call SelfBuffs
}
|- Pet
/if (!${Me.Pet.ID} && ${doSummonPet} && ${Spell[${SpellPet}].Mana} <= ${Me.CurrentMana}) {
/if (${Target.Type.Equal[NPC]} && ${Me.TargetOfTarget.Name.Equal[${Me}]}) /goto :nobuffs
/attack off
/if (${PetFocusON}) {
/call EquipItem ${PetFocusItem}
/varset PetFocusOld ${Macro.Return}
}
:recastpet
/call cast ${SpellPet} gem1 9s
/if (${Macro.Return.NotEqual["CAST_SUCCESS"]}) /goto :recastpet
/if (${PetFocusON}) /call EquipItem ${PetFocusOld}
}
/if (${Me.Pet.ID} && ${doBuffPet} && ${Me.PctMana}>35) {
/if (${Target.Type.Equal[NPC]} && ${Me.TargetOfTarget.Name.Equal[${Me}]}) /goto :nobuffs
/if ( !${Me.Gem[${SpellPetHeal}]} && ${doHealPet}) {
/memspell 1 ${SpellPetHeal}
/delay 45
}
/call BuffPet
}
|- ManaCheck
/if (!${LOMon}) {
/if (${Me.PctMana} < 25) {
/if (${Verbose}) /gsay lom atm sigh.....
/varset LOMon TRUE
} else {
/varset LOMon FALSE
}
}
|- Fero rot
/if (${Me.SpellReady[${SpellATK}]} && ${AutoFero} && ${Me.PctMana}>50) /call Cast_Fero
:nobuffs
|- It's possible we're poised for attack, check and fight if so
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Me.Standing} && (${Target.PctHPs}<=${assistpct})) {
/if ( ${Me.Mount.ID} ) /dismount
/echo --> Assisting ${mainassist} on ${Target.CleanName} @ (${Target.PctHPs}%) HPs
/if (${Autoslow}) {
/call CheckDebuffTimers
/call Slow
}
/if (${Me.AbilityReady["Kick"]}) {
/doability "Kick"
/attack on
/if (${Me.Sitting} && ${Me.Combat}) /stand
/pet attack
}
}
|- If we're set to autoassist, lets monitor the main tank's target
/if (${doAutoassist} && !${isEnraged}) {
|- Is main assist alive/in-zone?
/if ((${Spawn[pc ${mainassist}].ID} || ${mainassist.Equal[Main]}) && !${assisttimer}) {
|- Main tank is alive
/assist ${mainassist}
/varset oldtargetID ${Target.ID}
/varset assisttimer 1s
|- Do we have an NPC targeted and is it hurt enough to attack?
/if (${Target.ID} && ${Target.Type.Equal[NPC]} && !${Me.Combat} && (${Target.PctHPs}<=${assistpct})) {
/echo --> Assisting ${mainassist} on ${Target.CleanName} @ (${Target.PctHPs}%) HPs
/goto :Foreverloop
}
}
}
|- We could be on a leash, if so move 1s closer to our stake point (or master)
/if (${doLeash} && !${Target.Type.Equal[NPC]} && !${Me.Combat}) {
/if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>10)) {
/echo Moving closer to the Stake... ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} ft. away
/face ${If[${Me.Underwater},,nolook]} loc ${stakeY},${stakeX}
/keypress forward hold
/delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<10
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<10) {
/echo Arrived near the Stake.
/face fast ${If[${Me.Underwater},,nolook]} away loc ${stakeY},${stakeX}
/if (${Me.PctMana} < 25 && ${Me.Standing} && !${Me.Combat} && !${Me.Casting}) /sit
}
}
/if (!${leashholder.Equal[Nobody]} && ${Spawn[${leashholder}].ID} && (${Spawn[${leashholder}].Distance}>10)) {
/echo Moving closer to ${leashholder}... ${Spawn[${leashholder}].Distance} ft. away
/if (${Target.ID}!=${Spawn[${leashholder}].ID}) /target id ${Spawn[${leashholder}].ID}
/if (${Me.Combat}) {
/attack off
/pet bak
}
/face ${If[${Me.Underwater},,nolook]}
/keypress forward hold
/delay 1s ${Spawn[${leashholder}].Distance}<10
/keypress forward
/if (${Spawn[${leashholder}].Distance}<10) /echo Arrived near Master (${leashholder}).
}
|- Broken leash check
/if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
/echo ** Master DEAD or ZONED! Leash is BROKEN!
/varset doLeash FALSE
/varset leashholder Nobody
/ini "BSTSettings.ini" "General" "Leashing" "${doLeash}"
/ini "BSTSettings.ini" "General" "LeashHolder" "${leashholder}"
}
}
}
/goto :ForeverLoop
/return
|---- SUBROUTINES
Sub Check_Behind
/declare behindIt FALSE
|- Are we behind our target?
/for n -1 to 1
/varcalc dir (${Target.Heading.Clock}+${n})%12
/if (${dir}<1) /varcalc dir ${dir}+12
/if (${dir}>12) /varcalc dir ${dir}-12
/if (${dir} == ${Me.Heading.Clock}) /varset behindIt TRUE
/next n
/return ${behindIt}
Sub Weapon_Swap(string weapon, string wieldedweapon)
|- Is it in a Bag?
/declare camefrom ${FindItem[${weapon}].InvSlot}
/declare goingto ${FindItem[${wieldedweapon}].InvSlot}
/echo ** Looking for weapon: ${weapon}
/if (${FindItem[${weapon}].InvSlot.Pack}) {
:OpenPack
/if (!${Window[${FindItem[${weapon}].InvSlot.Pack.Name}].Open}) {
/itemnotify ${FindItem[${weapon}].InvSlot.Pack.Name} rightmouseup
/delay 2
/goto :OpenPack
}
:GrabItem
/if (!${Cursor.ID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :GrabItem
}
/declare weaponID int local ${Cursor.ID}
:SwapIt
/if (${Cursor.ID}==${weaponID}) {
/itemnotify ${InvSlot[${goingto}]} leftmouseup
/delay 2
/goto :SwapIt
}
/delay 2
/echo ** Swapping out: ${weapon}
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/if (${Cursor.ID}) {
/echo ** Failed to use existing slot, dropping to inventory!
/autoinv
}
:ClosePack
/if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
/itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
/delay 2
/goto :ClosePack
}
} else {
|- It's in the main inventory
/if (${FindItem[${weapon}].InvSlot}) {
/itemnotify ${FindItem[${weapon}].InvSlot} leftmouseup
/delay 2
/itemnotify ${InvSlot[${goingto}]} leftmouseup
/delay 2
/echo ** Swapping out: ${weapon}
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/if (${Cursor.ID}) {
/echo ** Failed to use existing slot, dropping to inventory!
/autoinv
}
} else {
/echo ** "${weapon}" not found!
}
}
/return
Sub NinjaLoot
|- Ninja the corpse's loot, if applicable
/if (${ninjamode.NotEqual[OFF]}) {
/declare LootTotal int local -1
/declare LootSlot int local
|- Get NPC corpse on target and continue if possible
/squelch /target npc corpse radius ${ninjadist}
/if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) {
/echo ** NPC corpse out of range or already looted!
/return
}
|- Get 5 seconds (max) closer; warning, no detecting being stuck!
/face ${If[${Me.Underwater},,nolook]} fast
/keypress forward hold
/delay 5s ${Target.Distance}<5
/keypress forward
|- Open up the loot window
/loot
/delay 1s
/if (${Me.State.NotEqual[BIND]}) {
/echo ** Massive lag or error getting to corpse. Aborting!
/return
}
/echo ** Looting ${Target.CleanName}
|- Get item count accurately
:LootLag
/if (${LootTotal}!=${Corpse.Items}) {
/varset LootTotal ${Corpse.Items}
/delay 5
/goto :LootLag
}
/if (!${LootTotal}) {
/echo ** Empty corpse!
/goto :DoneLooting
}
|- Loot Loop
/for LootSlot 1 to ${LootTotal}
|- Check for full inventory
/if (!${Me.FreeInventory}) {
/beep
/echo ** INVENTORY FULL !
/varset ninjamode OFF
/echo ** AutoNinja is now OFF!
/goto :DoneLooting
}
|- Loot item if we should, skip it if not
/if (${Corpse.Item[${LootSlot}].ID}) {
/if (!${Corpse.Item[${LootSlot}].NoDrop}) /goto :LootItem
/if (${Corpse.Item[${LootSlot}].NoDrop} && ${ninjamode.Equal[ALL]}) {
/echo ** Looting NODROP Item: ${Corpse.Item[${LootSlot}].Name}
/goto :LootItem
}
}
/echo ** Skipping Item: ${Corpse.Item[${LootSlot}].Name}
/goto :SkipIt
:LootItem
/itemnotify loot${LootSlot} rightmouseup
/delay 3
/if (${Corpse.Item[${LootSlot}].ID}) {
/delay 2
/goto :LootItem
}
:SkipIt
/next LootSlot
/echo ** Done looting ${Target.CleanName}
:DoneLooting
/delay 5
/notify LootWnd DoneButton leftmouseup
/delay 5
}
/return
|---- EVENTS
Sub Event_AttackOn
/varset lastevent Event_AttackOn
/echo Autoattack activated! Target: ${Target.CleanName}
/return
Sub Event_AttackOff
/varset lastevent Event_AttackOff
/echo Autoattack turned off! Target: ${Target.CleanName}
/return
Sub Event_Enraged
/varset lastevent Event_Enraged
/echo Enrage detected! Target: ${Target.CleanName}
/pet back off
/pet hold
/varset isEnraged TRUE
/return
Sub Event_NLEnraged
/varset lastevent Event_NLEnraged
/echo Enrage done! Target: ${Target.CleanName}
/varset isEnraged FALSE
/if (${Target.ID} && ${doAutoassist}) {
/attack on
/if (${Me.Sitting} && ${Me.Combat}) /stand
/pet attack
}
/return
Sub Event_Exp(string Line)
/varset lastevent Event_Exp
|- Ignore leadership experience event triggers (redundant trigger)
/if (${Line.Find[leadership]}) /return
|- Manage aggro control here optionally
/if (${doDynaggro} && ${doAutoassist}) {
/if (${gotHit}) {
|- Got hurt that fight, drop it 1%
/if (${assistpct}>1) /varcalc assistpct ${assistpct}-1
/varset gotHit FALSE
/echo ** Had Aggro! Reducing assist% to ${assistpct}%
} else {
|- Did not get hurt that fight, raise it 1%
/if (${assistpct}<99) /varcalc assistpct ${assistpct}+1
/echo ** No Aggro! Raising assist% to ${assistpct}%
}
}
|- Experience calculation and reporting
/echo ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
|- If target died while enraged, reset it so autoassist isn't broken...
/varset isEnraged FALSE
|- Reset Slow debuff
/varset MobSlowed FALSE
|- Do weapon swapping (back to weapon1), if applicable
/if (${doSwitch} && ${wstype.Equal[Detrimental]}) {
/call Weapon_Swap "${weapon1}" "${weapon2}"
}
/return
Sub Event_Slain
/varset lastevent Event_Slain
/call NinjaLoot
/return
Sub Event_Zoned
/varset lastevent Event_Zoned
/echo ** Zoned... Setting Leash and Autoassist to OFF!
/varset doLeash FALSE
/varset doAutoassist FALSE
/varset MobSlowed FALSE
/ini "BSTSettings.ini" "General" "AutoAssist" "${doAutoassist}"
/ini "BSTSettings.ini" "General" "Leashing" "${doLeash}"
/return
Sub Event_SetStopFighting(string Line)
/varset lastevent Event_SetStopFighting
/if (${Line.Arg[3].Length}) /varset StopFightingHealth ${Line.Arg[3]}
/if ((${StopFightingHealth}<0) || (${StopFightingHealth}>100)) {
/echo Whacko stopfighting percentage input! Defaulting...
}
/echo ** Cease Combat when at: ${StopFightingHealth}% HP
/ini "BSTSettings.ini" "General" "StopFightingHealth" "${StopFightingHealth}"
/return
Sub Event_SetEndFloor(string Line)
/varset lastevent Event_SetEndFLoor
/if (${Line.Arg[3].Length}) /varset MinEndurance ${Line.Arg[3]}
/if ((${MinEndurance}<0) || (${StopFightingHealth}>101)) {
/echo Whacko endurance percentage input! Defaulting...
}
/echo ** Endurance Floor: ${MinEndurance}%
/ini "BSTSettings.ini" "General" "MinEndurance" "${MinEndurance}"
/return
Sub Event_TogStick
/varset lastevent Event_TogStick
/if (${doStick}) {
/varset doStick FALSE
/echo ** Auto-Sticking target is now OFF!
} else {
/varset doStick TRUE
/echo ** Auto-Sticking target is now ON!
}
/ini "BSTSettings.ini" "General" "AutoStick" "${doStick}"
/return
Sub Event_TogLeash(string Line)
/varset lastevent Event_TogLeash
/if (${Line.Arg[3].Equal[OFF]} || (${Int[${Line.Arg[3]}]}<=0)) {
/varset doLeash FALSE
/varset leashholder Nobody
/echo ** Leashing is now OFF!
/ini "BSTSettings.ini" "General" "Leashing" "${doLeash}"
} else {
/if (${Line.Arg[4].Length}) {
/varset leashholder ${Line.Arg[4]}
/if (${Spawn[${leashholder}].ID}) {
/varset doLeash TRUE
/varset leashlength ${Int[${Line.Arg[3]}]}
/echo ** Leashing is now ON! Leashlength: ${leashlength} ft.
/echo ** Leash-holding master is: ${leashholder}
/ini "BSTSettings.ini" "General" "Leashing" "${doLeash}"
} else {
|- This spawn/thing/target doesn't exist
/echo ** Can't find "${leashholder}" -- Who is that?!
/echo ** Leashing is now OFF!
/varset doLeash FALSE
/varset leashholder Nobody
}
} else {
/varset doLeash TRUE
/varset leashholder Nobody
/varset leashlength ${Int[${Line.Arg[3]}]}
/varset stakeX ${Me.X}
/varset stakeY ${Me.Y}
/echo ** Leashing is now ON! Leashlength: ${leashlength} ft.
/echo ** Stake planted at X:${stakeX}, Y:${stakeY}
}
}
/ini "BSTSettings.ini" "General" "LeashHolder" "${leashholder}"
/ini "BSTSettings.ini" "General" "LeashLength" "${leashlength}"
/return
Sub Event_TogAuto(string Line)
/varset lastevent Event_TogAuto
/if (${Line.Arg[3].Equal[OFF]}) {
/varset doAutoassist FALSE
/echo ** Autoassist is now OFF!
} else /if (${Line.Arg[3].Equal[ON]}) {
/varset doAutoassist TRUE
/echo ** Autoassist is now ON!
} else {
/varset doAutoassist TRUE
/if (${Line.Arg[3].Length}) /varset firstassist ${Line.Arg[3]}
/varset mainassist ${firstassist}
/if (${Line.Arg[4]} > 0) /varset assistpct ${Line.Arg[4]}
/echo ** Autoassist is now ON!
/echo ** Assisting: ${mainassist} @${assistpct}% target health
/echo ** SA is ${secondassist} & TA is ${thirdassist}
}
/ini "BSTSettings.ini" "General" "AutoAssist" "${doAutoassist}"
/ini "BSTSettings.ini" "General" "MainAssist" "${firstassist}"
/ini "BSTSettings.ini" "General" "AssistPercentage" "${assistpct}"
/return
Sub Event_TogPause
/varset lastevent Event_TogPause
/beep
/if (${isPaused}) {
/varset isPaused FALSE
/echo ** Beastlord Helper is now RESUMING!
} else {
/varset isPaused TRUE
/echo ** Beastlord Helper is now PAUSED!
}
/return
Sub Event_TogTSwitch
/varset lastevent Event_TogTSwitch
/if (${doTSwitch}) {
/varset doTSwitch FALSE
/echo ** Auto-Target Switching is now OFF!
} else {
/varset doTSwitch TRUE
/echo ** Auto-Target Switching is now ON!
}
/ini "BSTSettings.ini" "General" "TargetSwitching" "${doTSwitch}"
/return
Sub Event_SetCloseness(string Line)
/varset lastevent Event_SetCloseness
/if (${Line.Arg[3].Length}) /varset closeness ${Line.Arg[3]}
/if ((${closeness}<1) || (${closeness}>100)) {
/echo Whacko closeness percentage input! Defaulting...
}
/echo ** AutoStick: ${doStick}, Closeness: ${closeness}
/ini "BSTSettings.ini" "General" "Closeness" "${closeness}"
/return
Sub Event_SetFirstassist(string Line)
/varset lastevent Event_SetFirstassist
/if (${Line.Arg[3].Length}) /varset firstassist ${Line.Arg[3]}
/varset mainassist ${firstassist}
/echo ** Assisting: ${mainassist} @${assistpct}% target health
/echo ** SA is ${secondassist} & TA is ${thirdassist}
/ini "BSTSettings.ini" "General" "MainAssist" "${firstassist}"
/return
Sub Event_SetSecondassist(string Line)
/varset lastevent Event_SetSecondassist
/if (${Line.Arg[3].Length}) /varset secondassist ${Line.Arg[3]}
/echo ** Assisting: ${mainassist} @${assistpct}% target health
/echo ** SA is ${secondassist} & TA is ${thirdassist}
/ini "BSTSettings.ini" "General" "SecondAssist" "${secondassist}"
/return
Sub Event_SetThirdassist(string Line)
/varset lastevent Event_SetThirdassist
/if (${Line.Arg[3].Length}) /varset thirdassist ${Line.Arg[3]}
/echo ** Assisting: ${mainassist} @${assistpct}% target health
/echo ** SA is ${secondassist} & TA is ${thirdassist}
/ini "BSTSettings.ini" "General" "ThirdAssist" "${thirdassist}"
/return
Sub Event_SetAutoNinja(string Line)
/varset lastevent Event_SetAutoNinja
|- Set the new ninja distance, if supplied
/if (${Line.Arg[4].Length}) /varset ninjadist ${Line.Arg[4]}
|- Set the mode, toggle off if unknown
/if (${Line.Arg[3].Equal[ALL]}) {
/varset ninjamode ALL
/echo ** AutoNinja ON - Will loot ALL items
/docommand /lootnodrop never
} else /if ((${Line.Arg[3].Equal[DROP]}) || (${Line.Arg[3].Equal[DROPABLE]})) {
/varset ninjamode DROPABLE
/echo ** AutoNinja ON - Will loot only DROPABLE items
/docommand /lootnodrop never
} else {
/varset ninjamode OFF
/echo ** AutoNinja is now OFF!
}
/echo ** AutoNinja distance is ${ninjadist} ft.
/ini "BSTSettings.ini" "General" "AutoNinjaMode" "${ninjamode}"
/ini "BSTSettings.ini" "General" "AutoNinjaDistance" "${ninjadist}"
/return
Sub Event_SetWeaponSwitch(string Line)
/varset lastevent Event_SetWeaponSwitch
|- Sanity Check
/if (${Line.Arg[3].Equal[OFF]} || !${Line.Arg[5].Length} || ${Line.Arg[6].Length}) {
/varset doSwitch FALSE
/echo ** Auto Weapon Switching is OFF
/goto :SaveSwitchSettings
}
|- Set the weaponswitching information
/if (${Line.Arg[3].Length}) /varset weapon1 ${Line.Arg[3]}
/if (${Line.Arg[4].Length}) /varset switchtext ${Line.Arg[4]}
/if (${Line.Arg[5].Length}) /varset weapon2 ${Line.Arg[5]}
/varset doSwitch TRUE
/echo ** Auto Weapon Switching is ON
/echo ** ${weapon1} will be swapped out for ${weapon2}
/echo ** if the text "${switchtext}" is encountered.
:SaveSwitchSettings
/doevents flush
/ini "BSTSettings.ini" "General" "WeaponSwitching" "${doSwitch}"
/ini "BSTSettings.ini" "Weapons" "Weapon1" "${weapon1}"
/ini "BSTSettings.ini" "Weapons" "Weapon2" "${weapon2}"
/ini "BSTSettings.ini" "Weapons" "SwitchText" "${switchtext}"
/varset wstype ${FindItem[${weapon1}].Spell.SpellType}
/return