Moderator: MacroQuest Developers
Code: Select all
#Event SkillUp "You have become better at #1#! (#2#)"
Sub Main
/declare i int local 0
/declare c int local 0
/declare MaxSkill int local 0
/declare SpellSkill[5] string local
/varset SpellSkill[1] Abjuration
/varset SpellSkill[2] Alteration
/varset SpellSkill[3] Conjuration
/varset SpellSkill[4] Divination
/varset SpellSkill[5] Evocation
/varcalc MaxSkill ${Me.Level}*5+5
/if (${MaxSkill} > 235) /varset MaxSkill 235
/for i 1 to ${SpellSkill.Size}
/for c 1 to 8
/if (${Me.Gem[${c}].Skill.Equal[${SpellSkill[${i}]}]}) /goto :Check
/next c
/echo [${Time.Time24}] No ${SpellSkill[${i}]} spells memorized, continuing...
/next i
:Check
/if (${Me.Skill[${SpellSkill[${i}]}]} >= ${MaxSkill}) {
/echo [${Time.Time24}] Your ${SpellSkill[${i}]} skill is already at it's current maximum: ${Me.Skill[${SpellSkill[${i}]}]}...
} else {
/echo [${Time.Time24}] Casting ${Me.Gem[${c}].Name} to skill up ${SpellSkill[${i}]}.
/echo [${Time.Time24}] Current skill in ${SpellSkill[${i}]}: ${Me.Skill[${SpellSkill[${i}]}]}.
:Cast
/doevents
/if ((${Me.Gem[${c}].TargetType.Equal[Single]} || ${Me.Gem[${c}].TargetType.Equal[Targeted AE]}) && !${Target.ID}) /target myself
/if (${Me.AFK}) /afk
/if (${Me.CurrentMana} <= ${Me.Gem[${c}].Mana}) {
/call MedBreak
}
/if (${Me.PctHPs} < 20) {
/call HealBreak
}
/if (${Me.SpellReady[${c}]}) {
/if (!${Me.Standing}) /stand
/cast ${c}
/delay ${Math.Calc[${Me.Gem[${c}].MyCastTime}*10+10].Int} (!${Me.Casting.ID})
/if (${Me.Standing}) /sit
}
:Cursor
/if (${Cursor.ID}) {
/autoinventory
/goto :Cursor
}
/if (${Me.Skill[${SpellSkill[${i}]}]} < ${MaxSkill}) /goto :Cast
}
/next i
/echo [${Time.Time24}] Done..
/call MedBreak
/endmacro
/return
Sub MedBreak
/if (!${Me.AFK}) /afk
:Loop
/if (${Me.Standing}) /sit
/delay 6s
/if (${Me.CurrentMana} < ${Me.MaxMana}) /goto :Loop
/return
Sub HealBreak
/if (!${Me.AFK}) /afk
:Loop
/if (${Me.Standing}) /sit
/delay 6s
/if (${Me.CurrentHPs} < ${Me.MaxHPs}) /goto :Loop
/return
Sub Event_SkillUp(str Line, string TheSkill, int Amount)
/echo [${Time.Time24}] ${TheSkill} increased - ${Amount}...
/returnCode: Select all
#chat tell
#event lang "tells you"
#include SpellCast.inc
Sub Main
/declare currentSpell
/declare maxSkill
/declare skillName
/declare spellName
/varset currentSpell 1
/target myself
:nextSpell
/echo currentspell=${currentSpell}
/echo casting=${Me.Gem[${currentSpell}]}
/if ( ${Bool[${Me.Gem[${currentSpell}]}]} ) {
/varset skillName ${Me.Gem[${currentSpell}].Skill}
/varset maxSkill ${Skill[${Me.Gem[${currentSpell}].Skill}].SkillCap}
/echo maxSkill=${maxSkill}
:castSpell
/doevents
/if ( ${Me.PctMana}<20) {
/sit on
/call MedBreak
}
/echo ${skillName}=${Me.Skill[${skillName}]}
/if ( ${Me.Skill[${skillName}]} >= ${maxSkill} ) {
/varset currentSpell ${Math.Calc[${currentSpell}+1]}
/goto :nextSpell
}
/call CheckGM
/call cast "${Me.Gem[${currentSpell}]}"
:checkCursor
/if (${Cursor.ID}) {
/if (!${Cursor.NoRent}) {
/autoinv
} else {
/destroy
}
/goto :checkCursor
}
/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 1 minute
/delay 60s
/return
Sub Event_Lang
/echo Got a tell, pausing for 1 minute
/delay 60s
/return
Sub MedBreak
/stand
/sit
:MedMore
/delay 2s
/if (${Me.CurrentMana}<${Me.MaxMana}) /goto :MedMore
/return
Code: Select all
#chat tell
#event lang "tells you"
#include SpellCast.inc
Sub Main
/declare currentSpell
/declare maxSkill
/declare skillName
/declare spellName
/declare currentSkill
/declare castCount
/varset currentSpell 1
/varset castCount 0
/target myself
:nextSpell
/echo currentspell=${currentSpell}
/echo casting=${Me.Gem[${currentSpell}]}
/if ( ${Bool[${Me.Gem[${currentSpell}]}]} ) {
/varset skillName ${Me.Gem[${currentSpell}].Skill}
/varset currentSkill ${Me.Skill[${skillName}]}
/varset maxSkill ${Skill[${Me.Gem[${currentSpell}].Skill}].SkillCap}
/echo maxSkill=${maxSkill}
/echo ${skillName} starting at ${currentSkill}
:castSpell
/doevents
/if ( ${Me.PctMana}<20) {
/sit on
/call MedBreak
}
/if ( ${Me.Skill[${skillName}]} > ${currentSkill} ) {
/varset currentSkill ${Me.Skill[${skillName}]}
/echo ${skillName} improved to ${currentSkill} after ${castCount} cast(s)!
/varset castCount 0
}
| /echo ${skillName}=${Me.Skill[${skillName}]}
/if ( ${Me.Skill[${skillName}]} >= ${maxSkill} ) {
/varset currentSpell ${Math.Calc[${currentSpell}+1]}
/goto :nextSpell
}
/call CheckGM
/call cast "${Me.Gem[${currentSpell}]}"
/varset castCount ${Math.Calc[${castCount}+1]}
:checkCursor
/if (${Cursor.ID}) {
/if (!${Cursor.NoRent}) {
/autoinv
} else {
/destroy
}
/goto :checkCursor
}
/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 MedBreak
/stand
/sit
:MedMore
/delay 2s
/if (${Me.CurrentMana}<${Me.MaxMana}) /goto :MedMore
/return
