Moderator: MacroQuest Developers

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.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
Code: Select all
[[i]TankName[/i]]
concs=2
