Have a macro idea but not sure where to start? Ask here.
Moderator: MacroQuest Developers
-
metsu
- decaying skeleton

- Posts: 2
- Joined: Sat Apr 05, 2008 4:59 am
Post
by metsu » Mon Jan 03, 2011 9:46 am
can anyone link or write a simple auto atk mac ?
basically i train the zone with mobs and kill them all at a certain spot, and when i turn the mac on, it will,
auto target mob, atk on, rinse and repeat till all the mobs died. dont need delays in between, need fast kills.
thanks a lot for the help
-
grumpyogre
- a ghoul

- Posts: 142
- Joined: Fri Jul 07, 2006 7:18 am
Post
by grumpyogre » Thu Feb 03, 2011 10:49 am
this has been written many times. pay the ten or fifteen bucks, more than worth it for access to an amazing bunch of macros.
-
rencro
- Custom Builder

- Posts: 56
- Joined: Sat Sep 27, 2003 12:39 am
Post
by rencro » Thu Jun 09, 2011 3:36 am
Here you go.. This is a hacked up hunter mod, so credits to all the previuos hunter mac writers.
Code: Select all
Sub Main
/declare RV_FailCounter int outer 0
/declare RV_MyTargetID int outer 0
/declare RV_MyTargetName string outer
/declare RV_MyTargetDead int outer 0
/declare RV_InvalidTargetID int outer 0
/declare RV_HasTarget int outer 0
/declare RV_Fighting int outer 0
/declare RV_TargetDead int outer 0
/declare cnt int outer 0
/keypress esc
| /melee melee=on
:Start
| /doevents
| /call GMCheck
/if (!${SpawnCount[npc radius 50]}) {
/call EndSub
}
/call GetTarget
:KillAdds
/if (${RV_HasTarget}) /call CombatSub
/call ResetSub
| /varset RV_RandomWait ${Math.Rand[5]}
| /varcalc RV_RandomWait ${RV_RandomWait}+1
| /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming
| /delay ${RV_RandomWait}s
/if (${Target.ID}) {
/echo Looks like something is attacking us, killing it...
/delay 1s
/attack on
/varset RV_HasTarget 1
/varset RV_Fighting 1
/goto :KillAdds
}
/goto :Start
/return
|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub GetTarget
/declare RV_TargetSub int local
:Acquire
/for RV_TargetSub 1 to ${RV_MobArray.Size}
/if (!${Target.ID} || ${Target.Type.Equal[PC]} || ${Target.Type.Equal[CORPSE]}) {
| /target radius 50 notid ${RV_InvalidTargetID} npc "${RV_MobArray[${RV_TargetSub}]}"
/target radius 30 npc
/varset RV_MyTargetID ${Target.ID}
/varset RV_MyTargetDead 0
}
/if (${Target.ID}) {
/varset RV_HasTarget 1
/varset RV_MyTargetName ${Target.CleanName}
/echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
/varcalc cnt ${cnt}+1
/return
}
/if (!${Target.ID}) {
/delay 2s
/varcalc RV_FailCounter ${RV_FailCounter}+1
/echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
/if (${RV_FailCounter}>=${RV_FailMax}) {
/echo Waiting for Respawns, Resetting Failure Counter...
}
/goto :Acquire
}
/return
|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
/echo Attacking Mob NOW!
/varset RV_Fighting 1
/varset RV_TargetDead 0
/attack on
:CombatLoop
| /doevents
| /call MoveToMob
| /call SpecialIT
/if (!${Target.ID}) {
/attack off
| /pet back
/keypress forward
/keypress back
/varset RV_TargetDead 1
/varset RV_Fighting 0
| /delay 1s
| /target radius 100 corpse
/delay 1s
/if (!${Target.ID}) {
/call ResetSub
/return
}
/face fast
}
/if (!${RV_TargetDead}) {
/goto :CombatLoop
}
/return
|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
/keypress esc
/keypress esc
/keypress esc
/keypress esc
/varset RV_HasTarget 0
/varset RV_TargetDead 0
/varset RV_Fighting 0
/return
Sub Endsub
/if (${cnt}>=1) {
/echo Done with Train
/echo ${cnt} mobs trained..
| /melee melee=off
/endmacro
}
/echo No Mobs in Range, Wait until mobs are on top of you before using...
| /melee melee=off
/endmacro
/return