Help with Wiz macro

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Spanklin
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Jul 13, 2009 1:32 am

Help with Wiz macro

Post by Spanklin » Mon Jul 13, 2009 1:43 am

Hello all, I have macroquest up and running but am having trouble getting a simple group assist macro to work. I am new to getting macros to work and honestly just am confused as to what I am supposed to do. This is the one I have been attempting to use~ it says it has some sort of problem with the spell_routines.inc, any help is much appreciated guys

| wiz.mac
| v2.0
| simple wizzy bot assist macro
| commands:
| - toggle mode: /fire, /cold, /magic, /main
| - toggle main assist: /ma
| - toggle quick nuke at: /quicknukeat
| - toggle main nuke at: /mainnukeat
| - toggle snare at: /snareat

#Chat tell

#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.#*#"
#Event Fire "[MQ2] FireMode#*#"
#Event Cold "[MQ2] ColdModet#*#"
#Event Magic "[MQ2] MagicMode#*#"
#Event Main "[MQ2] MainMode#*#"
#Event NewMA "[MQ2] NewMA#*#"
#Event SnareAt "[MQ2] SnareAt#*#"
#Event QuickNukeAt "[MQ2] QuickNukeAt#*#"
#Event MainNukeAT "[MQ2] MainNukeAT#*#"

#include Spell_Routines.inc

Sub Main

/declare CChannel outer "secret"
/declare ChatController outer "secret"

/declare following int outer 0
/declare follname string outer NULL
/declare Familiar outer Devoted Familiar
/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 SpellStun2 outer "Teleka"
/declare SpellInvis outer "Improved Invisibiliry"
/declare AssistAt int outer 100
/declare CombatAt int outer 98
/declare MainNukeAT int outer 70
/declare SnareAt int outer 60
/declare DebuffCount int outer 0

/declare M_Assist string outer
/declare OutDoors outer TRUE
/declare NoMount outer FALSE
/declare NoLevit outer FALSE
|if you dont want to snare = TRUE
/declare NoSnare outer FALSE
|if you dont want to sit = TRUE
/declare NoSit outer FALSE
/declare TargetArray[4] string outer
/declare MobDebuffed outer TRUE
/declare MobSnared outer TRUE
/declare CombatOn outer TRUE
/declare DoDebuff outer FALSE

/squelch /alias /fire /echo FireMode
/squelch /alias /cold /echo ColdMode
/squelch /alias /magic /echo MagicMode
/squelch /alias /main /echo MainMode
/squelch /alias /ma /echo NewMA
/squelch /alias /mainnukeat /echo MainNukeAT
/squelch /alias /quicknukeat /echo QuickNukeAt
/squelch /alias /snareat /echo SnareAt

/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
}

/leaveall
/join ${CChannel}
/1 I am here!
/echo Joined channel ${CChannel}

:main_loop

/if (!${Me.Mount.ID} && ${OutDoors} && !${NoMount}) /call cast ${Mount} item 4s
/if (${Me.State.Equal[Stand]} && ${NoMount} && !${NoSit} && ${Me.PctMana}<80 && !${Spawn[npc radius 80].ID}) /sit
/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"]} && !${CombatOn}) /aa act Harvest of Druzzil
/if (${Target.PctHPs}<= 85 && ${CombatOn} && ${Me.AltAbilityReady["Call of Xuzl"]} ) {
/aa act Call of Xuzl
/delay 8s
}
/call SingleBuffs
/call GetTarget
/if (${CombatOn}) /call Combat

/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 && ${DoDebuff} && ${CombatOn} && !${MobDebuffed} && ${Target.ID}==${TargetArray[4]}) /call DeBuff
/if (${Target.PctHPs}<= ${SnareAt} && ${CombatOn} && !${NoSnare} && !${MobSnared} && ${Target.ID}==${TargetArray[4]}) /call snare
/if (${Target.PctHPs}<= ${QuickNukeAt} && ${CombatOn} && ${Target.ID}==${TargetArray[4]}) {
/call quicknuke
/goto :combat_loop
}
/if (${Target.PctHPs}<= ${MainNukeAT} && ${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
/delay 5
/if (${DebuffCount}>5) /goto :DebuffEnd
/if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) {
/call cast ${Debuff} item
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :DeBuff_Loop
/if (${Macro.Return.Equal["CAST_RESISTED"]}) {
/varcalc DebuffCount ${DebuffCount}+1
/goto :DeBuff_Loop
}
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
/varset MobDebuffed TRUE
/varset DebuffCount 0
/return
}
}

