It needs to be tested more and could use some conditionals (right now it's always trying to cast, even if you're already casting which results in a crapload of spam.
I haven't tested this longer than 5 min but it cast and destroyed items for me so **shrug**
Code: Select all
| Call this macro after defining targetted skill levels and appropriate spells
|
| Will iterate through all skills and raise them to requested levels in order
| The macro will auto end if the character moves.
|
| IMPORTANT NOTE: If you're casting a summoning spell and an item with "Summoned:"
| exists on your cursor it will be DESTROYED.
#define MANA_SIT 30 |% mana to sit and regain mana
#define MANA_CAST 90 |% mana to stand and resume casting
sub Main
/declare loc_x global |x loc
/declare loc_y global |y loc
|=========================
| record loc of character
|=========================
/varset loc_x (${Me.X})
/varset loc_y (${Me.Y})
/call RaiseSkill "Abjuration" 200 "Okeil's Radiation"
/call RaiseSkill "Alteration" 200 "Root"
/call RaiseSkill "Conjuration" 200 "Halo of Light"
/call RaiseSkill "Divination" 200 "True North"
/call RaiseSkill "Evocation" 200 "Shock of Fire"
/call RaiseSkill "Channeling" 200 "True North"
/call RaiseSkill "Meditate" 200 "Familiar"
/call RaiseSkill "Specialize Alteration" 50 "Shallow Breath"
/return
|===================================================================================
sub RaiseSkill(skill,level,spell)
|=========================
| general notification
|=========================
/echo - Raising @skill to @level with '@spell'
/echo Macro will AUTO STOP if movement is detected.
|=========================
| return if spell not in book
|=========================
| /if $char(book,"@spell")==NULL {
/if (${Me.Book[@spell]}==0) {
/echo Spell '@spell' not in spellbook.
/return
}
:loop
|=========================
| insert short semi-random delay
|=========================
| /delay $calc(5+$rand(5))
/delay (${Math.Rand[10]})s
|=========================
| exit if character movement detected
|=========================
| /if (@loc_x!=$char(x) || @loc_y!=$char(y)) {
/if (${Me.X}!=@loc_x || ${Me.Y}!=@loc_y) {
/echo Movement detected! Ending macro.
/endmacro
}
|=========================
| if casting a summoning spell and a summoned item on cursor, destroy it
|=========================
| /if ("@spell"~~"Summon" && "$cursor(name)"~~"Summoned:") /destroy
/if (${String[@spell].Find[Summon]} && ${Cursor.Name.Find[Summoned:]}) /destroy
| Or should this be:
| /if (!${String[@spell].Find[Summon]}==NULL && !${Cursor.Name.Find[Summoned:]==NULL) /destroy
|=========================
| return if this skill at desired level
|=========================
| /if n $char(skill,"@skill")>=@level {
| /echo @skill at $char(skill,"@skill")
/if (${Me.Skill[@skill]}>=@level) {
/echo @skill at ${Skill[@skill]}
/return
}
|=========================
| ensure spell memorized
|=========================
| /if n $char(gem,"@spell")==0 {
/if (!${Me.Gem[@spell]}) {
/memspell 8 "@spell"
/delay 10s
}
|=========================
| sit if not casting/medding and mana dropped to MANA_SIT value
|=========================
| /if (n $char(mana,pct)<MANA_SIT && $char(state)=="STAND" && $char(casting)=="FALSE") /sit
/if (${Me.PctMana}<MANA_SIT && ${Me.State.Equal[STAND]} && !${Me.Casting.ID}) /sit
|=========================
| if medding and mana not yet up to MANA_CAST, continue to med
|=========================
| /if ($char(state)=="SIT" && n $char(mana,pct)<MANA_CAST) /goto :loop
/if (${Me.State.Equal[SIT]} && ${Me.PctMana}<MANA_CAST) /goto :loop
|=========================
| cast if the spell has refreshed
|=========================
| /if n $char(gem,"@spell")>0 {
| /if $char(state)=="SIT" /stand
| /if n $target(id)!=$char(id) /target myself
/if (${Me.Gem[@spell]}>0) {
/if (${Me.State.Equal[SIT]}) /stand
/if (${Target.CleanName.NotEqual[${Me.CleanName}]}) /target myself
/cast "@spell"
}
|=========================
| loop
|=========================
/goto :loop
/return 
