Shaman Autocast ATK - aka. RaidShaman (2004-09-11)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Hubba
orc pawn
orc pawn
Posts: 22
Joined: Wed Jul 14, 2004 5:00 am

Shaman Autocast ATK - aka. RaidShaman (2004-09-11)

Post by Hubba » Wed Sep 08, 2004 3:26 am

Here is a code that I use when I have my shaman on raids to cast ATK spell Ferine Avatar.

You can find this code in my other shaman script.

I also have a hotbutton that will pause the macro. Se macroquest help for more information how to pause a macro.

Code: Select all

|__________________ Shaman Auto ATK ____________________________|
|
| Version: 1.1
| Release Date: 2004-09-11
|___________________________________________________Hubba_______|
|
| Usage:
| 1. Start the script with: /mac <scriptname>
|
| Change PlayerNames in AvatarTarget array.
| My shaman can hold up to 9 chars Avatared
|_______________________________________________________________|

| -!- This Script Uses spell_routines.inc by Rusty

#Event	OutDoor			"#*#outdoors#*#"
#Event	ImDead			"You have been slain by#*#"

#include Spell_Routines.inc

Sub Main
	/declare SpellCanni         outer "Cannibalize IV"
	/declare SpellHoT           outer "Quiescence"
	/declare SpellATK		    outer "Ferine Avatar"
	/declare Mount			    outer "Small Red Drum"

	|- Change to player you like to get
	/declare AvatarTarget[4] string outer
	/varset AvatarTarget[1] PlayerName
	/varset AvatarTarget[2] PlayerName
	/varset AvatarTarget[3] PlayerName
	/varset AvatarTarget[4] PlayerName

	| This is a delay for how long Avatar will hold. (9min)
	/declare AvatarDelay	    outer 5350
	
	/declare ATKBuffed0 timer outer 0
	/declare ATKBuffed1 timer outer 0
	/declare ATKBuffed2 timer outer 0
	/declare ATKBuffed3 timer outer 0
	/declare ATKBuffed4 timer outer 0
	/declare ATKBuffed5 timer outer 0
	
	/if ( !${Me.Gem[${SpellATK}]} ) {
		/memspell 4 ${SpellATK}
		/delay 20
	}
	/if ( !${Me.Gem[${SpellHoT}]} ) {
		/memspell 7 ${SpellHoT}
		/delay 20
	}

	|/if ( ${Window[SpellBookWnd].Open} ) /windowstate SpellBookWnd close
	/echo Spells are memmed.
	
:Main_Loop

	|- Summon drogmore
	/if (!${Me.Mount.ID} && ${OutDoors}) /call cast ${Mount} item 4s
	
	|- Do we move?
:Hold_Main
	/if (${Me.Moving}) /goto :Hold_Main
	
	|- Check for new events in chat etc etc...
	/doevents
	
	/if (${Me.SpellReady[${SpellATK}]}) /call Cast_Avatar

	|- Canni
	/if (${Me.CurrentHPs} < ${Math.Calc[${Me.MaxHPs}/2]}) /call CheckMyHPs
	/if (${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-5]}) /call cast ${SpellCanni} Gem1 3s
	/if (${Me.AltAbilityReady[47]} && ${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-1200]} && ${Me.MaxHPs} > 2424) /call Cannibalization
	| /if (!${OutDoors} && ${Me.State.Equal[Stand]}) /sit

	/goto :Main_Loop
/return

|################### Casting Avatar on all melee classes in group

Sub Cast_Avatar
	/declare i int local 0
	/for i 1 to ${AvatarTarget.Size}
	/if (${ATKBuffed${i}}==0) {
		/target ${AvatarTarget[${i}]}
		/if (${Target.Type.Equal[PC]}) /if (${Me.CurrentMana}>${Spell[${SpellATK}].Mana}) /call cast ${SpellATK} gem4 4s
		/if (${Macro.Return.NotEqual["CAST_OUTOFRANGE"]}) {
			/varset ATKBuffed${i} ${AvatarDelay}
			/return
		}
	}
	/next i
/return

| ######################################################################################################

Sub Event_OutDoor
	
	/echo This is an indoor zone. Sorry.
	/varset OutDoors FALSE

/return

| ######################################################################################################

Sub Cannibalization

	/call CheckMyHPs

	/if (${Me.CurrentHPs} < 2424) {
		/call CheckMyHPs
	} else {
		/echo *** Doing Cannibalization !
		/alt activate 47
	}

/return

| ######################################################################################################

Sub CheckMyHPs

	/target myself
	/if (${Me.CurrentMana}<${Spell[${SpellHoT}].Mana}) {
		/echo *** Shit, I don't have mana to cast ${SpellHoT}
	} else {
		/if (!${Me.Buff[${SpellHoT}].ID}) /call cast ${SpellHoT} gem7 3s
	}

/return

| ######################################################################################################

Sub Event_ImDead

	/endmacro

/return
Edit: Fixed Error in code.
Edit: More Fixing error in code.
Last edited by Hubba on Fri Sep 10, 2004 6:06 pm, edited 1 time in total.

Boredbard
a ghoul
a ghoul
Posts: 89
Joined: Thu Nov 27, 2003 11:49 am

Post by Boredbard » Wed Sep 08, 2004 6:20 pm

A simple suggestion to make this slightly better would be either ini support, where you would just call up /mac FAmac raid / group / ect. or use @Param0 @Param1 ect to fill in the array that way you could dynamically change your buff list without bothering to jump out of EQ, and then have a default list if nothing is entered!

Just my worthless 2cp.

Hubba
orc pawn
orc pawn
Posts: 22
Joined: Wed Jul 14, 2004 5:00 am

Post by Hubba » Thu Sep 09, 2004 2:41 am

I see your point Boredbard.

When I use this script it's mainly for RL friends in guild.

But I gues those who like param style can change the script.
If you have no skill in scripting, sad4u then.

An .ini file is futile imo, way to few variables to change.

I my self uses WinEQ, and I gues all other that uses MQ2 is using WinEQ or EQWindows. It sure makes it less harder to program a script.