Archery Macro Improvements

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Gellenole's Ghost

Archery Macro Improvements

Post by Gellenole's Ghost » Mon Nov 03, 2003 2:57 pm

Gellenole here... toolazy to set in... new macro for autofire in archery for the new release of MQ... btw need some help still on some new features... like auto renewing spells. any help will be appreciated.

basically I need help on the /doevents area... I would cast spells when the spell autofades, but right now I can't get that feature to work or even check... so if you guys can help that would be great!

Code: Select all

|Archery Macro v. 1.0d
|Archery Assist Macro.
|Gellenole's Autofire Archery Macro
|
|HISTORY
|Version 1.0d
|	- Macro will keep running.
|	- Macro Contains enough info in sub routines to identify NPC from PC
|	- Macro also is used to assist the main assist(restart macro to readjust tank)
|	- Macro Contains checks for SoE + Eagle Eye.  Will recast if faded.
|Version 1.0c
|	- Fixed the macro to end when the mob dies. (Turn off macro to stop)
|Version 1.0b
|	- Fixed having the user to fire 1st arrow for macro to run
|	- Still need to fix how to turn it off once mob is dead
|Version 1.0a
|	- Need user intervention to Fire 1st arrow for the macro to work
|	- Need user intervention to turn off the macro even after mob is dead
|
|	Usage:  /Macro Archery <tank name>

#Event Eagleeye "The avian presence departs."
#Event Spiritof "The avian spirit departs."
#Event Slainby  "You have been slain by"

#turbo infinite

Sub Main
	/ECHO  =+= Gellenole's Autofire Macro Enabled =+=
	/ECHO  =+= Usage:  /Macro Archery <Tank name> =+=
	/declare Fightswitch global
	/declare tankname global
	/declare CastTimer timer
	/varset tankname @Param0
	:Mainloop 
	/call Fightswitch
	/doevents
	/goto :mainloop 
	/return

| --> This subset is a switch to check for mob target
Sub Fightswitch
/Echo Main Tank for today is @tankname 
:stopfiring
	/assist @tankname
	/delay 5
	/if "$target(type)"=="NPC" { 
		/Echo Autofire Engaged
		/call Arrow
	}
	
	/if "$target(type)"!="NPC" {
		/delay 10
		/goto :stopfiring
	}

	/if "$target()"=="FALSE" {
		/delay 10
		/goto :stopfiring
	} 
/return 

| --> Loop for arrows
Sub Arrow 
:arrowloop 
	/if "$target()"=="TRUE" { 
		/face fast
		/if n $target(distance)>130 /sendkey down up
		/if n $target(distance)<100 /sendkey down down
		/if n $target(distance)<120 /sendkey up up
		/if n $target(distance)<90 /sendkey up down
		/delay 3 
		/press 2		|Change arrow button to your own
	}
	
	/if "$target(type)"!="NPC" {
		/delay 10
		/call Fightswitch
	}

	/if "$target()"=="FALSE" {
		/delay 10
		/call Fightswitch
	}
	/goto :arrowloop
/return

|-->Events that are performed automatically<--

Sub Event_Eagleeye
	/cast 4
/return

Sub Event_Spiritof
	/press tab
	/cast 3
/return

Sub Event_Slainby
	/endmacro
/return
Also, in further features I will try to implement an avoidance of obstruction feature to create a complete "RANGER" macro that needs no one to be there, once I finish off the autofire i'll try to implement an autofollow feature that avoids obstructions and so then when someone pulls a mob I won't run into it...

Gellenole
orc pawn
orc pawn
Posts: 20
Joined: Wed Oct 29, 2003 10:28 pm

Revision but advice is still needed to fix

Post by Gellenole » Mon Nov 03, 2003 4:42 pm

Code: Select all

|Archery Macro v. 1.0d
|Archery Assist Macro.
|Gellenole's Autofire Archery Macro
|
|HISTORY
|Version 1.0d
|	- Macro will keep running.
|	- Macro Contains enough info in sub routines to identify NPC from PC
|	- Macro also is used to assist the main assist(restart macro to 

readjust tank)
|	- Macro Contains checks for SoE + Eagle Eye.  Will recast if faded.
|Version 1.0c
|	- Fixed the macro to end when the mob dies. (Turn off macro to stop)
|Version 1.0b
|	- Fixed having the user to fire 1st arrow for macro to run
|	- Still need to fix how to turn it off once mob is dead
|Version 1.0a
|	- Need user intervention to Fire 1st arrow for the macro to work
|	- Need user intervention to turn off the macro even after mob is dead
|
|	Usage:  /Macro Archery <tank name>

#Event Eagleeye "The avian presence departs"
#Event Spiritof "The avian spirit departs"
#Event Slainby  "You have been slain by"
#Event Fizzle	"Your spell fizzles"

#turbo infinite

Sub Main
	/ECHO  =+= Gellenole's Autofire Macro Enabled =+=
	/ECHO  =+= Usage:  /Macro Archery <Tank name> =+=
	/declare Fightswitch global
	/declare tankname global
	/declare CastsoE global
	/declare Casteagle global
	/declare Fizz global
	/declare CastTimer timer
	/varset tankname @Param0
	/varset Casteagle 0
	/varset CastsoE 0
	/varset Fizz 0
	:Mainloop 
	/doevents
	/call Fightswitch
	/goto :mainloop 
/return

| --> This subset is a switch to check for mob target
Sub Fightswitch
/Echo Main Tank for today is @tankname 
:stopfiring
	/assist @tankname
	/delay 5
	/if "$target(type)"=="NPC" { 
		/Echo Autofire Engaged
		/call Arrow
	}
	
	/if "$target(type)"!="NPC" {
		/delay 10
		/goto :stopfiring
	}

	/if "$target()"=="FALSE" {
		/delay 5
		/goto :stopfiring
	} 
/return 

| --> Loop for arrows
Sub Arrow 
:arrowloop 
	/if "$target()"=="TRUE" { 
		/face fast
		/if n $target(distance)>130 /sendkey down up
		/if n $target(distance)<100 /sendkey down down
		/if n $target(distance)<120 /sendkey up up
		/if n $target(distance)<90 /sendkey up down
		/delay 3 
		/press 2		|Change arrow button to your own
	}
	
	/if "$target(type)"!="NPC" {
		/delay 10
		/call Fightswitch
	}

	/if "$target()"=="FALSE" {
		/delay 5
		/call Fightswitch
	}
	/goto :arrowloop
/return

|-->Events that are performed automatically<--

Sub Event_Eagleeye
	/varset Casteagle 1
	/call Spellcast
/return

Sub Event_Spiritof
	/varset CastsoE 1
	/call Spellcast
/return

Sub Event_Fizzle
	/varset Fizz 1
/return

Sub Event_Slainby
	/endmacro
/return
|--> End of Events <--

Sub Spellcast
:recast
	/if @Casteagle=="1" {
		/cast "Eagle Eye"
		/if @Fizz=="1" {
			/goto :recast
		}
	}

	/if @CastsoE=="1" {
		/press tab
		/cast "Spirit of Eagle"	
		/if @Fizz=="1" {
			/goto :recast
		}
	}
/return