autofire macro

liaohowie

New member
Joined
Mar 3, 2009
Messages
27
Reaction score
0
Points
0
AUTOFIRE 1.0 BY LIAOHOWIE

HELLO ALL,
I SHARE MY AUTOFIRE MICRO TO ALL.
AUTOFIRE 1.0 BY LIAOHOWIE 2009.07.23
FUNCTION:
1. AUTO ASSIST TARGET AND THEN AUTOFIRE( /mac autofire MA_name )
2. AUTO DD WHEN MOB 60%HP
3. AUTO SNARE

PLS POST HERE IF U WANT TO INCREASE ANY FUNTION.


| * autofire.mac
| * Version 1.0 by liaohowie
| *
| * This macro automates your ranger in a very simple way. It assist the group MT and autofire and snare.
| *
| * Usage: /macro autofire MA

| * V1.0
| * This version is the Assist Code (GetTarget, CheckTarget) and autofire


#turbo
#include spell_routines.inc


Sub Main
/if (!${Defined[Param0]}) {
/echo Usage /macro autofire MA_NAME
/endmac
}

/declare MA string outer ${Param0}
/declare MyTargetID int outer 0


/echo -------------------------------------------
/echo autofire v1.0-
/echo -------------------------------------------
/echo Assisting: ${MA}
/echo -------------------------------------------

:Main_Loop
/call Get_Target
/call AutoFire

:Combat_Loop
/doevents
/call Snare_Check
/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}
/goto :Combat_Loop
/return



| * --------------------------------- SUBS ---------------------------------------------------

Sub Get_Target
/if (${Me.Casting.ID}) /return
/if (${Me.Moving}) /return

:Acquire_Target
|* If the MA is within a 100 radius then go ahead and assist, and slow if his target is a mob <100% hp.
/if (${Spawn[${MA} radius 100].ID}) {
/squelch /target clear
/assist ${MA}
/delay 1s ${Target.ID}

/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/delay 3s
/goto :Acquire_Target
/return
}

/if ((${Spawn[${Target.ID}].Type.Equal[npc]} || ( ${Spawn[${Target.ID}].Type.Equal[pet]} && !${Spawn[${Target.ID}].Master.Type.Equal[pc]}))) {
/if (${MyTargetID} != ${Target.ID}) {
/face
/echo New Target: ${Target.Level} ${Target.Class} ${Target.CleanName} ${Target.ID}
/varset MyTargetID ${Target.ID}
/delay 5s ${Target.Distance} <= 200
}
}
}
/return




Sub AutoFire
| * Make sure you have the target <100 % before you autofire.
/delay 20s (${Target.PctHPs}<=99 && ${Target.Distance} < 200 && ${Target.Distance} > 30)
/autofire TRUE
/echo AutoFire --( ${Target.CleanName} )--
/g AutoFire on << %t >>~~!!
/return

Sub Snare_Check
|* This one to snare the mob plan to run .
/if (!${Target.Buff[Entrap].ID} && ${Target.PctHPs}<40 && ${Target.Type.Equal[NPC]} && ${Me.AltAbilityReady[Entrap]}) {
/echo Snare --( ${Target.CleanName} )--
/call cast "Entrap" alt
}
/return

Sub DD_Check
|* This one to snare the mob plan to run .
/if (!${Target.Buff[Summer's Mist].ID} && ${Target.PctHPs}<60 && ${Target.Type.Equal[NPC]} && ${Me.SpellReady[Summer's Mist]}) {
/echo DD --( ${Target.CleanName} )--
/call cast "Summer's Mist" gem3 5s
}
/return
 

Attachments

  • autofire.mac
    2.7 KB · Views: 53
Last edited by a moderator:
I'm looking at this from my iPhone. But from first glance I didn't see anything wrong with it. I'll give it a whirl when I get home from work. Would be cool for a leveling thing I'm currently doing :)
 
first problem i see is in your get target sub. If you are casting or moving it returns back to main, then goes right into autofire sub even though you don't have a target. I would add this line after the get target sub to make sure you have a target before moving on.

