Maskoi
old and salty
- Joined
- Sep 28, 2005
- RedCents
- 82,796¢
It uses Boastful Bellow to pull if your bard doesn't have this AA the macro won't work . I am working on adding ranged weapons, AA's and spell support for pulls and hope to have the bugs worked out in a few days. I just haven't decided what route I want to use yet spell_routines, plugins or hard coded into mac.
I yanked out all the of the code that was irrelevant to pulling xp tracking, looting, etc. so it was easier to revise.
I needed more of a pull/assist then pull/tank macro. You can easily set the puller attack at a certain health %. You can make the bard tank by changing the Engage_HPs variable to 100. It will still attack the mob pulled to camp but by setting Engage_HPs to like 95 the puller wont engage until the tank has agro hopefully.
I also added a function that checks healer mana and stops/resumes pulls according to the healers mana % you set. This is for my cleric using healer mac should work with a merc though haven't tested it yet. Healer needs to be in group.
I yanked out all the of the code that was irrelevant to pulling xp tracking, looting, etc. so it was easier to revise.
I needed more of a pull/assist then pull/tank macro. You can easily set the puller attack at a certain health %. You can make the bard tank by changing the Engage_HPs variable to 100. It will still attack the mob pulled to camp but by setting Engage_HPs to like 95 the puller wont engage until the tank has agro hopefully.
I also added a function that checks healer mana and stops/resumes pulls according to the healers mana % you set. This is for my cleric using healer mac should work with a merc though haven't tested it yet. Healer needs to be in group.
| Puller Macro
| Puller.mac
| Ripped yet Again by Emperor
| Author : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| - This macro made for www.NotAddicted.com
| - Don't steal it or we'll punch your fase!
#turbo 40
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
Sub Main
|------------------------------------------------------------
| How far would you like to target a mob?
|------------------------------------------------------------
/declare MaxRadius int outer 300
|------------------------------------------------------------
| How far is the fast movement range?
|------------------------------------------------------------
/declare FastRange int outer 15
|------------------------------------------------------------
| How far is the maximum combat range?
|------------------------------------------------------------
/declare RangeMax int outer 7
|------------------------------------------------------------
| How far is the minimum combat range?
|------------------------------------------------------------
/declare RangeMin int outer 8
|------------------------------------------------------------
| What is the minimum Z Value of mobs I should target?
|------------------------------------------------------------
/declare MinZRange int outer -500
|------------------------------------------------------------
| What is the maximum Z Value of mobs I should target?
|------------------------------------------------------------
/declare MaxZRange int outer 500
|------------------------------------------------------------
| Group Healer Name, Mana check to stop and resume pulling
|------------------------------------------------------------
/declare Healer_Check_Use int outer 1
/declare Healer_Name string outer HealerNameHere
/declare Healer_Mana_Pause int outer 20
/declare Healer_Mana_Resume int outer 90
|------------------------------------------------------------
| Attack mob after returning to camp Hps % and distance
|------------------------------------------------------------
/declare Engage_HPs int outer 95
/declare Engage_Distance int outer 50
|------------------------------------------------------------
| Variables that you don't need to worry about.
|------------------------------------------------------------
/declare MyTargetID int outer 0
/declare MyTargetName string outer
/declare MyTargetDead int outer 0
/declare HasTarget int outer 0
/declare RandomWait int outer 0
/declare LootSlot int outer 0
/declare CheckLook int outer 0
/declare Fighting int outer 0
/declare TargetDead int outer 0
/declare MyXLOC int outer 0
/declare MyYLOC int outer 0
/declare ObstacleCount int outer 0
/declare hitcount int outer 0
/declare healcheck int outer 0
/declare RT_MyXLOC int outer ${Me.X}
/declare RT_MyyLOC int outer ${Me.Y}
/declare MinRadius int outer 50
/declare i int outer
/declare target_checked int outer
/declare waiting_spam int outer 1
:Start
/doevents
/if (${Healer_Check_Use}) /call Check_Healer_Mana
/call GetTarget
/if (${HasTarget}) /call Pull
/if (${HasTarget}) /call CombatSub
/call ResetSub
/call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
/goto :Start
/return
|--------------------------------------------------------------------------------
| SUB: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
/doevents
/declare CurrentRadius int local
/declare TargetSub int local
/echo Looking for Close Range Mobs
:Acquire
/doevents
/for CurrentRadius ${Min_Radius} to ${MaxRadius} step 5
/squelch /target radius ${CurrentRadius} npc
/varset MyTargetID ${Target.ID}
/varset MyTargetDead 0
/if (${Target.ID}) {
/call Check_Target
/if (!${target_checked}) {
/call ResetSub
/goto :Acquire
}
/varset HasTarget 1
/varset MyTargetName ${Target.Name}
/echo Acquired ${Spawn[${MyTargetName}].CleanName} at range ${Int[${Target.Distance}]}
/return
}
| Reset search radius if it gets larger that MaxRadius
/if (${Min_Radius}>=${MaxRadius}) {
/varset MinRadius 50
}
/next CurrentRadius
/goto :Acquire
/return
|--------------------------------------------------------------------------------
| SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
/doevents
/echo Pulling Mob
/declare TargDist float local
:PullLoop
/doevents
/call MoveToMob_Pull
/if (!${Target.ID}) /return
/face fast
/if (${Target.PctHPs}==100) /goto :PullLoop
/if (${Target.PctHPs}<21) /return
/call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
/if (!${Target.ID}) /return
/face fast
:Engage
/varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
/if (${TargDist}<${Engage_Distance} && ${Target.PctHPs}<${Engage_HPs}) /return
/delay 1s
/goto :Engage
/return
|--------------------------------------------------------------------------------
| SUB: MovetoMob_Pull
|--------------------------------------------------------------------------------
Sub MoveToMob_Pull
/doevents
/varset MyXLOC ${Int[${Me.X}]}
/varset MyYLOC ${Int[${Me.Y}]}
/varset ObstacleCount 0
:MovementLoop
/doevents
/if (!${Target.ID}) /return
/face fast
/varcalc ObstacleCount ${ObstacleCount}+1
/if (${Int[${Target.Distance}]}>150) /keypress forward hold
/if (${Int[${Target.Distance}]}<150) /keypress back
/if (${ObstacleCount}>=15) {
/call CheckObstacle
/goto :Movementloop
}
/if (${Me.AltAbilityReady[Boastful Bellow]}) /alt act 199
/return
|--------------------------------------------------------------------------------
| SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
/doevents
/varset MyXLOC ${Int[${Me.X}]}
/varset MyYLOC ${Int[${Me.Y}]}
/varset ObstacleCount 0
:MovementLoop
/doevents
/if (!${Target.ID}) /return
/face fast
/varcalc ObstacleCount ${ObstacleCount}+1
/if (${Int[${Target.Distance}]}>${FastRange}) /keypress forward hold
/if (${Int[${Target.Distance}]}<${FastRange}&&${Int[${Target.Distance}]}>${RangeMax}) /keypress forward
/if (${Int[${Target.Distance}]}<${RangeMin}) /keypress back
/if (${ObstacleCount}>=15) {
/call CheckObstacle
/goto :Movementloop
}
/if (${Int[${Target.Distance}]}>${FastRange}) /goto :MovementLoop
/return
|--------------------------------------------------------------------------------
| SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
/doevents
/declare running int local
/declare distanceNow float local
/declare distanceBefore float local
/declare distanceModifier int local
/declare distanceTimer timer 15
/varset running 0
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceModifier 1
/echo Moving to Location: ${MoveToY}, ${MoveToX}.
/echo Distance: ${distanceBefore}
:moveToLocation
/doevents
/face fast nolook loc ${MoveToY},${MoveToX}
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
/keypress forward
/return
}
/if (${distanceTimer}==0) {
/if (${Me.Sneaking}) {
/varset distanceModifier 2
} else {
/varset distanceModifier 1
}
/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
/call HitObstacle
}
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceTimer 15
}
/if (${running}==0) {
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
/varset running 1
/keypress forward hold
}
} else {
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
/varset running 0
/keypress forward
}
}
/goto :moveToLocation
/return
|--------------------------------------------------------------------------------
| SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
/doevents
/if ((${MyXLOC}==${Int[${Me.X}]})&&(${MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
/varset MyXLOC ${Int[${Me.X}]}
/varset MyYLOC ${Int[${Me.Y}]}
/varset ObstacleCount 0
/return
|--------------------------------------------------------------------------------
| SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
/echo Obstacle hit, moving around it...
/keypress forward
/keypress back hold
/delay 3
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 5
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/return
|--------------------------------------------------------------------------------
| SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
/doevents
/varset Fighting 1
/varset TargetDead 0
/echo Attacking Mob NOW!
:CombatLoop
/if (!${Me.Combat}) /attack on
/if (!${Target.ID}) /return
/call MoveToMob
/if (!${TargetDead}) /goto :CombatLoop
/doevents
/return
|--------------------------------------------------------------------------------
| SUB: Slain
|--------------------------------------------------------------------------------
Sub Event_Slain
/varset TargetDead 1
/varset Fighting 0
/attack off
/squelch /target clear
/keypress forward
/keypress back
/return
|--------------------------------------------------------------------------------
| SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
/echo Zoned
/delay 60s
/quit
/endmacro
|--------------------------------------------------------------------------------
| SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
/doevents
/varset HasTarget 0
/varset TargetDead 0
/varset Fighting 0
/squelch /target clear
/delay 1s
/return
|----------------------------------------------------------------------------
| SUB: Check Target
|----------------------------------------------------------------------------
Sub Check_Target
/varset target_checked 0
/if (!${Target.ID}) /return
/if (${Int[${Target.Z}]}>${MaxZRange} || ${Int[${Target.Z}]}<${MinZRange} || !${Target.LineOfSight}) /return
/if (${Select[${Target.Type},PC,CORPSE,CHEST,TRIGGER,TRAP,TIMER,ITEM,MOUNT,Mercenary]}) /return
/varset target_checked 1
/return
|--------------------------------------------------------------------------------
| SUB: Check_Healer_Mana
|--------------------------------------------------------------------------------
Sub Check_Healer_Mana
/if (${Group.Member[${Group.Member[${Healer_Name}]}].PctMana}>${Healer_Mana_Pause}) /return
:wait_for_healer
/if (${waiting_spam}) {
/echo Waiting for healer to med up. ${Healer_Name} has ${Group.Member[${Group.Member[${Healer_Name}]}].PctMana}% mana
/varset waiting_spam 0
/timed 600 /varset waiting_spam 1
}
/if (${Group.Member[${Group.Member[${Healer_Name}]}].PctMana}<${Healer_Mana_Resume}) /goto :wait_for_healer
/return

