"lazy wizard" macro

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

seanno

"lazy wizard" macro

Post by seanno » Tue Nov 18, 2003 8:42 am

What I'd like is a macro that will use an ini file to take a certain number of concussions, and a certain delay inbetween castings of nukes

so for example
nuke
delay
nuke
conc
conc
nuke
delay

etc

until the mob dies, this way a wizard can be set on autopilot for long fights(ahr). the reason I'd like to use an ini file to store the amount of concussions to due to the fact that every MT is differently geared and requires a different pattern.

CircuitFlux
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Dec 20, 2003 3:49 pm

Post by CircuitFlux » Sat Dec 20, 2003 4:03 pm

LOL, I just got done fixing up one :P

Code: Select all

|Lazy raid wizard v0.5 BETA, by Fsck 
|Edited and revised by Circuit Flux(to v0.3) 
|This uses an ini file to store your tanks names and how many concussions to use for each 
|one. Additionally it will Harvest when required. 
|It will not work with 100% MR mobs(MM, Emp, Seru) because concussion is resisted. 
|pre-use edit the provided ini file to contain your tanks' names and the amount of 
|concussions to use per nuke for each tank(be generous the first few times.) 
|with v0.5 this macro will now automatically autoposition you after a gflux. This only works in VT 
|it will automatically position further if you are killing Aten Ha Ra(avoid silence) 
| 
|REQUIRES My customised Plazmic's Spellcast.inc in your macro directory. 
|HARVEST OF DRUZZIL MUST BE IN HOTKEY 8 
| 
|To use /macro LazyRaid.mac <your tank's name> 
|v0.6 will contain the ability to change nukes on the fly. 

#include spellcast.inc 
#include routines.mac 
#turbo 75 
  
#event OOM "Insufficient Mana to cast this spell" 
#event Fluxed "A massive force knocks you into the air" 

Sub main 

| --- Global Variable declares --- 
  
/declare tankname global 
| tanks name to assist 
  
/declare nukename global 
| Name of nuke to use 
  
/declare concs global 
| number of concussions needed per nuke 
  
/declare concnumber global 
| number of concs cast 
  
/declare mobhp global 
| mob hp % for comparison 
  
/declare tempvar global 
| temp variable for misc uses 
  
/declare assisthealth global 
| safe health to start nuking 

/declare chain global 
| Chain nuke health marker. 

| --- Variable setting --- 

/echo "{LRW} Lazy Raid Wizard v0.5 BETA Starting" 
/varset chain 20 
/varset assisthealth 98 
/varset tankname @Param0 
/varset nukename Ice Meteor  
/varset concs $ini(tanks.ini,@tankname,concs) 
/echo "@tankname is assist tank. using @concs concussions per nuke, chain nuking will begin at @chain%" 
/varset tempvar 0 
/if n @sneakhide==1 { 
/doability "Sneak" 
/doability "Hide" 
} 
/goto :top 
/goto :nuke 
/return 


| ---Target Checks and Assist--- 

:top 
/assist @tankname 
/delay 10 
/if "$target()"=="FALSE" { 
/target @tankname 
/goto :top 
} 
/if "$target(type)"!="NPC" { 
/goto :top 
} 
/if n @tempvar!="$target(hp,pct)" /echo {LRW} $target(name,clean) targeted at $target(hp,pct)% at distance $target(distance). 
/varset tempvar "$target(hp,pct)" 

/if n "@mobhp">="@assisthealth" { 
/goto :top 
} else { 
/echo {LRW} Target Acquired: $target(name,clean) 
/cast item "Staff of Temperate Flux" 
/delay 3s 
/echo {LRW} Waiting for aggro to be established 
/goto :nuke 
} 

| ---Nuking--- 

/goto :top 

:nuke 
/doevents flush 
/if "$target(type)"=="NPC" { 
/echo {LRW} Nuking $target(name,clean). It is a level $target(level) $target(race). 
/call Cast "Ice Meteor" 
/varset concnumber 0 
/doevents 
/goto :concussion 
} 
/return 

| ---Chain Nuking Sub--- 

/goto :top 

:chain 
/doevents flush 
/if "$target(type)"=="NPC" { 
/echo {LRW} Nuking $target(name,clean). It is a level $target(level) $target(race). 
/call Cast "Ice Meteor" 
/doevents 
/goto :chain 
} 
/return 

| ---Concussioning--- 

:concussion 
/call Cast "Concussion" 
/doevents 
/varadd concnumber 1 
/if n "@mobhp"<="@chain" { /goto :chain /echo CHAIN NUKES STARTING } 
/if n "@concnumber"=="@concs" /goto :nuke 
/if n "@concnumber"!="@concs" /goto :concussion 

/goto :top 

| ---Out Of Mana Event and Commands--- 

Sub Event_OOM 

