I was hopeing for some input on this snippet, because while it works, since this is my first major macro that I have written I know I'm doing things poorly.
Note that this used the spell_routines.inc file. Also note that this test snippet is made to loop forever for testing purposes *obvious*.
Oh, and this is for a necromancer.
Code: Select all
#turbo
#include spell_routines.inc
Sub Main
|==================================
| VARIABLES
|==================================
/declare JUGGKILLS int outer 0
/declare PET_HASTE_TIMER timer outer 105s
/declare DMF_TIMER timer outer 420s
/declare LICH_ON bool outer false
/declare TARGETFOUND bool outer false
/declare STARTXP float outer
/declare Exper float outer
/declare AAExp float outer
/varset STARTXP ${Me.PctExp}
/varset Exper ${Me.PctExp}
/varset AAExp ${Me.PctAAExp}
|[======================= MAIN LOOP ========================]
:MAINLOOP
/popup ENTERING BUFF PHASE
/target Myself
| LOAD BUFF SPELL SET
/memspellset BUFFS
/echo Spellset BUFFS should be loading now!
/delay 20s
/doevents
| Check pet health. Let pet heal to full
/if (${Me.Pet.PctHPs}<100) {
:WaitForPetToHeal
/if (${Me.Pet.PctHPs}<100) /goto :WaitForPetToHeal
}
/echo "Pet at full health"
| Check PC health. If lower than 70 turn off lich,
| sit and rest the good old fashoned way to 100
| (Wish I had HEB)
/if (${Me.PctHPs}<70) {
| Turn off Lich NOW
/declare i int local
/for i 1 to 15
/if ( ${Me.Buff[${i}].Name.Find[Seduct]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup
/next i
/varset LICH_ON 0
/if (${Me.State.Equal["STAND"]}) {
/delay 1s
/sit
/deletevar i
}
/Echo I better be sittign now, damnit
|Loop until I'm at 100
:SittingForHealth
/if (${Me.PctHPs}<100) /goto :SittingForHealth
}
| Recast DMF if timer < 4 minutes
/if (${DMF_TIMER} < 2400) {
/call cast "Dead Man Floating" gem6 20s
/delay 7s
/call cast "Shield of Maelin" gem2 20s
/delay 7s
/varset DMF_TIMER 4200s
}
/echo DMF TIMER: ${DMF_TIMER}
/echo PET HASTE TIMER: ${PET_HASTE_TIMER}
| Recast Pet Haste < 4 minutes
/if (${PET_HASTE_TIMER} < 2400) {
/call cast "Rune of Death" gem8 20s
/delay 7s
/varset PET_HASTE_TIMER 1050s
}
| Check Mana. If less than 70 mana, then med wait until 70.
/if (${Me.PctMana}<70) {
/if (${Me.State.Equal["STAND"]}) {
/delay 1s
/sit
}
|Loop until I'm at 70
:MeddingForMana
/if (${Me.PctMana}<70) /goto :MeddingForMana
}
| Recast Lich if LICH_ON is false, we should be at full health again, yay
/if (${LICH_ON} == 0) /call cast "Seduction of Saryrn" gem3 20s
/varset LICH_ON 1
| LOAD COMBAT SPELLSET
/memspellset SEB
/doevents
/delay 20s
/goto :MAINLOOP
/return
|[===================== END MAIN LOOP ======================]
Any feedback would be appreciated, including telling me to RTFM again because I suck so badly.

