Potion Belt stuff

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

Potion Belt stuff

Post by discip1e » Fri Aug 10, 2007 6:51 am

you guys prolly already know this, but I'm adding it anyways. . . .for the few (like me) who didn't know.


I use Skinspikes pots an awful lot. and wanted to add them to the self buff queus on a few macs I run. This is what I do.

at the top, where all the events go:

Code: Select all

#event dmgshield "Your skin loses its thorns."
at the bottom I put this:

Code: Select all

sub event_dmgshield
/potionbelt Activate 1
/return
now everytime my DS fades it casts a new one, as long as you have your skinspikes pots in slot 1 of your potion belt. Move this to VIP, if it's a result of a VIP plug.

any other suggestions?
Last edited by discip1e on Sat Aug 11, 2007 9:48 am, edited 1 time in total.
Virtual arguments with Virtual people in Virtual space is Virtually the most retarded thing in existence. . .

discip1e
a ghoul
a ghoul
Posts: 133
Joined: Wed Dec 21, 2005 6:32 am

Post by discip1e » Sat Aug 11, 2007 8:10 am

Keep in mind this will only try to cast once, if you are moving at the time it won't cast again, as the event will not trigger.
Virtual arguments with Virtual people in Virtual space is Virtually the most retarded thing in existence. . .

jacensolo
a snow griffon
a snow griffon
Posts: 427
Joined: Wed Feb 14, 2007 8:51 am
Location: Right behind you

Post by jacensolo » Sat Aug 11, 2007 11:48 am

To fix it for cases when you're running, maybe something like this:

Code: Select all

Sub Main
 :loop
 /delay 5
 /if (${Me.Buff[Skinspikes]} || ${Me.Speed} || ${Me.Casting} || ${Me.Sitting}) /goto :loop
 /potionbelt activate 1
 /delay 1s ${Me.Casting.ID}
 /delay 5s !${Me.Casting.ID}
 /goto :loop
I don't know how the Buff[] member works, so you may need to substitute the exact name of the potion you're using, but that should make it cast reliably without events. Also, it might be possible to use ${Me.DamageShieldBonus} to check if you have the potion on already. However, since some gear has +Damage Shield Mods, you would probably need to add a variable to catch your base Damage Shield to the beginning, before the loop, like this:

Code: Select all

 /declare oldDS int ${Me.DamageShieldBonus}
And then replace the ${Me.Buff[]} check with this:

Code: Select all

 ${Me.DamageShieldBonus}>${oldDS}
The benefit to that is if a druid casts a better DS on you than your pots, you won't burn all your pots trying (and failing) to overwrite it. However, I haven't ever used DamageShieldBonus, so I don't know exactly how accurate it is, or how it works with regards to gear/buffs.

TehWraith
a lesser mummy
a lesser mummy
Posts: 51
Joined: Tue Feb 28, 2006 3:32 am

Post by TehWraith » Sat Aug 11, 2007 12:35 pm

Change ${Me.Buff[Skinspikes]}

To ${Spell[Skinspikes].Stacks}

That way you don't keep trying to cast it if someone else has given you a better DS that doesn't stack. You can set a bool when you lose the DS, and then have a buff sub that checks all your bools, and recasts any buffs that are marked as faded, making sure to check that they would stack before casting them.

JustAnotherCoder(Wannabe)
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Sep 27, 2009 8:02 pm

The Speed of Instant (Potions)?

Post by JustAnotherCoder(Wannabe) » Sun Sep 27, 2009 8:33 pm

I have looked all over the wiki and forums, and though I can find information on how to do things, I am trying to find which way is best. Obviously, having MQ run a direct command is faster than pressing a hotkey which has the direct command. However, with this particular match-up I cannot find a conclusive "winner." I am curious if anyone has run speed tests of instant potion usage by these two different methods, or if anyone has insight.

For example. Let's say you have 3 10 Dose Potion of Vampiric Spirit in your inventory.

The two ways I try getting the mana as fast possible are be

Code: Select all

/cast item "10 Dose Potion of Vampiric Spirit"
versus

Code: Select all

/potionbelt Activate 1
Is there any discernible difference in speed that a program or MQ can sense? This might sound silly, but instant potions and the speed at which they can be used is important :)

Thanks for any feedback, I am still looking into it and trying to find the best route, so I can inform the rest of the community.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun Sep 27, 2009 9:09 pm

The /potionbelt method should be faster, however any difference in speed between the two ways of doing it probably wouldn't be noticeable.

dragonbutt
a ghoul
a ghoul
Posts: 119
Joined: Mon Sep 15, 2008 12:54 am

Post by dragonbutt » Fri Oct 02, 2009 2:16 pm

Er... nevermind

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:28 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:29 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:30 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:31 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:32 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:33 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:34 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Potion Belt stuff

Post by xyilla » Sun Aug 17, 2025 6:36 pm