Post your completed (working) macros here. Only for macros using MQ2Data syntax!
Moderator: MacroQuest Developers
-
Milten
- a hill giant

- Posts: 176
- Joined: Thu Oct 09, 2003 11:40 am
Post
by Milten » Thu Sep 21, 2006 2:06 am
fearless wrote:if you are worried about the delay expiring before the condition is met, use something like /delay 2342987298347928374928743s !${Cursor.ID} so that the macro still has a chance of moving on and possibly recovering instead of just waiting for some miracle to happen that clears the cursor.
Fuck you, Fearless, I just wasted ~30 minutes of my life trying to calculate how many years, days, minutes and seconds exactly your new /delay would wait for a miracle to jump ahead of time... (granted, not as bad as waiting for a miracle that clears the cursor, but wtf...)

-
dont_know_at_all
- Developer

- Posts: 5450
- Joined: Sun Dec 01, 2002 4:15 am
- Location: Florida, USA
-
Contact:
Post
by dont_know_at_all » Thu Sep 21, 2006 2:23 am
2 342 987 298 347 928 374 928 743 seconds = 7.42463731 ? 10^16 years
Google did it in less than a second.
-
[40oz]
- a hill giant

- Posts: 156
- Joined: Tue Nov 12, 2002 12:14 pm
Post
by [40oz] » Fri Sep 22, 2006 7:34 pm
I went to google and checked just to see the syntax to punch it in.
Google is win.
-
simkin
- a snow griffon

- Posts: 303
- Joined: Thu Sep 01, 2005 1:52 pm
Post
by simkin » Sat Sep 30, 2006 5:15 pm
I think I went a little overboard here but I was trying to automate my Warrior's tasks and decided to add a summon arrow routine. There is a potential problem where you're out of inventory space and don't have your max arrows. Try to avoid that.
Code: Select all
| summon_arrows.inc based on summon_arrows.mac by Canadian Cowgirl
| Overengineered by Simkin
|
| Ver 1.0 September 30, 2006 - Initial release
|
| How to use:
| This include uses the mq2exhange plugin & expects spell_routines.inc in your macro
| Add this include to your macro. eg. #include summon_arrows.inc
| Initialize the subroutine variables in your macro with : /call DeclareSAVars
| During your buff checking routine add: /call SummonArrows
| You can change the thresholds of sa_MinArrow / sa_MaxArrow below to your liking
Sub DeclareSAVars
|===========================================
/declare sa_MinArrow int outer 15
/declare sa_MaxArrow int outer 190
|===========================================
/declare sa_loopinv int outer 0
/declare sa_RangeItem string outer
/declare sa_SwapRange bool outer FALSE
/return
Sub SummonArrows
/if (${FindItemCount[Hunter's Barb]} > ${sa_MinArrow}) /return
/if (${Cursor.Name.Equal[Hunter's Barb]}) /autoinventory
/if (${FindItemCount[Hunter's Barb]} > ${sa_MinArrow}) /return
/varset sa_SwapRange FALSE
/if (!${FindItemCount[Bloody Ancille's Pouch]}) {
/echo You don't have your Bloody Ancille's Pouch.
/return
}
/if (${FindItemCount[Purified Crystal]}==0) {
/echo Out of Purified Crystals.
/return
}
| See if we have the pouch in our inventory or ranged slot
/if (${InvSlot[ranged].Item.Name.Equal[Bloody Ancille's Pouch]}) /goto :sa_ready
/for sa_loopinv 1 to 8
/if (${InvSlot[pack${sa_loopinv}].Item.Name.Equal[Bloody Ancille's Pouch]}) /goto :sa_ready
/next sa_loopinv
| We don't have pouch ready for summon, so find a spot to put it
| in either a free inventory slot or the ranged slot
/for sa_loopinv 1 to 8
/if (${InvSlot[Pack${sa_loopinv}].Item.ID}==NULL) {
/exchange "Bloody Ancille's Pouch" ${Math.Calc[${sa_loopinv}+21]}
/goto :sa_ready
}
/next sa_loopinv
| No free Inventory slots, so replace ranged item temporarily
/echo Swapping Range Item for Summon Arrow Thingy
/if (${InvSlot[ranged].Item.ID}!=NULL) /varset sa_SwapRange TRUE
/varset sa_RangeItem "${InvSlot[ranged].Item}"
/exchange "Bloody Ancille's Pouch" ranged
/delay 3s ${InvSlot[ranged].Item.Name.Equal[Bloody Ancille's Pouch]}
| Start Summoning Arrows
:sa_ready
/if (${Cursor.ID}) /autoinventory
/delay 1s !${Cursor.ID}
/echo Summoning Arrows, hold still!
:sa_summonloop
/if ((${FindItemCount[Hunter's Barb]}<${sa_MaxArrow}) && ${Me.FreeInventory} && ${FindItem[Purified Crystal].ID}) {
/call cast "Bloody Ancille's Pouch" item
}
/if (${Cursor.ID}) /autoinventory
/delay 1s !${Cursor.ID}
/if ((${FindItemCount[Hunter's Barbs]}>=${sa_MaxArrow})||(${FindItemCount[Purified Crystal]}==0)) {
/if (${sa_SwapRange}) {
/exchange ${sa_RangeItem} ranged
/delay 3s ${InvSlot[ranged].Item.Name.Equal[${sa_RangeItem}]}
}
/return
}
/goto :sa_summonloop
/end