Moderator: MacroQuest Developers
Code: Select all
sub Loot
/declare counter int local
/declare [color=red]L[/color]oot[color=red]S[/color]lot int local
/if (${Me.Combat}) /return
/if (!${Target.ID}) /target corpse radius 100
/if (${Target.State.NotEqual[DEAD]}) /return
/call Rangesub
[color=red]/face[/color]
/varset LootTooFar 0
/varset LootSlot [color=red]1[/color]
Code: Select all
/if (${Target.Distance}>${FastRange}) /keypress [color=red]FORWARD[/color] hold
Code: Select all
/varset BuffList[color=red][[/color]${NewBuff},1[color=red]][/color] "${Target.CleanName}"
/varset BuffList[color=red][[/color]${NewBuff},2[color=red]][/color] "${SpellName}Param"
/varset BuffList[color=red][[/color]${NewBuff},3[color=red]][/color] ${Spell[${SpellNameParam}].Duration.TotalSeconds}

Code: Select all
/if [color=red]([/color]((${Me.Heading.Degrees}<=180)&&(${Target.Heading.Degrees}<=180)&&(${Me.Heading.Degrees}>${Math.Calc[${Target.Heading.Degrees}+25]})) /goto :MoreCounter
Code: Select all
/if [color=red]([/color]((${Me.Heading.Degrees}>=180)&&(${Target.Heading.Degrees}<=180)&&(${Math.Calc[${Me.Heading.Degrees}-157.5]}<${Math.Calc[${Target.Heading.Degrees}+180]})) /goto :MoreCounterCode: Select all
/if [color=red]([/color][color=green]((${Me.Heading.Degrees}>=180)&&(${Math.Calc[${Me.Heading.Degrees}-180]}<=${Target.Heading.Degrees}))[/color]&&[color=cyan](${Me.Heading.Degrees}>${Math.Calc[${Target.Heading.Degrees}+22.5]})[/color][color=red])[/color] /goto :MoreCounter
Code: Select all
(${DoBackstab})Code: Select all
(${DoBackstab}==1)
Code: Select all
/if (!${Me.[color=red]Class[/color].CanCast}) /return
Code: Select all
Sub Do-mana
/if (!${Me.Class.CanCast}) /return
/declare RoundMana int local ${Math.Calc[${Math.Calc[${Me.PctMana}/5].Int}*5].Int}
/if (${RoundMana}==100) {
/call ChatOut 2 ${MasterName} "fm"
} else {
/call ChatOut 2 ${MasterName} "${RoundMana}m"
}
/return

Code: Select all
Sub SpellSub(string SpellName)
/if (${Me.Casting.ID}) /return
Code: Select all
Sub SpellSub(string SpellName)
/if (${Me.Casting.ID} || ${CTimer}>0) /return

Code: Select all
Sub Event_timer(string TimerName,string OldValue)
/if (${TimerName.Equal[SitTimer]}) {
/if (${Me.Standing}) /sit
}
/if (${TimerName.Equal[ChainStunTime]}) {
/call NextStun
}
/if (${TimerName.Equal[BuffListAdvance]}) {
/declare counter local
/for counter 1 to ${BuffListCount}
/varcalc BuffList[${counter},3] ${BuffList[${counter},3]}-1
/if (${BuffList[${counter},3]}<5) {
/call StandardTarget "${BuffList[${counter},1]}"
/if (${Target.CleanName.Equal[${BuffList[${counter},1]}]}) {
/call SpellSub "${BuffList[${counter},2]}"
/if (${Macro.Return}==0) /varset BuffList[${counter},3] ${Spell[${BuffList[${counter},2]}].Duration.TotalSeconds}
}
}
/next counter
/varset BuffListAdvance 5s
}
/return Code: Select all
Sub Event_timer[color=red](string TimerName,string OldValue)[/color]
/if (${TimerName.Equal[SitTimer]}) {
/if (${Me.Standing}) /sit
}
/if (${TimerName.Equal[ChainStunTime]}) {
/call NextStun
}
/if (${TimerName.Equal[BuffListAdvance]}) {
/declare counter local
/for counter 1 to ${BuffListCount}
/varcalc BuffList[${counter},3] ${BuffList[${counter},3]}-1
/if (${BuffList[${counter},3]}<5) {
/call StandardTarget "${BuffList[${counter},1]}"
/if (${Target.CleanName.Equal[${BuffList[${counter},1]}]}) {
/call SpellSub "${BuffList[${counter},2]}"
/if (${Macro.Return}==0) /varset BuffList[${counter},3] ${Spell[${BuffList[${counter},2]}].Duration.TotalSeconds}
}
}
/next counter
/varset BuffListAdvance 5s
}
/return Code: Select all
/if (${ShortCuts[4,${ShortcutNum}]}==1) /call Spellsub "${CastText} "
Code: Select all
/if (${ShortCuts[4,${ShortcutNum}]}==1) /call Spellsub ${CastText}