looking for a very simple ranger macro plese

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

p00pey
orc pawn
orc pawn
Posts: 15
Joined: Wed Apr 21, 2004 12:39 pm

looking for a very simple ranger macro plese

Post by p00pey » Thu Jul 01, 2004 6:57 am

Hi I am looking for a macro just for auto fire and thats all I need. If anyone could help me I would like that alot.

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Thu Jul 01, 2004 6:44 pm

Just wrote this, but havent tested it.. It may or may not work, but will try to test it tomorrow, dont have time to start up EQ atm, sorry.

Edit the ARCHBUTTON declare to whatever your archery button is defined as.

Code: Select all

|archery.mac 

/declare ARCHBUTTON outer
/varset ARCHBUTTON F12

sub main 
/echo "Autoarchery activated"
  :loop 
  /if (${String[${Target.Type}].Equal[NPC]}) { 
    /if (!${Me.Combat}) { 
      /if (!${Me.Casting.ID}) { 
        /if (${Target.PctHPs}<=97) { 
          /keypress ARCHBUTTON 
        }
      }
    }
  } 
  /delay 2 
  /goto :loop 
/return
Edit: I know its very ugly with 4 IFs like that, but too tired to care atm.

p00pey
orc pawn
orc pawn
Posts: 15
Joined: Wed Apr 21, 2004 12:39 pm

Post by p00pey » Fri Jul 02, 2004 2:31 am

arrows.mac@12 (main):/keypress ARCHBUTTON

red text under that says Invalid mappable command or keycombo arch button

p00pey
orc pawn
orc pawn
Posts: 15
Joined: Wed Apr 21, 2004 12:39 pm

Post by p00pey » Fri Jul 02, 2004 2:34 am

now when I try to start it again it the current macro has ended
auto archery activated

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Fri Jul 02, 2004 3:33 am

Just try:

Code: Select all

|archery.mac 

sub main 
/echo "Autoarchery activated" 
  :loop 
  /if (${String[${Target.Type}].Equal[NPC]}) { 
    /if (!${Me.Combat}) { 
      /if (!${Me.Casting.ID}) { 
        /if (${Target.PctHPs}<=97) { 
          /ranged 
        } 
      } 
    } 
  } 
  /delay 2 
  /goto :loop 
/return
I guess one could toss in a ${Me.RangedReady} verification instead of the delay thou.. /shrug

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Fri Jul 02, 2004 3:36 am

Oh, not sure what you really wanted btw, but this macro should shoot arrows at any NPC you target that has less then 97% health.

No buttons needed to press or anything.

If you cast a spell or turn on melee attack, it should not try to shoot any arrows..

p00pey
orc pawn
orc pawn
Posts: 15
Joined: Wed Apr 21, 2004 12:39 pm

Post by p00pey » Fri Jul 02, 2004 7:56 am

sir you own thanks alot last one works good

Zarlok
decaying skeleton
decaying skeleton
Posts: 2
Joined: Fri Mar 26, 2004 3:26 pm

Post by Zarlok » Tue Jul 13, 2004 2:00 am

you should add in a line to use hotkey x also... to assist whomever. Friend did this at a tables group the other day worked great with the autofire macro with auto assist also.

boomer
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sun Nov 14, 2004 4:51 am

Post by boomer » Sun Nov 14, 2004 4:58 am

new at all this stuff guys, so be easy...

this is perfect for what i was lookin for. All i wanted was a ranged fight from my ranger bot. Would be nice if somebody could add in the necessary code to be able to set an autoassist to the tank and then repost...

thanks

User avatar
fice
a hill giant
a hill giant
Posts: 187
Joined: Thu Jul 17, 2003 3:28 pm

Post by fice » Sun Nov 14, 2004 8:12 am

can't test this cause i don't play a ranger, but it should work i think!

Code: Select all

|archery.mac
|Usage: /mac archery.mac <tank name>
|Example: /mac archery.mac Grimpy

sub main
/declare assist string outer
/varset assist ${Param0}
/echo "Autoarchery activated"
:loop
	/assist ${assist}
	/delay 5
	/if (!${Target.ID} || !${Target.Type.Equal["NPC"]} || ${Target.PctHPs}>97) /goto :loop
:attack
/if (${Target.Type.Equal["NPC"]} && ${Target.PctHPs}<=97 && ${Target.Distance.Int}<=100) {
	/if (!${Me.Combat} && !${Me.Casting.ID} && ${Me.RangedReady}) {
		/face fast
		/ranged
	}
	/delay 1
	/goto :attack
}
/delay 1
/goto :loop 
Last edited by fice on Sat Nov 27, 2004 12:40 am, edited 1 time in total.

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Mon Nov 15, 2004 10:42 am