Moderator: MacroQuest Developers




Code: Select all
/if $p2~~"00petheal" /call PetHealSub
Sub PetHealSub
/assist $v33
/delay 6
/tell $v33 INC Heal for %T
/call SpellSub 1 5
/tell $v33 %T has been healed, Mana: $char(mana,pct), HP: $char( hp,pct)
/target $v33
/return


Code: Select all
| Druid.mac - Druid Powerlevel Script, optimized for LVL 55+ Druids
| Written by: Nuad
| Updated by: Lurker_005
|
| THIS IS AN ONGOING, UNFINISHED WORK... 15-11-2002
|
| Start with /macro druid <Controller Name> <Type> e.g. /macro druid Buranda 1
|
| Spells for PLing (Type 1)........: Heal, DS, Skin, Chloro, STR, SoW, Snare, Root
| Spells for Hunting (Type 2)......: Heal, DS, Skin, Winged, STR, SoW, Breath, Evac
| or if indoors (Type 3)...........: Heal, DS, Skin, Winged, STR, Immolate, Breath, Evac
| or if a Nuke is required (Type 4): Heal, DS, Skin, Winged, STR, Nuke, Debuff, Evac
|
|#include SpellSub.mac
#include spellcast.mac
#include Spellbook.mac
#chat tell
#event ArmOff "Your Drones of Doom spell has worn off."
#event EpicOff "Your Wrath of Nature spell has worn off."
#event BreathOff "Your Breath of Ro spell has worn off."
#event WingedOff "Your Winged Death spell has worn off."
#event ImmoOff "Your Immolate spell has worn off."
#event RegenOff "You have stopped regenerating."
#define Master v30
#define SpellGroup v34
Sub Main
/varset Master $p0
/varset SpellGroup $p1
/varset v29 0
/call MemSpells $SpellGroup
/tell $Master Ready to go
:loop
/doevents
/goto :loop
/return
Sub Event_Chat
/varset v33 $p1
| Check if Tell is from the Controller, if not inform Controller
/if "$v33"!="$Master" {
/mqlog Tell from $p1 : $p2
/tell $p1 Sorry i'm really busy at the moment and not aviable for tells
/delay 2
/tell $Master Tell from $p1 to $char(name) , i told him that i'm busy
/return
}
/if $p2~~"status" {
/tell $Master Mana: $char(mana,pct), HP: $char(hp,pct)
/return
}
/if $p2~~"help" {
/call Help
/return
}
/if $p2~~"type1" {
/call MemSpells 1
/return
}
/if $p2~~"type2" {
/call MemSpells 2
/return
}
/if $p2~~"type3" {
/call MemSpells 3
/return
}
/if $p2~~"type4" {
/call MemSpells 4
/return
}
/stand
/target $Master
/if $p2~~"heal" /call HealSub
/if $p2~~"DS" /call DsSub
/if $p2~~"Skin" /call SkinSub
/if $p2~~"Regen" /call RegenSub
/if $p2~~"str" /call StrengthSub
/if $p2~~"sow" /call SoWSub
/if $p2~~"snare" /call SnareSub
/if $p2~~"root" /call RootSub
/if $p2~~"come" /call GoTarget
/if $p2~~"self" /call SelfBuff
/if $p2~~"home" /call GoHome
/if $p2~~"evac" /call Evac
/if $p2~~"sheal" /call SelfHeal
/if $p2~~"rotg" /call Chest
/if $p2~~"drones" /call Arm
/if $p2~~"epic" /call Epic
/if $p2~~"winged" /call Winged
/if $p2~~"breath" /call Breath
/if $p2~~"immo" /call Immo
/if $p2~~"nuke" /call Nuke
/if $p2~~"debuff" /call Debuff
/sit
/doevents
/return
Sub HealSub
/tell $Master INC Heal for %T
/call cast "$v41"
/tell $Master Healing done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub DsSub
/tell $Master INC Damage Shield for %T
/call cast "$v42"
/tell $Master DS Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub SkinSub
/tell $Master INC Skin for %T
/call cast "$v43"
/tell $Master Skin Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub RegenSub
/tell $Master INC Regeneration for %T
/call cast "$v44"
/tell $Master Regeneration Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub StrengthSub
/tell $Master INC STR for %T
/call cast "$v45"
/tell $Master STR Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub SoWSub
/tell $Master INC SoW for %T
/call cast "$v46"
/tell $Master SoW Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return
Sub SnareSub
/assist $Master
/delay 6
/tell $Master Ensnaring %T
/call cast "$v47"
/tell $Master %T is ensnared, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub RootSub
/assist $Master
/delay 6
/tell $Master Rooting %T
/call cast "$v48"
/tell $Master %T is rooted, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub SelfBuff
/target myself
/tell $Master Casting SoW now on myself
/call cast "$v46"
/target myself
/tell $Master Casting SLN now on myself
/call cast "$v43"
/tell $Master Selfbuffs done, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub GoHome
/stand
/sit
/tell $Master Camping...
/camp desktop
/endmacro
/return
Sub Evac
/target $Master
/invite $Master
/tell $Master You have 8 Seconds now to press Follow
/call cast "$v48"
/tell $Master EVAC INC
/return
Sub GoTarget
/stand
/target $Master
/face nopredict
/varset v90 $target(id)
/varset t0 5m
/tell $Master I'm coming
:CloserAF
/doevents
/if "$target(id)"!="$v90" /goto :EndAF
/if n $target(distance)>14 /call AutoRun 1
/if n $target(distance)<15 /goto :EndAf
/face nopredict
/doevents
/if n $t0==0 /press esc
/goto :CloserAF
:EndAF
/call AutoRun 0
/tell $Master stopped
/doevents
/return
Sub AutoRun
/if $p0==$v80 /return
/varset v80 $p0
/if $p0==1 /sendkey down up
/if $p0==0 /sendkey up up
/return
Sub SelfHeal
/target myself
/tell $Master INC Heal for %T
/call cast "$v41"
/tell $Master Healing done, Mana: $char(mana,pct) HP: $char(hp,pct)
/target $Master
/return
Sub Chest
/tell $Master INC RotG, no other actions possible in the next 10 Seconds!
/press i
/click right equip chest
/delay 95
/press i
/tell $Master RotG done, Mana: $char(mana,pct) HP: $char(hp,pct)
/return
Sub Arm
/assist $Master
/delay 6
/varset v31 $target(name)
/tell $Master INC Drones of Doom on %T, no other actions possible in the next 10 Seconds!
/press i
/click right equip arms
/delay 85
/press i
/tell $Master Drones of Doom on %T done, Mana: $char(mana,pct) HP: $char(hp,pct)
/target $Master
/return
Sub Epic
/assist $Master
/delay 6
/tell $Master INC Epic DoT on %T, no other actions possible in the next 10 Seconds!
/press i
/click right equip primary
/delay 95
/press i
/tell $Master Epic DoT on %T done, Mana: $char(mana,pct) HP: $char(hp,pct)
/target $Master
/return
Sub Winged
/assist $Master
/delay 6
/tell $Master Winged Death goes to %T
/call cast "$v44"
/tell $Master Winged Death on %T done, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub Breath
/assist $Master
/delay 6
/tell $Master Breath of Ro goes to %T
/call SpellSub 7
/tell $Master Breath of Ro on %T done, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub Immo
/assist $Master
/delay 6
/tell $Master Immolate goes to %T
/call cast "$v47"
/tell $Master Immolate on %T done, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub Nuke
/assist $Master
/delay 6
/tell $Master Nuking %T
/call cast "$v46"
/tell $Master Nuke on %T done, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub Debuff
/assist $Master
/delay 6
/tell $Master Debuffing %T
/call cast "$v47"
/tell $Master %T successfully debuffed, Mana: $char(mana,pct), HP: $char(hp,pct)
/target $Master
/return
Sub Event_ArmOff
/tell $Master Drones of Doom from $char(name) has worn off.
/return
Sub Event_EpicOff
/tell $Master Epic DoT from $char(name) has worn off.
/return
Sub Event_BreathOff
/tell $Master Breath of Ro from $char(name) has worn off.
/return
Sub Event_WingedOff
/tell $Master Winged Death from $char(name) has worn off.
/return
Sub Event_ImmoOff
/tell $Master Immolate from $char(name) has worn off.
/return
Sub Event_RegenOff
/tell $Master HP Regeneration Buff needs to be recast.
/return
Sub MemSpells
|put spell group mem commans here, by group
| Spells for PLing (Type 1)........: Heal, DS, Skin, Chloro, STR, SoW, Snare, Root
| Spells for Hunting (Type 2)......: Heal, DS, Skin, Winged, STR, SoW, Breath, Evac
| or if indoors (Type 3)...........: Heal, DS, Skin, Winged, STR, Immolate, Breath, Evac
| or if a Nuke is required (Type 4): Heal, DS, Skin, Winged, STR, Nuke, Debuff, Evac
/if n $p0>4 /return
/varset SpellGroup $p0
/if n $SpellGroup==1 {
| /echo loading spellgroup 1
/varset v41 "Greater Healing"
/varset v42 "Shield of Thorns"
/varset v43 "Skin Like Nature"
/varset v44 "Chloroplast"
/varset v45 "Storm Strength"
/varset v46 "Spirit of Wolf"
/varset v47 "Ensnare"
/varset v48 "Ensnaring Roots"
}
/if n $SpellGroup==2 {
| /echo loading spellgroup 2
/varset v41 "Greater Healing"
/varset v42 "Shield of Thorns"
/varset v43 "Winged Death"
/varset v44 "Chloroplast"
/varset v45 "Storm Strength"
/varset v46 "Spirit of Wolf"
/varset v47 "Breath of Ro"
/varset v48 "Lesser Succor"
}
/if n $SpellGroup==3 {
| /echo loading spellgroup 3
/varset v41 "Greater Healing"
/varset v42 "Shield of Thorns"
/varset v43 "Winged Death"
/varset v44 "Chloroplast"
/varset v45 "Storm Strength"
/varset v46 "Immolate"
/varset v47 "Breath of Ro"
/varset v48 "Lesser Succor"
}
/if n $SpellGroup==4 {
| /echo loading spellgroup 4
/varset v41 "Greater Healing"
/varset v42 "Shield of Thorns"
/varset v43 "Winged Death"
/varset v44 "Chloroplast"
/varset v45 "Storm Strength"
/varset v46 "Starfire"
/varset v47 "Nullify Magic"
/varset v48 "Lesser Succor"
}
/call MemorizeSpell "$v41" 1
/call MemorizeSpell "$v42" 2
/call MemorizeSpell "$v43" 3
/call MemorizeSpell "$v44" 4
/call MemorizeSpell "$v45" 5
/call MemorizeSpell "$v46" 6
/call MemorizeSpell "$v47" 7
/call MemorizeSpell "$v48" 8
/return
Sub Help
| unfinished yet
/tell $Master heal, ds, skin, regen, str, sow, snare, root, come, self, home, evac, sheal, status, rotg
/delay 1
/tell $Master drones, epic, winged, breath, immo, nuke, debuff, help, type1, type2, type3, type4
/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 spell is interrupted."
#event Recover "You haven't recovered yet..."
#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