:DebuffEnd
/varset MobDebuffed TRUE
/varset DebuffCount 0
/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
/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
/call Cast ${conc} item
}
}

/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} gem9 5s
/if (${Bool[${Me.Buff["Ether Shield"]}]}==FALSE) /call Cast ${Spellshield} gem6 12s
/if (${Bool[${Me.Buff["${Familiar}"]}]}==FALSE) /aa act Familiar
/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} gem8 6s

/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

| ######################################################################################################

Sub Event_Fire

/varset Familiar Ro's Greater Familiar
/varset Spellmainnuke "White Fire"
/varset Spellquicknuke "Spark of Fire"
/call DropFlappy
/call MemSpells
/call SingleBuffs
/return

| ######################################################################################################

Sub Event_Cold

/varset Familiar Eci's Greater Familiar
/varset Spellmainnuke "Gelidin Comet"
/varset Spellquicknuke "Spark of Ice"
/call DropFlappy
/call MemSpells
/call SingleBuffs
/return

| ######################################################################################################

Sub Event_Magic

/varset Familiar Druzzil's Greater Familiar
/varset Spellmainnuke "Thundaka"
/varset Spellquicknuke "Spark of Lightning"
/call DropFlappy
/call MemSpells
/call SingleBuffs
/return

| ######################################################################################################

Sub Event_Main

/varset Familiar Devoted Familiar
|/varset Spellmainnuke
|/varset Spellquicknuke
/call DropFlappy
/call MemSpells
/call SingleBuffs
/return

| ######################################################################################################

Sub Event_NewMA

/varset M_Assist ${Target.CleanName}
/echo Assist set to ${M_Assist}
/return

| ######################################################################################################

Sub Event_SnareAt(string Line, string Command, string Command2)

/varset SnareAt ${Command2}
/return

| ######################################################################################################

Sub Event_QuickNukeAt(string Line, string Command, string Command2)

/varset QuickNukeAt ${Command2}
/return

| ######################################################################################################

Sub Event_MainNukeAt(string Line, string Command, string Command2)

/varset MainNukeAt ${Command2}
/return

| ######################################################################################################

Sub DropFlappy

/if (${Me.Buff[Devoted Familiar].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Devoted Familiar].ID}-1].Int} leftmouseup
/if (${Me.Buff[Druzzil's Greater Familiar].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Druzzil's Greater Familiar].ID}-1].Int} leftmouseup
/if (${Me.Buff[Eci's Greater Familiar].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Eci's Greater Familiar].ID}-1].Int} leftmouseup
/if (${Me.Buff[Ro's Greater Familiar].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Ro's Greater Familiar].ID}-1].Int} leftmouseup

/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

| ###############################

Sub Event_Chat(string ChatType,string ChatSender,string ChatText)

/if (!${ChatType.Equal[TELL]}) /return

/if (${ChatText.Equal[mainnuke]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast ${Spellmainnuke} gem3 6s
}
/return
}

/if (${ChatText.Equal[quicknuke]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast ${Spellquicknuke} gem2 3s
}
/return
}

/if (${ChatText.Equal[invis]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/call cast ${SpellInvis} gem3 5s
}
/return
}

/if (${ChatText.Equal[punt]}) {
/target ${ChatSender}
/delay 5
/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
/call cast ${Spelltl} gem8 6s
}
/return
}

/if (${ChatText.Equal[stun]}) {
/assist ${ChatSender}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) {
/call cast ${SpellStun2} gem5 3s
}
/return
}

