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: More Fixing error in code.

