Page 1 of 3

Downshit and Holyshit question

Posted: Mon Dec 16, 2013 8:47 am
by Puffda
How do you make it so when using downshits and holyshits to auto rebuff, it will check the recast time so it doesn't spam cast it till able to cast?

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 9:41 am
by Nexor
Check if you already have the buff/song like

Code: Select all

holyshit1=/if (!${Me.Song[Cry Havoc].ID} && !${Me.Song[Strike of Savagery].ID}) /casting 83622


or do it via delay

From http://mqemulator.net/forum2/viewtopic.php?p=3908&sid=83c1d0cef724d91e918fb72fe0380869
MACRO
Select this text.Show scroll bars.Show less of this text.Show more of this text.
holyflag0=1
holyshit0=/docommand ${If[${Math.Calc[${Macroquest.Running}\1000%X]}==0, <stuff to do if true>, <stuff to do if false>]}


The ${If[]} will be true exactly 1 second every X seconds. Between modulo and integer division statements, you can narrow down a time range which won't trigger needlessly and will be broad enough to trigger at all. Turn Macroquest.Running milliseconds into seconds using integer division (\1000). Then use modulo x (%x) to look at every Xth second.


MACRO
Select this text.Show scroll bars.Show less of this text.Show more of this text.
holyflag0=1
holyshit0=/if (<whatever conditions you need to check>) /multiline ; /melee holyflag0=0; /timed X /melee holyflag0=1; <whatever it is you want to do>


This will check conditions. If conditions are met, it will do whatever. It will turn holyflag0 OFF for X deciseconds, to account for the delay. After X deciseconds, holyflag0 will turn back ON, so the conditions are checked again.

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 10:01 am
by Puffda
Thx that somewhat does what I want. Enough to work.

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 10:02 am
by Grey
Puffda wrote:How do you make it so when using downshits and holyshits to auto rebuff, it will check the recast time so it doesn't spam cast it till able to cast?

Format to fit your needs.

Code: Select all

Spell Buff:
/if (!${Me.Buff[SpellNameHere].ID} && ${Cast.Ready[SpellNameHere]}) /cast "SpellNameHere"
Clicky Buff:
/if (!${FindItem[ClickyNameHere].Timer} && !${Me.Buff[${FindItem[ClickyNameHere].Spell}].ID}) /casting "${FindItem[ClickyNameHere]}"|item

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 10:09 am
by Puffda
Grey wrote:
Puffda wrote:How do you make it so when using downshits and holyshits to auto rebuff, it will check the recast time so it doesn't spam cast it till able to cast?

Format to fit your needs.

Code: Select all

Spell Buff:
/if (!${Me.Buff[SpellNameHere].ID} && ${Cast.Ready[SpellNameHere]}) /cast "SpellNameHere"
Clicky Buff:
/if (!${FindItem[ClickyNameHere].Timer} && !${Me.Buff[${FindItem[ClickyNameHere].Spell}].ID}) /casting "${FindItem[ClickyNameHere]}"|item

This doesnt seem to do anything but just to make sure i did it right i have

Code: Select all

downshit0=/if (!${FindItem[Ares, Shield of Immortality].Timer} && !${Me.Buff[${FindItem[Ares, Shield of Immortality].Spell}].ID}) /casting "${FindItem[Ares, Shield of Immortality]}"|ranged


As for Nexor's method i did

Code: Select all

downshit0=/if (!${Me.Buff[Immortality].ID} && !${Immortality].ID} && !${Me.Moving} && !${Me.Invis} && !${Me.Feigning}) /multiline ; /melee downflag0=0; /timed 200 /melee downflag0=1; /casting "Ares, Shield of Immortality"|ranged

This somewhat works the way I want

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 2:13 pm
by Dreos
downshit0=/if (!${FindItem[Ares, Shield of Immortality].Timer} && !${Me.Buff[${FindItem[Ares, Shield of Immortality].Spell}].ID}) /casting "${FindItem[Ares, Shield of Immortality]}"|ranged


I think Me.Buff should be Immortality, because that's the name of the buff Ares gives. And I'm not 100% but I believe that it should be /casting "${FindItem[Ares, Shield of Immortality]}"|item, like Grey had it, not ranged. Could be wrong though!

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 2:53 pm
by Tristhan
Dreos wrote:
downshit0=/if (!${FindItem[Ares, Shield of Immortality].Timer} && !${Me.Buff[${FindItem[Ares, Shield of Immortality].Spell}].ID}) /casting "${FindItem[Ares, Shield of Immortality]}"|ranged


I think Me.Buff should be Immortality, because that's the name of the buff Ares gives. And I'm not 100% but I believe that it should be /casting "${FindItem[Ares, Shield of Immortality]}"|item, like Grey had it, not ranged. Could be wrong though!


- Yeah you need to look for the buff ${Me.Buff[Immortality].ID}

- /casting "Ares, Shield of Immortality" item should be enough (keep it simple & clean)

(Spy on): Btw if you use MQ2CAST or spellroutine the command /casting will exchange items so it would be good to NOT all inventoryslots filled with bags

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 9:29 pm
by XanDeShade
none of these work... i tried it with an item that has a duration buff of 3mins and a recast lock of 6mins after the buff fades i get a casting loop that i do not want for the other 3mins

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 10:04 pm
by Puffda
Tristhan wrote:
Dreos wrote:
downshit0=/if (!${FindItem[Ares, Shield of Immortality].Timer} && !${Me.Buff[${FindItem[Ares, Shield of Immortality].Spell}].ID}) /casting "${FindItem[Ares, Shield of Immortality]}"|ranged


I think Me.Buff should be Immortality, because that's the name of the buff Ares gives. And I'm not 100% but I believe that it should be /casting "${FindItem[Ares, Shield of Immortality]}"|item, like Grey had it, not ranged. Could be wrong though!


- Yeah you need to look for the buff ${Me.Buff[Immortality].ID}

- /casting "Ares, Shield of Immortality" item should be enough (keep it simple & clean)

(Spy on): Btw if you use MQ2CAST or spellroutine the command /casting will exchange items so it would be good to NOT all inventoryslots filled with bags


Humm I have tried this many different ways and it just does not work, but doing it the way nexxor posted does seem to work for me for the shield.

Code: Select all

downshit0=/if (!${Me.Buff[Immortality].ID} && !${Immortality].ID} && !${Me.Moving} && !${Me.Invis} && !${Me.Feigning}) /multiline ; /melee downflag0=0; /timed 200 /melee downflag0=1; /casting "Ares, Shield of Immortality"|ranged


This basicly will cast the shield then turn the downflag associated with it off for the 20 seconds it takes to recast and them back on again to cast again.

Although this does not seem to work for holyshit. Can't seem to get the shield to cast during a fight. This is so confusing :cry: I feel like I need to go to college and major in scripting to do this lol :mrgreen:

Re: Downshit and Holyshit question

Posted: Mon Dec 16, 2013 11:07 pm
by Nexor
You should remove && !${Immortality].ID