/if (${ChatText.Equal[evac]} && ${ChatSender.Equal[ChatController]) {
/if (${Me.AltAbilityReady["Exodus"]}) {
/aa act Exodus
/return
} else {
/gsay exodus down ><
/return
}
}

/if (${ChatText.Equal[Follow me]}) {
/delay 5
/if (!${Spawn[${ChatSender}].ID}) {
/e ${ChatSender} is not in zone for me to follow!
/return
}
/varset follname ${ChatSender}
/varset following 1
:targetfoll
/target pc ${follname}
/delay 1s ${Target.Name.Equal[${follname}]}
/if (${Target.Name.Equal[${follname}]}) {
/goto :Loop
} else /goto :targetfoll
:Loop
/face fast
/if (${Target.Distance}>10) /keypress forward hold
/if (${Target.Distance}<9) /keypress back
/if (!${Target.ID}) /varset following 0
/doevents
/if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) {
/goto :Loop
} else {
/keypress forward
/keypress back
}
/return
}

/if (${ChatText.Equal[End follow]}) {
/varset following 0
/keypress forward
/keypress back
/clean
/timed 50 /face pc ${follname}
/tell ${ChatSender} I Stopped following you!!!
/return
}

/if (${ChatType.Equal[TELL]}) {
/1 [${ChatSender}]:${ChatText}
/vtell ${ChatController} 001
/return
}

/return

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Jul 13, 2009 3:27 am

Where did you get this macro? Don't you think that would be a good place to ask for help?

Were there any instructions or other files with this macro?

When you ask about "some sort of problem", you will get some sort of answer.

Specificity, it's not just a big word.

Spanklin
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Jul 13, 2009 1:32 am

Post by Spanklin » Mon Jul 13, 2009 3:50 am

http://macroquest2.com/phpBB2/viewtopic.php?t=10218 is where I found the macro, it seems like an old topic so I thought i'd post the question here. When I type /mac wiz it says

DoCommand - Couldn't Parse '//TODO: add macro code here'
Spell_routines.inc@5 (Main): //TODO: add macro code here
The current macro has ended.

This is the first macro I have tried to use, i honestly just really want a macro I can turn on and it will assist who i want it to in a group, if you have any recommendations or anyway of helping me it'd be so appreciated. BTW i do not plan to abuse this type of thing..will always be near comp when macroing :P

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Jul 13, 2009 2:11 pm

Find the right spell_routines.inc...

User avatar
gse7en
a hill giant
a hill giant
Posts: 262
Joined: Mon Oct 17, 2005 8:19 pm
Contact:

Re: Help with Wiz macro

Post by gse7en » Wed Jul 20, 2011 11:26 am

Better idea:

Step 1: Get VIP access to the MQ2 forums (I recommend a donation of $3000* to start, with weekly donations of no less than $250** like the rest of us)
Step 2: Download Autobot.mac and all its dependancies.
Step 3: Read the wiki on Autobot and also on all its dependancies. Repeat step 3
Step 4: Run it, tweek it, run it, tweek it, repeat ad nauseam, go back to step 3
Step 5: ???
Step 6: Profit

*$10 works, too, if you can't afford $3000, though if you can, please donate $3000.
**Not required, but it is in good taste.

User avatar
Synicasm
Custom Builder
Custom Builder
Posts: 132
Joined: Fri Apr 23, 2004 6:34 pm

Re: Help with Wiz macro

Post by Synicasm » Wed Jul 20, 2011 1:04 pm

Gosh I hope they would of figured it out by now.. its been 2 years :lol:

Funny reply anywho !
So Many Days, So Many Macro's, So much research, Its a wonder I have time to play.

User avatar
gse7en
a hill giant
a hill giant
Posts: 262
Joined: Mon Oct 17, 2005 8:19 pm
Contact:

Re: Help with Wiz macro

Post by gse7en » Wed Jul 20, 2011 1:07 pm

Synicasm wrote:Gosh I hope they would of figured it out by now.. its been 2 years :lol:

Funny reply anywho !
I REALLY need to start date checking my shit ><

BUT my answer is still true today.