/echo {LRW} Out of Mana, Casting Harvest. 
/call Cast "Harvest"  
/echo {LRW} Harvest Cast, Casting Harvest of Druzzil 
/press 8 
/echo {LRW} Harvest and Harvest of Druzzil done. Casting Modrod. 
/cast item "Rod of Mystical Transvergance" 
/goto :nuke 
/return 

| ---Flux Event and Movement Calls--- 

Sub Event_Fluxed 
/echo {LRW} Fluxed by $target(name,clean) Repositioning. 
/if "$target(name,clean)"=="Aten Ha Ra" { 
/call movetotarg(100) 
} else { 
/call movetotarg(20) 
} 
/return 

| ---Autorun Sub--- 

Sub AutoRun 
   /if @Param0==1 /sendkey down up 
   /if @Param0==0 /sendkey up up 
/return 

| ---Movement Subs for Flux(VT ONLY) mobs--- 

Sub movetotarg(distance) 
  /declare MyXLOC local 
  /declare MyYLOC local 
  /declare ObstCount local 

  /varset MyXLOC $char(x) 
  /varset MyYLOC $char(y) 
  /varset ObstCount 0 
  /face 
  :mobloop 
  /if n $target(distance)>=@distance { 
    /call autorun 1 
    /face 
    /varadd ObstCount 1 
    /if n @ObstCount>=3 { 
      /if n @MyXLOC==$char(x) /if n @MyYLOC==$char(y) { 
          /sendkey up up 
          /sendkey down down 
          /if n $rand(99)>50 { 
            /delay 1s 
            /sendkey up down 
            /sendkey down Right 
            /delay 5 
            /sendkey up Right 
            /sendkey down up 
            /delay 1s 
            /sendkey up up 
          } else { 
            /delay 1s 
            /sendkey up down 
            /sendkey down left 
            /delay 5 
            /sendkey up left 
            /sendkey down up 
            /delay 1s 
            /sendkey up up        
         } 
        
         /sendkey up down 
         /sendkey up Right 
         /sendkey up Left          
     } 
     /varset MyXLOC $char(x) 
     /varset MyYLOC $char(y) 
     /varset ObstCount 0 
    }  
    
  /goto :mobloop 
  } 
  /call autorun 0 
  /goto :nuke 
  /return 


|end of LazyRaid.mac 
| ---CHANGELOG--- 
|v0.1 - original version 
|v0.2 - Added OOM and fizzle events 
|v0.3 - fixed INI file reading 
|v0.4 - Removed fizzle events, now using Plazmic's Spellcast.inc for fizzle handling 
|v0.5 - Used code from driftinsupra as a base for movement subs. Added {LRW} tag because I felt like it.
and you will need this file as well named Spellcast.inc

Code: Select all

|This is Plazmic's code, slightly edited to support Fsck's LazyRaid.mac 
#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 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 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_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
/return CAST_STUNNED 

Sub Event_Resisted 
/return CAST_RESISTED 
and an INI file to keep your tanks names and such in this format
tank.ini

Code: Select all

[[i]TankName[/i]] 
concs=2 
should help out :)

se7en
orc pawn
orc pawn
Posts: 21
Joined: Sun Dec 14, 2003 6:51 pm

Post by se7en » Wed Dec 31, 2003 11:38 pm

just thought i'd mention that concussion works 100% regardless of its resisted or not :)

Nice script, going to modify it to use ele legs and im set ;) Thanks!

CircuitFlux
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Dec 20, 2003 3:49 pm

Post by CircuitFlux » Thu Jan 01, 2004 2:51 pm

:)

Yalp
a ghoul
a ghoul
Posts: 90
Joined: Thu Dec 05, 2002 6:28 pm

Concussion

Post by Yalp » Wed Jan 07, 2004 2:28 am

Regular Concussion and Ancient: Greater Concussion still work if resisted, se7en is correct

:P
Because i wouldn't have it any other way

Fsck
orc pawn
orc pawn
Posts: 18
Joined: Wed Nov 19, 2003 2:25 am

Post by Fsck » Wed Jan 07, 2004 7:34 am

as to concussion working when resisted, I don't belive that, the tests done at graffe's say otherwise. I'll probably but that into macro depot after i'm done revising the movement subs.
Last edited by Fsck on Sat Jan 10, 2004 11:22 am, edited 1 time in total.

CircuitFlux
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Dec 20, 2003 3:49 pm

Post by CircuitFlux » Wed Jan 07, 2004 2:48 pm

I know :P I realised after I posted it that you had a toon named ****** :P
Last edited by CircuitFlux on Wed Jan 07, 2004 9:49 pm, edited 1 time in total.

battaile
Contributing Member
Contributing Member
Posts: 40
Joined: Tue Dec 09, 2003 10:55 am

Post by battaile » Wed Jan 07, 2004 6:11 pm

That might be info you dont want posted on this board. :)