wiznuke.mac

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

eqg4m3r
decaying skeleton
decaying skeleton
Posts: 6
Joined: Mon Mar 01, 2004 12:34 pm

wiznuke.mac

Post by eqg4m3r » Fri Apr 09, 2004 1:26 am

The purpose of this macro is explained in the commentaries. Thanks to ashborzylwahn for helping with testing and debugging. It's the first one I wrote without stealing any code :twisted: so be gentle please.

Code: Select all

|** wiznuke.mac - by eqg4m3r and ashborzylwahn
	This macro is intended to have a wizard-bot running. After activation the macro will continue running until the mob dies.
	Should the character go below 80% mana harvest or harvest of druzzil will be activated. Upon incoming the wizard sword pet and,
	if up, the wizard-swarmpet-aa will be activated. The currently chosen spells are set for snare-kiting PoFire Picknick / Table / 
	C2 area (depending on what it's called on your server), but are easily exchangable. Should your wizard-bot not possess elemental
	leggins, simply exchange the Maelin's Leggins with the regular concussion spell.
	The bard/nobard option exists to regulate the mana-consumption of the character in a group. If you have a bard in your group 
	playing manasong, the spell icemeteor, which consumes more mana, will be casted as well. **|

Sub Main 
   /zapvar 
   /declare zZeit1 global
   /declare zZeit2 global
   /declare zZeit3 global
   /declare zZeit4 global
   /declare zZeit5 global
|--------------------------------   
   /if $defined(Param0)==FALSE { 
         /echo Syntax: "/macro wiznuke bard" or "/macro wiznuke nobard"
         /endmacro 
      } 
|--------------------------------
   
   /varcalc zZeit1 25+10*$spell("Ancient Destruction of Ice",casttime)
   /varcalc zZeit2 25+10*$spell("Ice Spear of Solist",casttime)
   /varcalc zZeit3 25+10*$spell("Ice Meteor",casttime)
   /varcalc zZeit4 25+20
   /varcalc zZeit5 25+10*$spell("Flaming Sword of Xuzl",casttime)
      
   
   /echo Xuzl's Fireblade --> $target(name,clean)
   /cast "Flaming Sword of Xuzl"
   /delay @zZeit5
   
   /echo Xuzl's-Breadknives --> $target(name,clean) IF UP!!
   /alt activate 208
   /delay 5
   /if $char(casting)==TRUE /delay 9s
   /if "@Param0"=="bard" {
   	/call bard
   	/end
   }
   /if "@Param0"=="nobard" {
   	/call nobard
   	/end
   }
/return 
|-------------------------------------------------------
Sub bard
   :NukeB
     /echo Ancient Destruction of Ice --> $target(name,clean)
     /cast "Ancient Destruction of Ice"
     /delay @zZeit1
     /if $target(name)=="NULL" {
         /echo Mob down
         /endmacro
       }
       
     /echo Ice Spear of Solist --> $target(name,clean)
     /cast "Ice Spear of Solist"
     /delay @zZeit2
     /if $target(name)=="NULL" {
         /echo Mob down
         /endmacro
       }
       
     /cast item "Maelin's Leggings of Lore"
     /delay @zZeit4
          /if $target(name)=="NULL" {
         /echo Mod down
         /endmacro
       }
       
     /echo Ice Meteor --> $target(name,clean)
     /cast "Ice Meteor"
     /delay @zZeit3
     /if $target(name)=="NULL" {
         /echo Mob down
         /endmacro
       }
       
     /cast item "Maelin's Leggings of Lore"
     /delay @zZeit4
     /if $target(name)=="NULL" {
         /echo Mob down
         /endmacro
       }
       
     /if n $char(mana,pct)<=80 {
       /echo Making masses of mana! (Harvest!)
       /cast "Harvest"
       /delay 5
       /if $char(casting)==TRUE /delay 23s
     }
     
     /if n $char(mana,pct)<=80 {
       /echo Making masses of mana! (Harvest of Druzzil)
       /alt activate 172
       /delay 5
       /if $char(casting)==TRUE /delay 13s
     }
     /if $target(name)=="NULL" {
            /echo Mod down
            /endmacro
            }
     /goto :NukeB     
/return
|------------------------------------------------------------------
Sub nobard
        :NukeNB
          /echo Ancient Destruction of Ice --> $target(name,clean)
          /cast "Ancient Destruction of Ice"
          /delay @zZeit1
          /if $target(name)=="NULL" {
              /echo Mob down
              /endmacro
            }
            
          /echo Ice Spear of Solist --> $target(name,clean)
          /cast "Ice Spear of Solist"
          /delay @zZeit2
          /if $target(name)=="NULL" {
              /echo Mob down
              /endmacro
            }
            
          /cast item "Maelin's Leggings of Lore"
          /delay @zZeit4
               /if $target(name)=="NULL" {
              /echo Mod down
              /endmacro
            }
            
         /if n $char(mana,pct)<=80 {
            /echo Making masses of mana! (Harvest!)
            /cast "Harvest"
            /delay 5
            /if $char(casting)==TRUE /delay 23s
          }
          
          /if n $char(mana,pct)<=80 {
            /echo Making masses of mana! (Harvest of Druzzil)
            /alt activate 172
            /delay 5
            /if $char(casting)==TRUE /delay 13s
          }
          /if $target(name)=="NULL" {
                 /echo Mod down
                 /endmacro
                 }
          /goto :NukeNB
 /return
Enjoy
Life is a game - play it... But play to win!

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

my version~

Post by Drunkensloth » Fri Apr 09, 2004 3:31 pm

highly specific wizard afknuke macro

designed to play your wizard in PoFire while afk...

very simple....
yet still effective
(updated to use MQ2Data)
will most likely be adding spellcasting such as epic or force sheild and familiar and harvests... but whatever

IT NEEDS SPELLCAST.INC (posted after)

tested this for about 72 hours or so in plane of fire... my group just thought i was really quite... add in whatever you want

special thanks to Gellenole for his archery macro, i liked the idea, and made it into a wizard~

Code: Select all

|----------------------------------------------------------------------------| 
#include SPELLCAST.inc
#Event SLAINBY  "You have been slain by " 
#Event EXP   "You gain " 

#turbo 380 

Sub Main 
   /ECHO  =+= Slothy's AutoNuke Macro Enabled =+= 
   /ECHO  =+= Version Realease: 0.1b =+= 
   /ECHO  =+= Usage:  /Macro AFNuke <Tank name> =+= 
|-----------------(Tank Declaration Flag=1)--------- 
   /declare tankname global 

|-----------------(Casting Flags=6)----------------- 
   /declare Casteagle_Flag global 
   /declare Castsot_Flag global 
   /declare Castsotp_Flag global 

|-----------------(Engage Flag=3)------------------- 
   /declare engagedistance global 
   /declare engagedmob global 
   /declare mobhealth global 

|-----------------(Experience Flags=11)------------- 
   /declare mobname global 

|-(Amount of flags have to equal Amount of variable) 
|----------------(Current Amount=21)---------------- 
|----------------(Variable Initialized)------------- 
   /varset engagedistance 300      | How close mob must be to engage 
   /varset mobhealth 93      | Mob health before engage 
   /varset tankname @Param0   | Assigns Param0 to variable 
   /varset engagedmob 0      | Flag to check if mob is engaged 
   /varset mobname 0 
   /varset Casteagle_Flag 0 
   /varset Castsotp_Flag 0 
   :Mainloop 
   /call Combatcheck 
   /doevents 
   /delay 1s 
   /goto :mainloop 
/return 

| --> This sub command is a switch to check for mob target 
| --> This sub command also checks for your own health 
Sub Combatcheck 
   /Echo Your Main Assist is @tankname 

   /if "@engagedmob==1" { 
      /assist @tankname 
      /call Nuke 
   } 

   /if "@engagedmob==0" /goto :stopfiring 
   :stopfiring 
   /doevents 
   /assist @tankname 
   /delay 5 
   /if $target(type)==NPC { 
      /Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
      /Echo ${Target.CleanName} is considered an ${Target.Race}
      /varset mobname ${Target.Name} 
      /face 
      /delay 3 
      /if n ${Target.PctHPs}<=@mobhealth /if n ${Target.Distance}<@engagedistance /goto :DoubleCheck 

      :DoubleCheck 
      /doevents 
      /delay 3 
      /if n ${Target.Distance}>@engagedistance /goto :stopfiring 
      /if n ${Target.PctHPs}>=@mobhealth /goto :stopfiring
      /if n ${Target.PctHPs}<=@mobhealth /if n ${Target.Distance}<@engagedistance /goto :fire 

      :fire 
      /doevents 
      /Echo Autofire Engaged at the distance of: $target(distance) 
      /varset engagedmob 1 
      /call Arrow 
   } 
    
   /if "${Target.Type}"!="NPC" { 
      /delay 5s 
      /varset engagedmob 0 
      /goto :stopfiring 
   } 

   /if "$target()"=="FALSE" { 
      /delay 5s 
      /varset engagedmob 0 
      /goto :stopfiring 
   } 

/return 

| --> Loop for arrows, and also adjusts for distance of mobs usually 
| --> This loop also checks for snaring the mob at 91% 
Sub Nuke 
   :nukeloop 
   /doevents 
   /keypress forward
   /if "${Target}"!="NULL" { 
      /face fast 

      /call Cast "Draught of E`ci"      |Change arrow button to your own 
   } 

   /if "${Target.Type}"!="NPC" { 
      /varset engagedmob 0 
      /delay 1s 
      /call Combatcheck 
   } 

   /if "${Target}"=="NULL" { 
      /varset engagedmob 0 
      /delay 1s 
      /call Combatcheck 
   } 

   /goto :nukeloop 
/return 




Sub Event_EXP 
   /varset mobname 0 
/return 

Sub Event_SLAINBY 
   /Echo You Died, macro over, so sad to see you go :(
   /q 
   /endmacro 
/return 
| --> End of Events 
| --> End of Macros

here is spellcast.inc

Code: Select all

|Plazmic + 1 line change by Imperfect 


|Oct 9, 2003 - Updated to work with new vars and $char(casting) - gf 
|Oct 11, 2003 - switched some logic, removed defines - gf 


#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." 

Sub Cast(SpellName) 
  /if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL 
  :StartCast 
  /call ClearReturnValue 
  /if n $char(gem,"@SpellName")<0 { 
     /delay 0 
     /goto :StartCast 
  } 
  /cast "@SpellName" 

  :WaitCast 
     /if "$char(casting)"=="TRUE" { 
       /delay 1 
       /goto :WaitCast 
     } 
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
     /if "$return"=="CAST_RESTART" /goto :StartCast 
     /if "$return"!="CAST_SUCCESS" /return "$return" 
/return CAST_SUCCESS 

Sub ClearReturnValue 
/return CAST_SUCCESS 

Sub Event_Fizzle 
/return CAST_RESTART 

Sub Event_Interrupt 
/return CAST_RESTART 

Sub Event_Recover 
   /delay 5 
/return CAST_RESTART 

Sub Event_Standing 
   /stand 
/return CAST_RESTART 

Sub Event_Collapse 
/return CAST_RESTART 

Sub Event_OutOfMana 
/return CAST_OUTOFMANA 

Sub Event_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
/return CAST_STUNNED 

Sub Event_Resisted 
/return CAST_RESISTED 
And here I was clicking like a sucker!

zosmatix
decaying skeleton
decaying skeleton
Posts: 7
Joined: Tue Jan 20, 2004 10:12 am

Post by zosmatix » Thu Apr 22, 2004 7:18 am

Thanks alot for this macro, it works really well. :)
Rewrote to work with the /newif command..

Code: Select all

|----------------------------------------------------------------------------|
#include SPELLCAST.inc 
#Event SLAINBY  "You have been slain by " 
#Event EXP   "You gain " 

#turbo 380 

Sub Main 
   /ECHO  =+= Slothy's AutoNuke Macro Enabled =+= 
   /ECHO  =+= Version Realease: 0.1b =+=
   /ECHO  =+= Usage:  /Macro AFNuke <Tank name> =+= 
|-----------------(Tank Declaration Flag=1)--------- 
   /declare tankname global 

|-----------------(Casting Flags=6)----------------- 
   /declare Casteagle_Flag global 
   /declare Castsot_Flag global 
   /declare Castsotp_Flag global 

|-----------------(Engage Flag=3)------------------- 
   /declare engagedistance global 
   /declare engagedmob global 
   /declare mobhealth global 

|-----------------(Experience Flags=11)------------- 
   /declare mobname global

|-(Amount of flags have to equal Amount of variable) 
|----------------(Current Amount=21)---------------- 
|----------------(Variable Initialized)------------- 
   /varset engagedistance 300      | How close mob must be to engage 
   /varset mobhealth 90      | Mob health before engage
   /varset tankname @Param0   | Assigns Param0 to variable
   /varset engagedmob 0      | Flag to check if mob is engaged
   /varset mobname 0
   /varset Casteagle_Flag 0
   /varset Castsotp_Flag 0 
   :Mainloop 
   /call Combatcheck 
   /doevents 
   /delay 1s 
   /goto :mainloop 
/return 

| --> This sub command is a switch to check for mob target
| --> This sub command also checks for your own health
Sub Combatcheck
   /Echo Your Main Assist is @tankname

   /if (@engagedmob==1) {
      /assist @tankname
      /call Nuke
   }

   /if (@engagedmob==0) /goto :stopfiring
   :stopfiring
   /doevents
   /assist @tankname
   /delay 5
   /if (${Target.Type.Equal[NPC]}) {
      /Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
      /Echo ${Target.CleanName} is considered an ${Target.Race}
      /varset mobname ${Target.Name}
      /face
      /delay 3
      /if (${Target.PctHPs}<=@mobhealth) /if (${Target.Distance}<@engagedistance) /goto :DoubleCheck

      :DoubleCheck
      /doevents
      /delay 3
      /if (${Target.Distance}>@engagedistance) /goto :stopfiring
      /if (${Target.PctHPs}>=@mobhealth) /goto :stopfiring
      /if (${Target.PctHPs}<=@mobhealth) /if (${Target.Distance}<@engagedistance) /goto :fire

      :fire
      /doevents
      /Echo Autofire Engaged at the distance of: ${Target.Distance}
      /varset engagedmob 1
      /call nuke
   }

   /if (${Target.Type.NotEqual[NPC]}) {
      /delay 5s 
      /varset engagedmob 0 
      /goto :stopfiring 
   } 

   /if (${Target.Type.Equal[NULL]}) {
      /delay 5s 
      /varset engagedmob 0 
      /goto :stopfiring 
   } 

/return 

| --> Loop for arrows, and also adjusts for distance of mobs usually 
| --> This loop also checks for snaring the mob at 91% 
Sub Nuke 
   :nukeloop 
   /doevents 
   /keypress forward 
   /if (${Target.Type.NotEqual[NULL]}) {
      /face fast 

      /call Cast "Draught of E`ci"      |Change arrow button to your own
   } 

   /if (${Target.Type.NotEqual[NPC]}) {
      /varset engagedmob 0
      /delay 1s
      /call Combatcheck
   }

   /if (${Target.Type.Equal[NULL]}) {
      /varset engagedmob 0 
      /delay 1s 
      /call Combatcheck 
   }

   /goto :nukeloop 
/return 




Sub Event_EXP 
   /varset mobname 0 
/return 

Sub Event_SLAINBY 
   /Echo You Died, macro over, so sad to see you go  
   /q 
   /endmacro 
/return 
| --> End of Events 
| --> End of Macros

TRex
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Apr 19, 2004 6:14 am

Post by TRex » Thu Apr 29, 2004 10:49 am

Any updates on this, having a hard time tracking down where either of these examples fail.

lullimarka
orc pawn
orc pawn
Posts: 21
Joined: Mon Nov 18, 2002 8:48 am

Post by lullimarka » Tue May 04, 2004 5:44 pm

can anyone help fix the pofire one plz ?