/if (!${Me.Target.ID}) /goto :Main_Loop

i see some other issues but am really busy at work right now. if nobody else has helped you by this afternoon i'll give some more ideas.
 
This spams the group message and spams auto fire on / auto fire off non stop.

Edit: NM, but it doesn't face the target. How can I edit this so it auto faces the assisted target constantly?
 
Last edited:
There is already a "/face" line in there, you can change that to a "/Face fast" line if your not to worried about people wondering how you change direction so fast.

Code:
|---------------------------------------------------------------------------------------------------------
| * autofire.mac
| * Version 1.0 by liaohowie
| *
| * This macro automates your ranger in a very simple way. It assist the group MT and autofire and snare.
| *
| * Usage: /macro autofire MA
|
| * V1.0
| * This version is the Assist Code (GetTarget, CheckTarget) and autofire
|---------------------------------------------------------------------------------------------------------

#turbo
#include spell_routines.inc


Sub Main
/if (!${Defined[Param0]}) {
/echo Usage /macro autofire MA_NAME
/endmac
}

/declare MA string outer ${Param0}
/declare MyTargetID int outer 0


/echo -------------------------------------------
/echo autofire v1.0-
/echo -------------------------------------------
/echo Assisting: ${MA}
/echo -------------------------------------------

:Main_Loop
/call Get_Target
/call AutoFire

:Combat_Loop
/doevents
/call Snare_Check
/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}
/goto :Combat_Loop
/return



| * --------------------------------- SUBS ---------------------------------------------------

Sub Get_Target
/if (${Me.Casting.ID}) /return
/if (${Me.Moving}) /return

:Acquire_Target
|* If the MA is within a 100 radius then go ahead and assist, and slow if his target is a mob <100% hp.
/if (${Spawn[${MA} radius 100].ID}) {
/squelch /target clear
/assist ${MA}
/delay 1s ${Target.ID}

/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/delay 3s
/goto :Acquire_Target
/return
}

/if ((${Spawn[${Target.ID}].Type.Equal[npc]} || ( ${Spawn[${Target.ID}].Type.Equal[pet]} && !${Spawn[${Target.ID}].Master.Type.Equal[pc]}))) {
/if (${MyTargetID} != ${Target.ID}) {
[COLOR="Red"]/face[/COLOR]
/echo New Target: ${Target.Level} ${Target.Class} ${Target.CleanName} ${Target.ID}
/varset MyTargetID ${Target.ID}
/delay 5s ${Target.Distance} <= 200
}
}
}
/return




Sub AutoFire
| * Make sure you have the target <100 % before you autofire.
      /delay 20s 
    [COLOR="Red"]  /if[/COLOR] (${Target.PctHPs}<=99 && ${Target.Distance} < 200 &&      ${Target.Distance} > 30) [COLOR="Red"]{[/COLOR]
     [COLOR="Red"] /squelch /autofire [/COLOR]
      /echo AutoFire --( ${Target.CleanName} )--
      /g AutoFire on << %t >>~~!!
  [COLOR="Red"] }[/COLOR]
/return

Sub Snare_Check
|* This one to snare the mob plan to run .
/if (!${Target.Buff[Entrap].ID} && ${Target.PctHPs}<40 && ${Target.Type.Equal[NPC]} && ${Me.AltAbilityReady[Entrap]}) {
/echo Snare --( ${Target.CleanName} )--
/call cast "Entrap" alt
}
/return

Sub DD_Check
|* This one to snare the mob plan to run .
/if (!${Target.Buff[Summer's Mist].ID} && ${Target.PctHPs}<60 && ${Target.Type.Equal[NPC]} && ${Me.SpellReady[Summer's Mist]}) {
/echo DD --( ${Target.CleanName} )--
/call cast "Summer's Mist" gem3 5s
}
/return
 
Last edited:
Correct me if im wrong , but this looks like it will DD and snare a mob when you dont even have a target...
 
