Alcohol Tolerance (Version 0.1)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Vayeco Dynn
a ghoul
a ghoul
Posts: 113
Joined: Wed Aug 25, 2004 3:00 am

Alcohol Tolerance (Version 0.1)

Post by Vayeco Dynn » Tue Aug 31, 2004 10:33 pm

The following macro is my first released macro. Its purpose is simple: build up your alcohol tolerance to the max possible (for your level). Read the usage notes and everything for instructions. Feel free to post questions, comments, suggestions, bugs, etc.

I'm currently not sure if you can max out A.T. with just Short Beers, if you can't, then some functionality would have to be added to the macro. Let me know if this is the case, fixing it would be no problem.

alcohol.mac

Code: Select all

| 
| alcohol.mac
| Takes Alcohol Tolerance to the MAX!
| Version 0.1
| Author: Vayeco Dynn
| Thanks to: MQ creators, everyone who is so helpful at the forums, and Override for his Tradeskill Macros
| Date: August 31, 2004
|
| Usage: /macro alcohol
| This Macro can take you your maximum possible skill level in Alcohol Tolerance.
| Change MerchantName for the name of the merchant selling drinks.
|
| This Macro works  near any drink merchant.
| You WILL need to be next to the merchant in order for this to work.
| You probably shouldn't need more than 20-50pp on you if you leave
|  this running long enough.
|
| Requirements:
| You need at least one empty slot in your main 8 inventory slots.
| You also need Override's common files which can be found at the link
|  below.
|
| Disclaimer:
| Code was heavily based off of Override's (of MQ Forums) Tradeskill
|  Macros which can be found at http://www.soc-music.com/mq2/
| 


#event PurchaseError "#*#There was no place to put that#*#" 
#event DrunkOffYourAss "#*#could not possibly consume more alcohol#*#"
#include common/buy.inc

Sub Main 
    /declare SkillMaxWanted int outer
    /declare MerchantName string Outer
    /declare Drink string outer
    /declare MaxPossibleSkill int outer
    /varcalc MaxPossibleSkill (${Me.Level} * 5) + 5

| ************************************************
| *   Change these settings to what you want.    *
| ************************************************

    /varset SkillMaxWanted 250
    /varset MerchantName "Innkeep Tozie"


| ************************************************
| ************************************************

    :start
    /echo Alcohol Tolerance is at ${Me.Skill[Alcohol Tolerance]}.

    /if (${Me.Skill[Alcohol Tolerance]}>=${MaxPossibleSkill}) {
      /echo Alcohol Tolerance is at a maximum, ending macro.
      /endmacro
    }

    /if (${Me.Skill[Alcohol Tolerance]} < ${MaxPossibleSkill}) {
      /varset Drink Short Beer
    }

    :Begin 
    /doevents
    /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
    /delay 1s
    /if (${FindItemCount[=${Drink}]} > 0) {
       /delay 2s
       /itemnotify ${FindItem[=${Drink}].InvSlot} rightmouseup
       /goto :Begin
    } else {
       /target ${MerchantName}
       /face
       /nomodkey /click right target
       /delay 2s
       /call Buy "${Drink}" 20
       /delay 1s
       /nomodkey /notify MerchantWnd DoneButton leftmouseup
    }

    /goto :start

/return 

Sub Event_PurchaseError
    /echo You don't have enough slots in your inventory you doofus! Drop something and start the macro over.
    /endmacro
/return

Sub Event_DrunkOffYourAss
    /echo Woah... getting a little tipsy. Lets take a break, shall we?
    /delay 20s
/return
common/buy.inc

Code: Select all

| 
| buy.inc
| Buy Include File needed for macros
| Version 1.4
| Date: August 17, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2/index.htm
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 


#event Broke "#*#cannot afford the#*#" 

Sub Buy(item ItemToBuy, int amount)

/echo Buying ${ItemToBuy}

/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0

/for x 1 to ${TotalMItems}
  /if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
    /varset ItemSlotNum ${x}
  }
/next x

/if (${ItemSlotNum}==0) {
  /echo Not on Merchant
  /return
}

/itemnotify merchant${ItemSlotNum} leftmouseup


:Buy 
   /if (${FindItemCount[=${SelectedItem}]}>=${amount}) {
     /echo Done!
     /return
   }        

:StackLoop 
   /if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=20) /goto :RegLoop 
   /buyitem ${If[${SelectedItem.Stackable},20,1]} 
   /delay 5 
   /doevents 
   /goto :StackLoop 

:RegLoop 
   /if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=0) {
     /echo Done!
     /return
   }        
   /buyitem ${If[${SelectedItem.Stackable},${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]},1]} 
   /delay 5 
   /doevents 
   /goto :RegLoop 

/return

Sub Event_Broke 
   /echo Error: You are out of money! 
   /beep
   /endmacro
