Moderator: MacroQuest Developers


Code: Select all
|----- Shaman Macro
| usage /macro shamanbot <assister>
#turbo
#include spellcast.mac
#define spellcheck v20
#define maloon v21
#define slowon v22
#define currmobid v23
#define asst1 v24
#define buffee v25
#define targetchk v26
#Event slow "yawns"
#Event malo "looks very uncomfortable"
#Event exp "party experience"
#Event exp2 "raid experience"
#Event focusoff "focus fades"
#Event staoff "health fades"
#Event join "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel
#chat tell
Sub main
/varset asst1 $p0
/varset slowon 0
/varset maloon 0
/call mainone
/return
Sub mainone
:eventloop
/doevents
/target npc
/varset currmobid $target(id)
/if n $target(distance)<80 /call loopmain
/if n $char(mana,pct)<65 {
/if n $char(hp,cur)>=2000 {
/if "$char(hotbutton,10)"=="TRUE" /alt activate 47
} else /call cann
}
/if n $char(buff,"Quiescence")>0 {
/if n $char(hp,pct)<=51 /call quies
}
/goto :eventloop
/return
Sub loopmain
/varset slowon 0
/varset maloon 0
/stand
/target clear
/assist $asst1
/delay 5
/if n $currmobid==$target(id) {
/pet kill
/call debuff
}
/return
Sub debuff
:loop
/if "$target(type)"=="PC" /return
/doevents
/if $maloon==0 {
/call cast "Malos"
/doevents
}
/delay 10
/if $slowon==0 {
/call cast "Turgur's Insects"
/doevents
}
/if n $char(mana,pct)<65 {
/if n $char(hp,cur)>2500 {
/if "$char(hotbutton,10)"=="TRUE" /alt activate 47
} else /call cann
}
/if n $char(buff,"Quiescence")>0 {
/if n $char(hp,pct)<=51 /call quies
}
/if "$target()"=="TRUE" /goto :loop
/return
Sub focus
/call cast "Focus of Soul"
/return
Sub sta
/call cast "Talisman of the Boar"
/return
Sub camp
/dismount
/delay 2
/sit
/camp desktop
/endmacro
/return
Sub cann
/call cast "Cannibalize IV"
/return
Sub quies
/target myself
/call cast "Quiescence"
/assist $asst1
/return
Sub Event_slow
/assist $asst1
/g <SLOWED> %T <SLOWED>
/varset slowon 1
/return
Sub Event_malo
/assist $asst1
/g <MALOS> %T <MALOS>
/varset maloon 1
/return
Sub Event_focusoff
/target myself
/call focus
/return
Sub Event_staoff
/target myself
/call sta
/return
Sub Event_exp
/varset slowon 0
/varset maloon 0
/return
Sub Event_exp2
/varset slowon 0
/varset maloon 0
/return
Sub Event_join
/press esc
/press esc
/invite
/return
Sub Event_Chat
/varset targetchk $p1
/if "$targetchk"=="$spawn($char(pet),name,clean)" {
/assist $asst1
/return
}
/if "$p2"=="camp" {
/call camp
/return
}
/stand
/varset buffee $p1
/if "$p2"=="focus" {
/target pc $buffee
/call focus
/assist $asst1
/return
}
/if "$p2"=="fos" {
/target pc $buffee
/call focus
/assist $asst1
/return
}
/if "$p2"=="sta" {
/target pc $buffee
/call sta
/assist $asst1
/return
}
/if "$p2"=="ferine" {
/target pc $buffee
/if n $char(gem,"Ferine Avatar")==-2 {
/tt Can not cast Ferine Avatar yet
/return
} else {
/call cast "Ferine Avatar"
/assist $asst1
/return
}
}
/if "$p2"=="haste" {
/target pc $buffee
/call cast "Talisman of Alacrity"
/assist $asst1
/return
}
/return


Code: Select all
| ** SpellCast.mac
| ** This will cast a spell reliably for you...
| ** Usage:
| ** /call Cast "spellname"
| ** It will return the following values:
| ** CAST_SUCCESS
| ** CAST_UNKNOWNSPELL
| ** CAST_OUTOFMANA
| ** CAST_OUTOFRANGE
| ** CAST_CANNOTSEE
| ** CAST_STUNNED
| ** CAST_RESISTED
| **
#event Fizzle "Your spell fizzles!"
#event Interrupt "Your casting has been interrupted!"
#event Interrupt "Your spell is interrupted."
#event Recover "You haven't recovered yet..."
#event Recover "Spell recovery time not yet met."
#event Resisted "Your target resisted the "
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
#event Stunned "You cannot cast while stunned"
#event Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
#define CastStatus v59
#define CastTimer t7
#define CAST_SUCCESS 0
#define CAST_UNKNOWNSPELL 1
#define CAST_RESTART 2
#define CAST_OUTOFMANA 3
#define CAST_OUTOFRANGE 4
#define CAST_CANNOTSEE 5
#define CAST_STUNNED 6
#define CAST_RESISTED 7
Sub Cast
/if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL
:StartCast
/if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0"
/cast "$p0"
/varset CastTimer $int($spell("$p0",mycasttime)*10+$spell("$p0",recoverytime)*10)
/varset CastStatus CAST_SUCCESS
:WaitCast
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/if n $CastStatus==CAST_RESTART /goto :StartCast
/if n $CastStatus>=CAST_RESTART /return $CastStatus
/if n $CastTimer>0 /goto :WaitCast
/varset CastTimer 0
/return CAST_SUCCESS
Sub WaitForRefresh
:LoopWaitForRefresh
/delay 0
/if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh
/return
Sub Event_Fizzle
/varset CastStatus CAST_RESTART
/return
Sub Event_Interrupt
/varset CastStatus CAST_RESTART
/return
Sub Event_Recover
/varset CastStatus CAST_RESTART
/delay 3
/return
Sub Event_Standing
/varset CastStatus CAST_RESTART
/stand
/return
Sub Event_Collapse
/varset CastStatus CAST_RESTART
/return
Sub Event_OutOfMana
/varset CastStatus CAST_OUTOFMANA
/return
Sub Event_OutOfRange
/varset CastStatus CAST_OUTOFRANGE
/return
Sub Event_NoLOS
/varset CastStatus CAST_CANNOTSEE
/return
Sub Event_Stunned
/varset CastStatus CAST_STUNNED
/return
Sub Event_Resisted
/varset CastStatus CAST_RESTART
/return

