Moderator: MacroQuest Developers
Code: Select all
/declare DotArray[1] string outer
/varset DotArray[1] "Your DoT Spell Here"
/declare timestotry outer 2
Code: Select all
/declare Dotpercent outer 80
Code: Select all
/declare DDArray[1] string outer
/varset DDArray[1] "Your DD Spell Here"
Code: Select all
/declare DDpercent outer 50
Code: Select all
Sub DoTs
/if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1) {
/if (${needmalo}==1 || ${needslow}==1 || ${needpower}==1) /return
}
/if (${Dotted}==0 && ${Target.PctHPs}<${Dotpercent}) {
/for g 1 to ${DotArray.Size}
/varset SpellName ${DotArray[${g}]}
/call DotTarget
| /varadd tried 0
/next g
/varset Dotted 1
}
/return
Code: Select all
Sub DD
/if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1 || ${dottoggle}==1) {
/if (${needmalo}==1 || ${needslow}==1 || ${needpower}==1 || ${Dotted}==0) /return
}
/if (${Target.PctHPs}<${DDpercent}) {
/for g 1 to ${DDArray.Size}
/varset SpellName ${DDArray[${g}]}
/varset wait4cast ${Math.Calc[${Spell[${SpellName}].MyCastTime}+${Spell[${SpellName}].RecastTime}+5].Int}
/call checkmana
/call sitstatus
/call cast ${SpellName} gem8 ${wait4cast}s
/if (${sitstatus}==1) /call standstatus
/if (${healertoggle}==1) /call Healer
/next g
}
/return
Code: Select all
Sub DoTs
/if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1) {
/if (${needmalo}==1 || ${needslow}==1 || ${needpower}==1) /return
}
/if (${Dotted}==0 && ${Target.PctHPs}<${Dotpercent}) {
/for g 1 to ${DotArray.Size}
/varset SpellName ${DotArray[${g}]}
/varset tried 0
/call DotTarget
| /varadd tried 0 || not sure if varadding here is good idea if using multiple dots
/next g
/varset Dotted 1
}
/return
Code: Select all
Sub DotTarget
/varset wait4cast ${Math.Calc[${Spell[${SpellName}].MyCastTime}+${Spell[${SpellName}].RecastTime}+5].Int}
:retrycast
/if (${timestotry}>${tried}) {
/echo This is Retry ${tried} out of ${timestotry}
/call checkmana
/call sitstatus
/call cast ${SpellName} gem5 ${wait4cast}s
/doevents
/if (${String[${Macro.Return}].Equal[CAST_RESISTED]}) {
/varadd tried 1
/if (${healertoggle}==1) /call Healer
/goto :retrycast
}
/if (${sitstatus}==1) /call standstatus
}
/return
It shouldnt matter whether your /varset is before or after the dottarget sub, all that does really is reset the tried variable to 0 for the next dot to use. /varadd 0 wouldnt do anything.. it would add 0 to the current tried count, which would add nothingrencro wrote:Cant log on and check today, and have work early tomorrow but dedpoet, might give this a try, not sure though..
This should declare the variable "tried" before the call to DotTarget.Code: Select all
Sub DoTs /if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1) { /if (${needmalo}==1 || ${needslow}==1 || ${needpower}==1) /return } /if (${Dotted}==0 && ${Target.PctHPs}<${Dotpercent}) { /for g 1 to ${DotArray.Size} /varset SpellName ${DotArray[${g}]} /varset tried 0 /call DotTarget | /varadd tried 0 || not sure if varadding here is good idea if using multiple dots /next g /varset Dotted 1 } /return
Then in DotTarget, for T/S'ing untill you get it going try:
Code: Select all
Sub DoTs
/if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1) {
/if (${needmalo}==1 || ${needslow}==1 || ${needpower}==1) /return
}
/if (${Dotted}==0 && ${Target.PctHPs}<${Dotpercent}) {
/for g 1 to ${DotArray.Size}
/varset SpellName ${DotArray[${g}]}
/call DotTarget
/varset tried 0
/next g
/varset Dotted 1
}
/return
Code: Select all
Sub Healer
/varset SpellName ${Healspell}
/varset wait4cast ${Math.Calc[${Spell[${SpellName}].MyCastTime}+${Spell[${SpellName}].RecastTime}+5].Int}
/for g 1 to ${Group}
/if (${Group[${g}].ID} && ${Group[${g}].PctHPs}<${healgrouppct}) {
/call checkmana
/if (${Me.PctHPs}<${HoTpercent}) /call Canni
/call sitstatus
/target PC ${Group[${g}]}
/if (${verbose}==1) /gsay ${HealGroupVerbosity}
/call Cast ${SpellName} Gem6 ${wait4cast}s
/if (${sitstatus}==1) /call standstatus
/keypress esc
/if (${battle}==1) /target ${targetarray[3]}
}
/next g
/for g 1 to ${Group}
/if (${Group[${g}].Pet.ID} && ${Group[${g}].Pet.PctHPs}<${healgrouppct}) {
/call checkmana
/call sitstatus
/target Pet ${Group[${g}].Pet}
/if (${verbose}==1) /gsay ${HealGroupVerbosity}
/call cast ${SpellName} gem2 ${wait4cast}s
/if (${sitstatus}==1) /call standstatus
/keypress esc
/if (${battle}==1) /target ${targetarray[3]}
}
/next g
/if (${Me.Pet.ID} && ${Me.Pet.PctHPs}<${healgrouppct}) {
/call checkmana
/call sitstatus
/target Pet ${Me.Pet}
/if (${verbose}==1) /gsay ${HealGroupVerbosity}
/call cast ${SpellName} gem2 ${wait4cast}s
/if (${sitstatus}==1) /call standstatus
/keypress esc
/if (${battle}==1) /target ${targetarray[3]}
}
/return
Code: Select all
/if (${verbose}==1 && ${Target.ID}==${targetarray[4]} && ${needmalo}==0 && ${Me.Gem[Malaisement]}) {
/gsay ${MaloVerbosity}
Code: Select all
Couldn't parse /varadd tried 1
@452 (DotTarget) /varadd tried 1
@436 (DoTs) /call DotTarget
@337 (battle) if ($(dottoggle)==1) /call dots
@297 (main) /call battle
Should bededpoet wrote: It seems to move on after it lands, but it's doesn't seem to try the correct number of times. It just recasts until it lands. I usually want that anyway, but I'd like to get rid of the error...
Any ideas what might be going on with that?Code: Select all
Couldn't parse /varadd tried 1 @452 (DotTarget) /varadd tried 1 @436 (DoTs) /call DotTarget @337 (battle) if ($(dottoggle)==1) /call dots @297 (main) /call battle
Code: Select all
/varset tried 0
/call DotTarget
Code: Select all
:battleloop
/call LoM
/if (${pettoggle}==1 && ${petsent}==0 && ${Target.PctHPs}<${sendpethp}) {
/pet attack
/varset petsent 1
}
/if (${healertoggle}==1) /call Healer
/if (${siting}==1 && !${Me.State.Equal[SIT]}) /sit
/if (${Me.Combat}) /attack off
/if (${malotoggle}==1 || ${slowtoggle}==1 || ${powertoggle}==1) /call DeBuffs
/if (${dottoggle}==1) /call DoTs
/if (${ddtoggle}==1) /call DD
| change the call CANNI to this..
/if (${slowtoggle}==1 && ${needslow}==0) {
/call canni
} else {
/if (${slowtoggle}==0) /call canni
}
| End cut and paste...
/if (!${Target.Name.Equal[${targetarray[3]}]} || !${Target.ID}) /goto :endbattle
/doevents
/goto :battleloop
Code: Select all
/call cast "Spear of Fate" item
Code: Select all
/declare DotArray[2] string outer
/varset DotArray[1] "Spear of Fate" item
/varset DotArray[2] "Rosrak's Greaves of the Primal" item
This would indeed work when you remove the "gem1-8" from the actual cast rutines, however when adding the word "item" after those variables, then you can no longer use that variable to find i.e. the casting time for the spell.dedpoet wrote:Code: Select all
/declare DotArray[2] string outer /varset DotArray[1] "Spear of Fate" item /varset DotArray[2] "Rosrak's Greaves of the Primal" item