wiz.mac
Posted: Fri Dec 10, 2004 6:24 pm
well i ve tried afnuke and found this macro awsome, unfortunatly i cant get my mind on why it s bugged for me (it work for named but not for mobs with a "A" before name) so i decided to create a macro to auto my wiz in exp grp.
fyi yesterday i was trying to compile .mac like a pluggin so am such a noob
here it is, basicly it have 1 MA (the one u start mac targetted with) but ll check ma again after each action (ie if switch target), etc it ll snare nuke n conc, self buff etc. very basic mac but working afaik.
i ve used afnuke, the shm bot from hubba and some other minor mac.
i ll try to add a stun with spark of thunder when i figure out later how to parse the event target cast ch or gate ><
fyi yesterday i was trying to compile .mac like a pluggin so am such a noob
here it is, basicly it have 1 MA (the one u start mac targetted with) but ll check ma again after each action (ie if switch target), etc it ll snare nuke n conc, self buff etc. very basic mac but working afaik.
i ve used afnuke, the shm bot from hubba and some other minor mac.
Code: Select all
| wiz.mac
| first noob mac ever
| v1.0
#Event OutDoor "#*#outdoors#*#"
#Event NoMount "You can not summon a mount here."
#Event ImDead "You have been slain by#*#"
#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"
#Event NoLevit "This spell does not work here."
#Event levitFade "You feel as you are about to fall."
#include Spell_Routines.inc
Sub Main
/declare Spellsnare outer "Atol's Spectral Shackles"
/declare Spellquicknuke outer "Spark of Fire"
/declare Spellmainnuke outer "White Fire"
/declare Spellroot outer "Greater Fetter"
/declare Spellstun outer "Spark of Thunder"
/declare Spellshield outer "Ether shield"
/declare Spellharvest outer "harvest"
/declare Spelltl outer "translocate"
/declare Spellrune outer "Ether Skin"
/declare Mount outer "White Chain Bridle"
/declare Debuff outer "Staff of Temperate Flux"
/declare conc outer "Maelin's Leggings of Lore"
/declare maelin outer "Shawl of Eternal Forces"
/declare Spelllevit outer "O`Keils Levity"
/declare maelinexp outer "Eye of Dreams"
/declare AssistAt int outer 100
/declare CombatAt int outer 98
/declare M_Assist string outer
/declare OutDoors outer TRUE
/declare NoMount outer FALSE
/declare NoLevit outer FALSE
/declare NoSnare outer TRUE
/declare NoSit outer TRUE
/declare TargetArray[4] string outer
/declare MobDebuffed outer TRUE
/declare MobSnared outer TRUE
/declare CombatOn outer TRUE
/call MemSpells
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
/echo Your target is NOT a player, make sure its a player character!
/endmacro
} else {
/varset M_Assist ${Target.CleanName}
/echo Assist set to ${M_Assist}
/assist off
}
:main_loop
/if (!${Me.Mount.ID} && ${OutDoors} && !${NoMount}) /call cast ${Mount} item 4s
/doevents
:Hold_Main
/if (${Me.Moving}) /goto :Hold_Main
/if (${Me.PctMana} < 80 && ${Me.SpellReady["Harvest"]} && !${CombatOn}) /call Cast ${Spellharvest}
/if (${Me.PctMana} < 80 && ${Me.AltAbilityReady["Harvest of Druzzil"]} ) /aa act Harvest of Druzzil
| /if (${Target.PctHPs}<= 85 && ${CombatOn} && ${Me.AltAbilityReady["Call of Xuzl"]} ) /aa act Call of Xuzl 8s
/call SingleBuffs
/call GetTarget
/if (${CombatOn}) /call Combat
/if (${Me.State.Equal[Stand]} && ${NoMount} && !${NoSit}) /sit
/goto :Main_Loop
/return
Sub MemSpells
/echo Memming spells. Hang on.
/if ( !${Me.Gem[${Spellsnare}]} ) {
/memspell 1 ${Spellsnare}
/delay 20
}
/if ( !${Me.Gem[${Spellquicknuke}]} ) {
/memspell 2 ${Spellquicknuke}
/delay 25
}
/if ( !${Me.Gem[${Spellmainnuke}]} ) {
/memspell 3 ${Spellmainnuke}
/delay 20
}
/if ( !${Me.Gem[${Spellroot}]} ) {
/memspell 4 ${Spellroot}
/delay 20
}
/if ( !${Me.Gem[${Spellstun}]} ) {
/memspell 5 ${Spellstun}
/delay 25
}
/if ( !${Me.Gem[${Spellshield}]} ) {
/memspell 6 ${Spellshield}
/delay 25
}
/if ( !${Me.Gem[${Spellharvest}]} ) {
/memspell 7 ${Spellharvest}
/delay 20
}
/if ( !${Me.Gem[${Spelllevit}]} ) {
/memspell 8 ${Spelllevit}
/delay 20
}
/if ( !${Me.Gem[${Spellrune}]} ) {
/memspell 9 ${Spellrune}
/delay 30
}
|/if ( ${Window[SpellBookWnd].Open} ) /windowstate SpellBookWnd close
/echo Spells are memmed.
/return
Sub GetTarget
/assist ${M_Assist}
/delay 3
/if (${Target.Type.Equal[NPC]}) /if (${Target.Distance}<=${AssistAt} && ${Target.ID}!=${TargetArray[4]} && ${Target.PctHPs}<=${CombatAt}) {
/varset TargetArray[1] ${Target.CleanName}
/varset TargetArray[2] ${Target.Level}
/varset TargetArray[3] ${Target.Name}
/varset TargetArray[4] ${Target.ID}
/varset CombatOn TRUE
/if (${Target.PctHPs}>= 60) /varset MobSnared FALSE
/if (${Target.PctHPs}>= 80) /varset MobDebuffed FALSE
}
/return
Sub Combat
:combat_loop
/doevents
/if (${Me.PctMana} < 20) {
/if (${Me.State.Equal[Stand]} && ${NoMount}) /sit
/goto :combat_loop
}
/if (${Target.PctHPs}<= 10 ) {
/varset CombatOn FALSE
}
/if (${Target.PctHPs}<= 98 && ${CombatOn} && !${MobDebuffed} && ${Target.ID}==${TargetArray[4]}) /call DeBuff
/if (${Target.PctHPs}<= 60 && ${CombatOn} && !${NoSnare} && !${MobSnared} && ${Target.ID}==${TargetArray[4]}) /call snare
/if (${Target.PctHPs}<= 35 && ${CombatOn} && ${Target.ID}==${TargetArray[4]}) {
/call quicknuke
/goto :combat_loop
}
/if (${Target.PctHPs}<= 90 && ${CombatOn} && ${Target.ID}==${TargetArray[4]}) /call mainnuke
|- EndCombat
/target ${TargetArray[3]}
/if (!${Target.Name.Equal[${TargetArray[3]}]} || !${Target.ID}) {
/echo ${TargetArray[1]} is dead
/varset CombatOn FALSE
/varset MobDebuffed FALSE
/varset MobSnared FALSE
/varset TargetArray[1] NULL
/varset TargetArray[2] NULL
/varset TargetArray[3] NULL
/varset TargetArray[4] NULL
}
/return
Sub DeBuff
:DeBuff_Loop
/if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) {
/call cast ${Debuff} item
/call cast ${Debuff} item
/call cast ${Debuff} item
/call cast ${Debuff} item
/call cast ${Debuff} item
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :DeBuff_Loop
/varset MobDebuffed TRUE
}
/return
Sub mainnuke
/if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) {
/if (${Me.CurrentMana}<${Spell[${Spellmainnuke}].Mana}) {
/echo Shid ! I don't have mana to nuke %T
} else {
:mainnuke_Loop
/call cast ${Spellmainnuke} gem3 6s
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :mainnuke_Loop
/if (${Macro.Return.Equal["CAST_RESISTED"]}) /goto :mainnuke_Loop
/call Cast ${conc} item
}
}
/return
Sub quicknuke
/if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) {
/if (${Me.CurrentMana}<${Spell[${Spellmainnuke}].Mana}) {
/echo Shid ! I don't have mana to nuke %T
} else {
:quicknuke_Loop
/call cast ${Spellquicknuke} gem2 3s
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :quicknuke_Loop
/if (${Macro.Return.Equal["CAST_RESISTED"]}) /goto :quicknuke_Loop
}
}
/return
Sub snare
/if (${Target.PctHPs}<=${CombatAt} && !${MobSnared} && ${Target.ID}==${TargetArray[4]}) {
/if (${Me.CurrentMana}<${Spell[${Spellsnare}].Mana}) {
/echo Shid ! I don't have mana to snare %T
} else {
:snare_Loop
/call cast ${Spellsnare}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :snare_Loop
/if (${Macro.Return.Equal["CAST_IMMUNE"]}) {
/gsay %T immune snare
/varset MobSnared TRUE
/return
}
/if (${Macro.Return.Equal["CAST_RESISTED"]}) /goto :snare_loop
/varset MobSnared TRUE
}
/return
sub SingleBuffs
/if (${Bool[${Me.Buff["Ether Skin"]}]}==FALSE) /call Cast ${Spellrune}
/if (${Bool[${Me.Buff["Ether Shield"]}]}==FALSE) /call Cast ${Spellshield}
/if (${Bool[${Me.Buff["Ro's Greater Familiar"]}]}==FALSE) /alt activate 453
| /if (${Bool[${Me.Buff["Devoted Familiar"]}]}==FALSE) /alt activate 457
| /if (${Bool[${Me.Buff["Druzzil's Mystical Familiar"]}]}==FALSE) /alt activate 305
/if (${Me.Pet.ID} && ${Me.Pet.Name.Find[familiar]}) /pet get lost
/if (${Bool[${Me.Buff["Maelin's Methodical Mind"]}]}==FALSE) /call Cast "Shawl of Eternal Forces" item 6s
/if (${Bool[${Me.Buff["Maelin's Meditation"]}]}==FALSE) /call Cast "Eye of Dreams" item 5s
/if (${Bool[${Me.Buff["O`Keils Levity"]}]}==FALSE && !${NoLevit}) /call Cast ${Spelllevit}
/return
| ######################################################################################################
Sub Event_OutDoor
/echo This is an indoor zone. Sorry.
/varset OutDoors FALSE
/return
| ######################################################################################################
Sub Event_NoLevit
/echo can't levitate in this zone. Sorry.
/varset NoLevit TRUE
/return
| ######################################################################################################
Sub Event_NoMount
/echo No mount in this zone. Sorry.
/varset NoMount TRUE
/return
| ######################################################################################################
Sub Event_levitFade
/call Cast ${Spelllevit}
/return
| ######################################################################################################
Sub Event_Invited
/invite
/return
| ##################
Sub Event_ImDead
/echo Bummer !
:Zone_Loop
/if ( ${Me.Bound.ID} != ${Zone.ID} ) /goto :Zone_Loop
/delay 5s
/consent group
/delay 5
/gsay Im ready to get rez.
/call Wait4Rez
/delay 20
/call MemSpells
/if (${Me.State.Equal[Stand]}) /sit
| We do some short meditate before we start again.
:Meditate
/delay 1s
/if (${Me.CurrentMana} < 300) /goto :Meditate
/return
| ################## This part is taken from wait4res.
Sub Wait4Rez
:waitforrez
/if (!${Window[ConfirmationDialogBox].Open}) {
/delay 5s ${Window[ConfirmationDialogBox].Open}
/goto :waitforrez
}
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
:zonein
/delay 5
/squelch /target mycorpse
/delay 5
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/delay 3s
/call Loot_Corpse
} else /goto :zonein
/return
Sub Loot_Corpse
/declare LootTotal int local 0
/declare LootSlot int local
/squelch /target mycorpse
/if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) {
/echo ** Can't target my corpse.
/return
}
/corpse
/delay 1s
/loot
/delay 1s
/if (${Me.State.NotEqual[BIND]}) {
/echo ** Massive lag right now... Aborting looting.
/return
}
:LootLag
/if (${LootTotal}!=${Corpse.Items}) {
/varset LootTotal ${Corpse.Items}
/delay 5
/goto :LootLag
}
/for LootSlot 1 to ${LootTotal}
:LootItem
/itemnotify loot${LootSlot} rightmouseup
/delay 3
/if (${Corpse.Item[${LootSlot}].ID}) {
/delay 2
/goto :LootItem
}
/next LootSlot
/delay 5
/echo ** Done looting my corpse.
/notify LootWnd DoneButton leftmouseup
/return