Code: Select all
|Plazmic + 1 line change by Imperfect
|** SpellCast.mac
** This will cast a spell reliably for you...
** Usage:
** /call Cast "spellname"
** It will return the following values:
** CAST_SUCCESS
** CAST_UNKNOWNSPELL
** CAST_OUTOFMANA
** CAST_OUTOFRANGE
** CAST_CANNOTSEE
** CAST_STUNNED
** CAST_RESISTED
**|
#event Fizzle "Your spell fizzles!"
#event Interrupt "Your casting has been interrupted!"
#event Interrupt "Your spell is interrupted."
#event Recover "You haven't recovered yet..."
#event Recover "Spell recovery time not yet met."
#event Resisted "You target resisted the "
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
#event Stunned "You cannot cast while stunned"
#event Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
#define CastStatus v59
#define CastTimer t7
#define CAST_SUCCESS 0
#define CAST_UNKNOWNSPELL 1
#define CAST_RESTART 2
#define CAST_OUTOFMANA 3
#define CAST_OUTOFRANGE 4
#define CAST_CANNOTSEE 5
#define CAST_STUNNED 6
#define CAST_RESISTED 7
Sub Cast
/if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL
:StartCast
/if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0"
/cast "$p0"
/varset CastTimer $int($spell("$p0",casttime)*10+$spell("$p0",recoverytime)*10)
/varset CastStatus CAST_SUCCESS
:WaitCast
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/if n $CastStatus==CAST_RESTART /goto :StartCast
/if n $CastStatus>=CAST_RESTART /return $CastStatus
/if n $CastTimer>0 /goto :WaitCast
/varset CastTimer 0
/return CAST_SUCCESS
Sub WaitForRefresh
:LoopWaitForRefresh
/delay 0
/if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh
/return
Sub Event_Fizzle
/varset CastStatus CAST_RESTART
/return
Sub Event_Interrupt
/varset CastStatus CAST_RESTART
/return
Sub Event_Recover
/varset CastStatus CAST_RESTART
/delay 5
/return
Sub Event_Standing
/varset CastStatus CAST_RESTART
/stand
/return
Sub Event_Collapse
/varset CastStatus CAST_RESTART
/return
Sub Event_OutOfMana
/varset CastStatus CAST_OUTOFMANA
/return
Sub Event_OutOfRange
/varset CastStatus CAST_OUTOFRANGE
/return
Sub Event_NoLOS
/varset CastStatus CAST_CANNOTSEE
/return
Sub Event_Stunned
/varset CastStatus CAST_STUNNED
/return
Sub Event_Resisted
/varset CastStatus CAST_RESISTED
/return

they do not look the same...dawnoffatex wrote:actually, they look exactly the same? In which case, it still wouldnt function for me with /call cast
Code: Select all
| ** SpellCast.mac
| ** This will cast a spell reliably for you...
| ** Usage:
| ** /call Cast "spellname"
| ** It will return the following values:
| ** CAST_SUCCESS
| ** CAST_UNKNOWNSPELL
| ** CAST_OUTOFMANA
| ** CAST_OUTOFRANGE
| ** CAST_CANNOTSEE
| ** CAST_STUNNED
| ** CAST_RESISTED
| **
donations for this month's patches.
Code: Select all
** SpellCast.mac
| ** This will cast a spell reliably for you...
| ** Usage:
| ** /call Cast "spellname"
| ** It will return the following values:
| ** CAST_SUCCESS
| ** CAST_UNKNOWNSPELL
| ** CAST_OUTOFMANA
| ** CAST_OUTOFRANGE
| ** CAST_CANNOTSEE
| ** CAST_STUNNED
| ** CAST_RESISTED
| **Code: Select all
|Plazmic + 1 line change by Imperfect
|** SpellCast.mac
** This will cast a spell reliably for you...
** Usage:
** /call Cast "spellname"
** It will return the following values:
** CAST_SUCCESS
** CAST_UNKNOWNSPELL
** CAST_OUTOFMANA
** CAST_OUTOFRANGE
** CAST_CANNOTSEE
** CAST_STUNNED
** CAST_RESISTED
**|