/return

SvnRn
orc pawn
orc pawn
Posts: 24
Joined: Fri Aug 06, 2004 7:07 pm

Post by SvnRn » Wed Sep 15, 2004 2:25 am

How about a macro that uses Brell's Fishin' Pole instead? That would be nice too.

ecsos
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Oct 16, 2003 10:26 am
Location: USA

Post by ecsos » Wed Sep 15, 2004 6:35 pm

make it automatically duel someone and lose and loot it's corpse and drink more, like at the bazaar arena. that would be useful
-
Ecsos

Vayeco Dynn
a ghoul
a ghoul
Posts: 113
Joined: Wed Aug 25, 2004 3:00 am

Post by Vayeco Dynn » Mon Oct 11, 2004 6:13 pm

SvnRn wrote:How about a macro that uses Brell's Fishin' Pole instead? That would be nice too.
That one already exists somewhere on these forums. I made this one for those of us who don't have Brell's Pole. I actually wrote this macro when I was like level 18. Now I'm around 52... Wonder if I can do that quest yet....

wardave
a ghoul
a ghoul
Posts: 120
Joined: Sun Jan 25, 2004 4:38 am

Post by wardave » Tue Oct 12, 2004 12:18 am

ecsos wrote:make it automatically duel someone and lose and loot it's corpse and drink more, like at the bazaar arena. that would be useful
I could see how the auto duel would be a bad idea. As far as I know dots still kill make you loose exp. I can see some evil necro helping you out in this area.

ZootSoot
decaying skeleton
decaying skeleton
Posts: 6
Joined: Mon Apr 02, 2007 8:47 pm

Post by ZootSoot » Mon Apr 02, 2007 8:55 pm

Holy hell search works... and let me put my shovel away for digging up such an old post. Excellent work, but I made a few mods to just clear what you have in inventory and move the drink to top level slot.

Just change drink to whatever you have stacked in your inventory - and have lots of it! With anniversary being here, there's a lovely drink called "FREE BEER" and well... it's free.

Code: Select all

|
| alcohol.mac
| Takes Alcohol Tolerance to the MAX!
| Version 0.2
| Original Author: Vayeco Dynn
| Thanks to: MQ creators, everyone who is so helpful at the forums, and Override for his Tradeskill Macros
| Original Date: August 31, 2004
| Reworked 4.2.2007 by ZootSoot
|
| Usage: /macro alcohol
| This Macro can take you your maximum possible skill level in Alcohol Tolerance.
| Change Drink to what your drink is.

| Disclaimer:
| Code was heavily based off of Override's (of MQ Forums) Tradeskill
|  Macros which can be found at http://www.soc-music.com/mq2/
|

#event DrunkOffYourAss "#*#could not possibly consume more alcohol#*#"

Sub Main
    /declare SkillMaxWanted int outer
    /declare MerchantName string Outer
    /declare Drink string outer
    /declare MaxPossibleSkill int outer
    /varcalc MaxPossibleSkill (${Me.Level} * 5) + 5

| ************************************************
| *   Change these settings to what you want.    *
| ************************************************

    /varset SkillMaxWanted 270


| ************************************************
| ************************************************

    :start
    /echo Alcohol Tolerance is at ${Me.Skill[Alcohol Tolerance]}.

    /if (${Me.Skill[Alcohol Tolerance]}>=${MaxPossibleSkill}) {
      /echo Alcohol Tolerance is at a maximum, ending macro.
      /endmacro
    }

    /if (${Me.Skill[Alcohol Tolerance]} < ${MaxPossibleSkill}) {
      /varset Drink Free Beer
    }

    :Begin
    /doevents
    /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
	

    /delay 1s
    /if (${FindItemCount[=${Drink}]} > 0) {
       /delay 2s
	/if (${FindItem[=${Drink}].InvSlot} > 30) {
		/call OpenPacks
		/nomodkey /itemnotify ${FindItem[=${Drink}].InvSlot} leftmouseup 
		/delay 5s ${Window[QuantityWnd].Open} 
		/notify QuantityWnd QTYW_Accept_Button leftmouseup 
		/delay 5s ${Cursor.ID}
		/AutoInventory
		/Cleanup
		/if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
	}
       /itemnotify ${FindItem[=${Drink}].InvSlot} rightmouseup
       /goto :Begin
    } else {
	/popup Outta Booze
	/endmacro
    }

    /goto :start

/return 

Sub OpenPacks
   /declare bag int local 0
   /if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory
   /delay 3s ${Window[InventoryWindow].Open} 
   /for bag 1 to 8
   /if (!${Window[Pack${bag}].Open}) /nomodkey /itemnotify pack${bag} rightmouseup
   /delay 3s ${Window[Pack${bag}].Open}
   /next bag
/return