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
/returnCode: 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