No, because the Snare and DD subs both check for a target. the mainloop aquires target and then does autofire, the combat sub does snare, DD and target check again.
 
Last edited:
Where does it check for a target? It checks to see if it has the snare on it , but doesnt actually check there is a target. Either that or im missing it in the spam
 
Code:
 Sub Snare_Check
|* This one to snare the mob plan to run .
/if (!${Target.Buff[Entrap].ID} && [COLOR="Red"]${Target.PctHPs}<40[/COLOR] && [COLOR="Red"]${Target.Type.Equal[NPC]}[/COLOR] && ${Me.AltAbilityReady[Entrap]}) {
/echo Snare --( ${Target.CleanName} )--
/call cast "Entrap" alt
}
/return

Those in red will FAIL if their is not a target. Im not to sure about the first expression, since its making sure it cannot find the Snare spell, so that might be true without a target still. I havent had a chance to test this properly, but i got some shit to do at the moment, When im back from town, i'll grab a friend and go check this out properly :)
 
I think that will just throw up "Cannot Parse" errors , but without sitting in front of EQ i cant tell.
 
Correct me if im wrong , but this looks like it will DD and snare a mob when you dont even have a target...


How can u Dd and snare "a mob " if u dont have a target ........

u need to have leadaa( check npc buff) for snare check .
if u dont have leadaa( check npc buff) u will non-stop snare. because !${Target.Buff[Entrap].ID}
 
information: if u dont need snare and dd.
u can edit here to make those funtion off:

:Combat_Loop
/doevents
|/call Snare_Check
|/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}
/goto :Combat_Loop
/return
 
Where does it check for a target? It checks to see if it has the snare on it , but doesnt actually check there is a target. Either that or im missing it in the spam

the yellow line will check u have a npc target or not.so u dont need to have a target check in sub snare_check and sub dd_check

:Combat_Loop
/doevents
/call Snare_Check
/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}

/goto :Combat_Loop
/return
 
This spams the group message and spams auto fire on / auto fire off non stop.

Edit: NM, but it doesn't face the target. How can I edit this so it auto faces the assisted target constantly?

it has a /face already.

it will be better if u pull mob in front of your ranger.
 
the yellow line will check u have a npc target or not.so u dont need to have a target check in sub snare_check and sub dd_check

:Combat_Loop
/doevents
/call Snare_Check
/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}

/goto :Combat_Loop
/return

But that doesnt happen until after you have called the DD and snare subs
 
But that doesnt happen until after you have called the DD and snare subs

Sub Get_Target
/if (${Me.Casting.ID}) /return
/if (${Me.Moving}) /return

:Acquire_Target
|* If the MA is within a 100 radius then go ahead and assist, and slow if his target is a mob <100% hp.
/if (${Spawn[${MA} radius 100].ID}) {
/squelch /target clear
/assist ${MA}
/delay 1s ${Target.ID}

/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/delay 3s
/goto :Acquire_Target
/return
}

/if ((${Spawn[${Target.ID}].Type.Equal[npc]} || ( ${Spawn[${Target.ID}].Type.Equal[pet]} && !${Spawn[${Target.ID}].Master.Type.Equal[pc]}))) {
/if (${MyTargetID} != ${Target.ID}) {
/face
/echo New Target: ${Target.Level} ${Target.Class} ${Target.CleanName} ${Target.ID}
/varset MyTargetID ${Target.ID}
/delay 5s ${Target.Distance} <= 200
}
}
}
/return

this micro will do below funtion.
:Main_Loop
/call Get_Target
/call AutoFire

:Combat_Loop
/doevents
/call Snare_Check
/call DD_Check
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) {
/goto :Main_Loop
}
/goto :Combat_Loop
/return

it's meaning , u won't autofire if u dont have target .
u will autofire target and go to combat loop untill him die if u have a "Npc taregt".


pls "dont control" ur ranger if ur ranger is running macro.u will break the loop if u control it.
u need to restart the macro if u break the loop.