Code: Select all
|Simple imbue/enchant Macro
|imbue.mac
|Author: Fallon (my first macro, yay!)
|Credits: I mostly just hacked up YAST by Lorad
|Source: http://www.macroquest2.com/phpBB2/viewtopic.php?t=8863&postdays=0&postorder=asc&start=0
|Requires: SpellCast.inc
|Usage: Mem the imbue/enchant spell you want in slot 1, then: /macro imbue
|Example: /macro ts.mac "Metal Bits" "Camp=1 EndOnTrivial=1 KeepItem=0 Spam=0 Delay=3"
|Setting Options: Change "/varset camp 0" to "/varset camp 1" to auto-camp when your out of stuff to imbue
|
#chat tell
#event lang "tells you"
#event NOCOMPONENT "You are missing some required spell components."
#include SpellCast.inc
Sub Main
/declare currentSpell
/declare camp
/declare spellName
/varset currentSpell 1
/varset camp 0
/target myself
/echo currentspell=${currentSpell}
/echo casting=${Me.Gem[${currentSpell}]}
:castSpell
/doevents
/if ( ${Me.PctMana}<20) {
/sit on
/call MedBreak
}
/call CheckGM
/call cast "${Me.Gem[${currentSpell}]}"
:checkCursor
/if (${Cursor.ID}) {
/autoinv
/goto :checkCursor
}
/doevents
/goto :castSpell
}
/sit
/call MedBreak
/camp
/return
Sub CheckGM
:GMCheck
/if (${Bool[${Spawn[gm].ID}]}) {
/echo 'Cast Macro' A GM or Guide has been detected in the zone, the macro will resume when the zone is clear of GM/Guides
/delay 600s
/goto :GMCheck
}
/return
Sub Event_Chat
/echo Got a tell, pausing for 10 minutes
/delay 600s
/return
Sub Event_Lang
/echo Got a tell, pausing for 10 minutes
/delay 600s
/return
Sub Event_NOCOMPONENT
/echo Out of stuff to work on
/call End_Macro
/return
/return
Sub MedBreak
/stand
/sit
:MedMore
/delay 2s
/if (${Me.CurrentMana}<${Me.MaxMana}) /goto :MedMore
/return
Sub End_Macro
/if (${Camp}==1) {
/sit
/camp desktop
}
/endmacro
/return


