Page 1 of 1
canny.mac
Posted: Sun May 09, 2004 4:59 pm
by Soultrapper
Requires
spellcast.inc
Code: Select all
| canny.mac
| Version 1.1
| Written by Soultrapper
| Some code sniplets borrowed from GenBot [LordGiddion]
| Edited 05/13/04 - removed the timers, thanks to Skye and Chill for suggestions
| Spell names for sHoTSpell and sCanniSpell may have to be changed depending on the level of the shaman
#include spellcast.inc
sub Main
/declare CanniSpell string outer "Cannibalize IV"
/declare sHoTSpell string outer "Quiescence"
:MainLoop
/if (${Me.PctHPs}<=70 && !${Me.Buff[${sHoTSpell}].Duration}) {
| /echo "Casting ${sHoTSpell}"
/target myself
/call Cast ${sHoTSpell}
}
/if (${Me.PctMana}>98) {
/echo "mana good, exiting"
/return
}
/call CheckCann
/goto :MainLoop
/return
Sub CheckCann
/if (!${Me.Moving}) {
/if (${Me.AltAbilityReady["Cannibalization"]} && ${Me.PctMana}<75 && ${Me.CurrentHPs}>2900) {
:cani5
| /echo "AA Cani 5"
/call cast ${AltAbility["Cannibalization"].ID} activate
/return 5
} else {
/if (${Me.PctMana}<=98) {
/if (${Me.PctHPs}>=40) {
:cani4
| /echo "Casting ${CanniSpell}"
/call Cast ${CanniSpell}
/return 4
}
}
}
}
/return
Posted: Sun May 09, 2004 6:46 pm
by wilso132
You'll also need to change ${Me.CurrentHPs}>2900 depending on how low you want your hp to get.
Posted: Mon May 10, 2004 10:29 pm
by Skye
Just as a point of reference, you can make use of:
Code: Select all
${Me.AltAbilityTimer[Cannibalization]}
and:
Code: Select all
/alt activate ${AltAbility[Cannibalization].ID}
and:
Code: Select all
${AltAbility[Cannibalization].Spell.CastTime}
to remove timers and other "magic numbers" from this macro.
Posted: Tue May 11, 2004 11:06 am
by Chill
using the same ideas as Skye, here is a sample macro I suggested for someone else:
Code: Select all
#include spellcast.inc
sub Main
/declare CanniSpell string outer "Cannibalize IV"
:MainLoop
/if (${Me.PctHPs}<=80 && !${Me.Buff["Quiescence"].Duration}) {
/echo "Casting Quiescence"
/target myself
/call Cast "Quiescence"
}
/if (${Me.PctMana}>97) {
/echo "mana good, exiting"
/return
}
/call CheckCann
/goto :MainLoop
/return
Sub CheckCann
/if (!${Me.Moving}) {
/if (${Me.AbilityReady["Cannabalization"]}) {
/if (${Me.PctMana}<80) {
/if (${Me.CurrentHPs}>2900)) {
:cani5
/echo "AA Cani 5"
/call cast "47" activate
/return 5
}
}
}
/else {
/if (${Me.PctMana}<97) {
/if (${Me.PctHPs}>=40) {
:cani4
/echo "Casting " & ${CanniSpell}
/call Cast ${CanniSpell}
/return 4
}
}
}
}
You can add in checks for your elixers again if you wish, but this should do away with the need for timer variables and events.
other basic change is that I broke out the big compound if statement into nested if statements.
Posted: Thu May 13, 2004 5:09 am
by Soultrapper
Will ${Me.AltAbilityReady["Cannibalization"]} take care of the case if the shaman doesn't have Canny 5? I would assume it does, since I'm guessin it will return NULL ie false. In this case this is just perfect, I put an extra boolean in my old code that I was gonna post as an update wheter to use Canny 5 or not, but this is a much nicer solution in that case.
Chill, can't bust up the if codes like that, at least not for the Canny 5 condition, so had to put them back together. If you're over 80% mana (in your code, or 70% in mine) and Canny 5 AA just happens to pop, the code will just "hang". It won't enter into the canny 5 condition, nor the canny 4 one.
Oh I almost forgot, Wilso, the 2900 I put in there as a "magic number" figuring ~1k hps should be enough to avoid blood aggro, but guess you're right, if someone feels that's not enought, or too much, that could be changed as well.
Posted: Fri May 14, 2004 12:57 pm
by shuttle
Nicely done Soultrapper
shuttle
Posted: Wed Jun 30, 2004 8:23 pm
by aChallenged1
Does this just cast canni over and over, or does it do a "proper" canni dance? EG. Sit and watch mana tick up and at that moment stand and cast canni and sit again until next mana tick up?
Not so important if over lvl 60 with canni 4, but noticiable difference in the lower end.
Posted: Fri Jul 02, 2004 7:58 pm
by Chill
My shammy only up to 35 but thinking ahead.
How does this look Soultrapper?
-Added couple more variables for easier personalization
-Adjusted the canni check logic
-Added an optional "cani dance" paramater to make the macro sit between casts and wait for mana to "tic up". Default is off.
-Added a couple checks to exit early if you change your target
Code: Select all
|cani.mac: a simple cani macro
|usage: /mac cani [sit]
#include spellcast.inc
sub Main
/declare CanniSpell string outer "Cannibalize IV"
/declare HealSpell string outer "Quiescence"
/declare MinHP int outer 2900
/declare HealHP int outer 80
/declare C5Mana int outer 80
/declare MaxMana int outer 97
/declare SitStand int outer 0
/declare MyMana int outer
/if (${Param0.Equal[sit]}) /varset SitStand 1
/target myself
:MainLoop
/if (${Target.ID}!=${Me.ID}) /return
/if (!${Me.Moving} && ${Me.PctHPs}<=${HealHP} && !${Me.Buff["${HealSpell}"].Duration}) {
/echo Casting ${HealSpell}
/call Cast "${HealSpell}"
}
/if (${Target.ID}!=${Me.ID}) /return
/if (!${Me.Sitting} && ${SitStand}) /sit
/varset MyMana ${Me.PctMana}
/if (${MyMana}>=${MaxMana}) {
/echo mana good, exiting
/return
}
/if (!${Me.Moving} && ${Me.CurrentHPs}>${MinHP}) {
/if (${Me.AbilityReady["Cannabalization"]} && ${MyMana}<${C5Mana}) {
/call cast "47" activate
} else /if (${MyMana}<${MaxMana}) {
/call Cast ${CanniSpell}
}
}
/if (${Target.ID}!=${Me.ID}) /return
/if (${SitStand}) {
/if (!${Me.Sitting}) /sit
/varset MyMana ${Me.PctMana}
/delay 6s ${MyMana}!=${Me.PctMana}
}
/goto :MainLoop
/return
(untested)
What you guys think?
Posted: Fri Jul 02, 2004 10:36 pm
by s16z
Instead of using a % level to heal at, use the heal amount, i.e. say your heal is 2k, then:
Code: Select all
/declare HealFor int outer 2000
... code here, till we get to ...
/if (${Math.Calc[${Me.MaxHPs}-${Me.CurrentHPs}]}>${HealFor}) {
/cast healing spell here.
Also throw in a check, like you did, for a duration type heal so you don't cast it over and over again.