How do u check to see if the mob already has a debuff? For example, i want to make a holy that snares. Thx in advance.
sub main
/declare LastTarget int local 0
/while (1) {
/if ( ${Target.ID}!=${LastTarget}) {
/varset LastTarget ${Target.ID}
|-- Put your logic here.
/if (${Target.ID} && ${Target.Level}>${Me.Level} && ${Me.Combat} && ${Target.PctHPs}>=99) {
| do something
/delay 5
| do 2nd thing
/delay 5
| do last thing
}
}
/return
Thank you for the input! Looks like I have both some thinking to do and some research!Esadair:
MQ2Melee was an amazing plugin that was ahead of its time with respect to getting characters to perform many combat specific abilities.
The Holy/Downshits offer some customization but they are not really good for general purpose logic.
Its been a while since I did a deep dive on using MQ2Melee but from what I recall, the MQ2Melee framework will evaluate the next holy/downshit in the list. If your game client is running at 30 fps then it will take 1 full second to process 30 shits. When all shits are processed it then restarts at the beginning of the loop.
Lets say you have a single holyshit:
holyshit1=/disc "throw stone"
Assuming my client is running at 30 fps, when I am in combat MQ2Melee would execute:
/disc "throw stone"
/disc "throw stone"
/disc "throw stone"
/disc "throw stone"
over and over once every frame.
This is why you have to wrap your shits with " /if (condition) do something" type blocks.
In your case you are spamming the client with :
/if (${Target.ID} && ${Target.Level}>${Me.Level} && ${Me.Combat} && ${Target.PctHPs}>=99) /multiline ; /do one thing ; /timed 5 ; /do the second thing ; /timed 5 ; /do the last thing
over and over and over ...
---------------------------------------------------------------------
Your best bet is to write your logic either in a macro or lua script. If you absolutely don't want to go that route then you *CAN* force the code to be done in a shit but its really not pretty.
Code:sub main /declare LastTarget int local 0 /while (1) { /if ( ${Target.ID}!=${LastTarget}) { /varset LastTarget ${Target.ID} |-- Put your logic here. /if (${Target.ID} && ${Target.Level}>${Me.Level} && ${Me.Combat} && ${Target.PctHPs}>=99) { | do something /delay 5 | do 2nd thing /delay 5 | do last thing } } /return
Now if I was REALLY determined to make this into something that run as a holy shit ( which is a really really bad idea ) you would need to convert each part of the macro:
Holyshit1=/if (!${Defined[LastTarget]}) /declare LastTarget global 0
Holyshit2=/if (${Target.ID}!=${LastTarget}&&${Target.ID}) ____ monsterously long /multiline.
unfortunately neither of those work eitherholyshit1=/if ( ${Melee.Combat} && ${Me.CombatAbilityReady[Knifeplay Discipline Rk. II]} && ${Bool[!${Me.ActiveDisc}]} && !${Me.Song[Rogue's Fury].ID}) /disc "${Me.CombatAbility[Knifeplay Discipline].RankName}"
or maybe
holyshit1=/if (${Melee.Combat} && ${Window[CombatAbilityWnd].Child[CAW_CombatEffectLabel].Text.Equal[No Effect]} && ${Me.CombatAbilityReady[Knifeplay Discipline Rk. II]} && ${Me.CombatAbility[Knifeplay Discipline Rk. II].Stacks} /disc Knifeplay Discipline Rk. II
Trying to create a HS to cast Knifeplay Discipline for a rogue. But it doesn't stack with Rogue's Fury. Doesn't seem to work with what i came up with.. any suggestions?
holyshit1=/if (${Melee.Combat} && ${Window[CombatAbilityWnd].Child[CAW_CombatEffectLabel].Text.Equal[No Effect]} && ${Me.CombatAbilityReady[Knifeplay Discipline Rk. II]} && ${Spell[Knifeplay Discipline Rk. II].Stacks} /disc Knifeplay Discipline Rk. II
downshit2=/if (${Spell[Familiar: Fungal Shreiker Spore].Stacks} && !${Me.Buff[Familiar: Fungal Shrieker Spore].ID} && !${Me.Moving} && !${Me.Invis}) /useitem Fungal Shrieker Spore
this is what i have thus far , im sure it is completely wrong if anyone can help a newb out id appreciate it thanks
I before e, except after c
Or when sounded as 'a' as in 'neighbor' and 'weigh'
Unless the 'c' is part of a 'sh' sound as in 'glacier'
Or it appears in comparatives and superlatives like 'fancier'
And also except when the vowels are sounded as 'e' as in 'seize'
Or 'i' as in 'height'
Or also in '-ing' inflections ending in '-e' as in 'cueing'
Or in compound words as in 'albeit'
Or occasionally in technical words with strong etymological links to their parent languages as in 'cuneiform'
Or in other numerous and random exceptions such as 'science', 'forfeit', and 'weird'.