new macro

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Lord Deadman
decaying skeleton
decaying skeleton
Posts: 2
Joined: Fri Mar 05, 2004 5:48 am
Location: Death Valley

new macro

Post by Lord Deadman » Fri Mar 05, 2004 6:17 am

I am new to this site and trying to absorb as much information as i can, and hopefully i can contribute soon.

I am currently using a macro that allows me to autofire, but the problem i am running into is this...

1) when the mob gets to close i can not use my bow, is there any way to write in to switch to mellee wepaon?

2) When the mob moves slightly around a corner i can not see it, thus cant shoot arrows, any way to write that in, where i follow the mob a bit enuf to still target and shoot him?

3) If i was boxing myself with another account, how would i write an auto follow on a person, along with assisting him on the mob.

I am basically trying to design a very basic macro that does this... shoot arrows, and meelee if mob gets close... and follow someone so i can assist.

This macro was takin off the site here with a few changes, but i think its about 75% more than what i need.

I appreciate any help you can give me here is the macro i am currently using.



Usage: /mac Rangah <TankName>


**|


|Events
#Event Resist "Your spell fizzles!"
#Event Resist "Your target resisted"
#Event MoveFaded "The avian spirit departs."
#Event MoveFaded "You return to your true form."
#Event MoveFaded "The spirit of wolf leaves you."
#Event MoveFaded "The spirit of the shrew leaves you."
#Event MoveFaded "You are no longer a wolf."
#Event EyeFaded "The avian presence departs."


#turbo 400

Sub Main

/echo

/if $defined(Param0)==FALSE {
/echo Usage: /macro rangah <TankName>
/endmacro
}
|Declarations
/declare EngageRange global
/declare TankName global
/declare ArcheryKey global
/declare EngagePct global
/declare SnarePct global
/declare SnareSpell global
/declare EyeSpell global
/declare LastCast global
/declare MovementSpell global

|Defines
/varset TankName @Param0
/varset ArcheryKey 6 |Mod this to suit your Archery Button
/varset EngageRange 300 |Mod this to set the range at which you engage the Mob
/varset EngagePct 99 |Mod this to set the percentage of life the mob should have when you begin your attack.
/varset SnareSpell "lsnare" |Mod this to set the spell you wish to use to snare
/varset SnarePct 50 |Mod this to set the percentage at which you wish to snare
/varset EyeSpell "falcon eye" |Mod this to set which Archery Improving spell youd like to use
/varset MovementSpell "Greater Wolf Form" |Mod this to specify a Movement increaseing spell
/varset LastCast NULL




|Main Loop
:MainLoop
/call Kill
/delay 1
/goto :MainLoop
/endmacro


Sub Kill
/assist @TankName
/if "$combat"~~"TRUE" /attack off
/if "$target(type)"=="NPC" {
/if n "$target(hp,pct)"<="@EngagePct" {
/if n "$target(distance)"<="@EngageRange" {
/goto :KillLoop
}
}
}
/return

:KillLoop
/face
/doevents
/if "$target(type)"=="NPC" {
/if n "$target(hp,pct)"<="@EngagePct" {
/if n "$target(distance)"<="@EngageRange" {
/press @ArcheryKey
/if n "$target(hp,pct)"<="@SnarePct" {
/if "@MobSnared"!="TRUE" {
/varset LastCast @SnareSpell
/cast @SnareSpell
}
}
/goto :KillLoop
}
/return
}
/return
}
/return

Sub Event_Resist
/cast @LastCast
/varset LastCast @LastCast
/return

Sub Event_MoveFaded
/target id $char(id)
/cast @MovementSpell
/varset LastCast @MovementSpell
/return

Sub Event_EyeFaded
/target id $char(id)
/cast @EyeSpell
/varset LastCast @EyeSpell
/return

3x
orc pawn
orc pawn
Posts: 20
Joined: Sun Jan 25, 2004 12:54 am

Post by 3x » Fri Mar 05, 2004 6:33 am

Use the [code][/code] tags.

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Mar 05, 2004 7:21 am

Few things. Code brackets help.

Also, if you read posts and use the Search link above, you'll find that a few ranger macs are already done and made. Also Hunter.mac, Genbot.mac ... lots of things are already premade. Try looking at the "Macro Depot"..

Sorry if I seem annoyed, but this is getting to the point where every idiot user posts before looking. I understand you're trying to learn, which is why I'm not giving you TOO hard of a time. ;-)

Also http://macroquest2.com/main.php?p=manual ... is a good reference.

Just look around and poke the other forums a little for a good start or a macro you need but don't need to make.

That's about as nice as it gets here.

:twisted:
-Elric

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Fri Mar 05, 2004 2:05 pm

1) Event for "too close"

2) Event for "can not see your target", and a movement routine. Try strafing.

3) Look at other macros and see how they address auto following and assisting. Those are very, very basic things.

You can solve all this yourself by reading up on #Event.

Lord Deadman
decaying skeleton
decaying skeleton
Posts: 2
Joined: Fri Mar 05, 2004 5:48 am
Location: Death Valley

Post by Lord Deadman » Sat Mar 06, 2004 12:18 am

Awesome thank you very much, i had originally looked throughout alot of "ranger" macros, but each time i tried to use them, it came up with alot of things i either didnt have "AA's" or spells that were higher level than me, spamming my text screen.

I have eliminated alot of the lines that i did not need, and i appreciate all the help everyone has given me. i will keep researching the different formula's and hopefully be able to design a great one that everyone could use.

Thank you.