Thanks
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
/endmacro
/return
| --> End of Events
| --> End of Macros

