Item clicks

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

Flea
a lesser mummy
a lesser mummy
Posts: 55
Joined: Fri Dec 26, 2003 4:56 am

Item clicks

Post by Flea » Sun Jun 13, 2004 1:54 am

Ok here is what I have so far.

Code: Select all

|--------------|
|clicks.mac    |
|Usage:        |
|/macro clicks |
|--------------|

Sub Main
/if (${Bool[${Me.Buff["Strength of Tunare"]}]}==FALSE&&${Bool[${Me.Buff["Spiritual Vigor"]}]}==FALSE) /call ATKRing
/delay 1s
/if (${Me.Buff["Shield of the Eighth"].Duration}<600) /call DSRing
/delay 1s
/if (${Me.Buff["Form of Rejuvination"].Duration}<600) /call RegenBelt

Sub DSRing
/if (!${Window[InventoryWindow].Closed}) /windowstate InventoryWindow open
/delay 3
/itemnotify ${FindItem["Coldain Hero's Insignia Ring"].InvSlot.Pack} rightmouseup
/delay 3
/itemnotify ${FindItem["Coldain Hero's Insignia Ring"].InvSlot} leftmouseup
/delay 3
/itemnotify leftfinger leftmouseup
/delay 3
/itemnotify leftfinger rightmouseup
/delay ${FindItem["Coldain Hero's Insignia Ring"].CastTime}s
/delay 3
/itemnotify leftfinger leftmouseup
/delay 10
/autoinventory
/cleanup
/return

Sub ATKRing
/if (!${Window[InventoryWindow].Closed}) /windowstate InventoryWindow open
/delay 3
/itemnotify ${FindItem["Berserkers Ring"].InvSlot.Pack} rightmouseup
/delay 3
/itemnotify ${FindItem["Berserkers Ring"].InvSlot} leftmouseup
/delay 3
/itemnotify leftfinger leftmouseup
/delay 3
/itemnotify leftfinger rightmouseup
/delay ${FindItem["Berserkers Ring"].CastTime}s
/delay 3
/itemnotify leftfinger leftmouseup
/delay 10
/autoinventory
/cleanup
/return

Sub RegenBelt
/return
What I want to add is a string to

Code: Select all

/if (${Bool[${Me.Buff["Strength of Tunare"]}]}==FALSE&&${Bool[${Me.Buff["Spiritual Vigor"]}]}==FALSE) /call ATKRing
Which will also call ATKRing if "Firefist"'s duration is less than 5min or if it isn't there at all.

Thanks for your help.

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Sun Jun 13, 2004 3:57 am

Code: Select all

/if ((!${Me.Buff["Strength of Tunare"].ID} && !${Me.Buff["Spiritual Vigor"].ID}) || ${Me.Buff["Firefist"].Duration.TotalMinutes}<=5) /call ATKRing
The if is true if both Strength of Tunare and Spiritual Vigor are not up OR if Firefist have a duration less than 5 minutes round down (5 minutes and 59 secs is seen as 5 minutes).
BTW, it is easier to read if you use

Code: Select all

${Me.Buff["Buff Name"].ID}
it is true if the buff is on, false if it is not.

Flea
a lesser mummy
a lesser mummy
Posts: 55
Joined: Fri Dec 26, 2003 4:56 am

Post by Flea » Sun Jun 13, 2004 5:38 am

thanks!