• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Simple alcohol tolerance macro

Joined
Sep 20, 2005
RedCents
1,793¢
Simple alcohol tolerance macro I threw together. Minimal error checking, just consumes what is specified and will buy more if the merchant is in zone. Expects user to be close enough to buy if merchant is in zone. I ran two characters to 450 with it.

Rich (BB code):
| alc.mac - Sym 5.28.2011
| Simple alcohol tolerance / buying macro
| Edit Booze, MerchantName, MaxSkill and BuyStacks
|
| Macro searches inventory for Booze, if it finds some it force feeds it via inventory slot 8
| If it does not find any it will buy BuyStacks stacks of listed Booze from MerchantName and 
|   forcefeed via inventory slot 8 until MaxSkill is hit.
|
| No error checking for drunkenness, use DoCrack unlimiteddrunk
| Doesn't care about partial stacks. It'll drink until nothing exists in inventory slot 8.
|
| Uses a loop to find the right item on the merchant due to recent merchant changes (recent for me anyway)
| If you use a merchant with large amount of items may need to increase the 5s delay so the list is full populated
| If there is a better way I'm all ears
|
| Set Debug to 1 for item purchasing output. Will not actually buy with Debug enabled.
|
| If the MerchantName doesn't exist in zone it will stop running when all Booze has been consumed.
| Useful when stocking up and going to an out of the way zone.
|

#event SkillUp  "#*#You have become better at Alcohol Tolerance#*#"

sub Main

/declare Booze string outer Ale
/declare MerchantName string outer Dray
/declare MaxSkill int outer 450
/declare BuyStacks int outer 5

/declare Debug int outer 0

/if (${InvSlot[Pack8].Item.ID}) {
    /e Inv Slot 8 must be empty
    /endmac
}

:Start
/if (${FindItemCount[=${Booze}]}) {
    /shift /itemnotify ${FindItem[=${Booze}].InvSlot} leftmouseup
    /delay 5
    /itemnotify pack8 leftmouseup

    :Drink
        /itemnotify pack8 rightmouseup
        /delay 5
        /doevents
    /if (${InvSlot[Pack8].Item.ID}) /goto :Drink
    /goto :Start
} else {
    /call BuyBooze
    /goto :Start
}

/return

sub BuyBooze

    /if (!${Spawn[npc ${MerchantName}].ID}) {
        /e Out of booze, exiting
        /endm
    }

    /declare ItemCounter int local
    /declare ItemSlotNumber int local
    /declare a int local

    /target ${MerchantName}
    /delay 1s
    /click right target
    /delay 5s

    /for ItemCounter 1 to ${Window[MerchantWnd].Child[MW_ItemList].Items}
        /if (${Debug}) /e ${ItemCounter} ${Window[MerchantWnd].Child[MW_ItemList].List[${ItemCounter},2]}
        /if (${Window[MerchantWnd].Child[MW_ItemList].List[${ItemCounter},2].Equal[${Booze}]}) /varset ItemSlotNumber ${ItemCounter}
    /next ItemCounter
    /delay 2s
         
    /if (${ItemSlotNumber}) {
        /notify MerchantWnd MW_ItemList listselect ${ItemSlotNumber}
        /if (${Debug}) /e /notify MerchantWnd MW_ItemList listselect ${ItemSlotNumber}
        /for a 1 to ${BuyStacks}
            /if (${Debug}) /e Buying item under cursor
            /if (!${Debug}) /buyitem 20
            /delay 2s
        /next a
    }
        
    /notify MerchantWnd MW_Done_Button leftmouseup

/return

Sub Event_SkillUp
	/echo Alcohol tolerance increased to ${Me.Skill[Alcohol Tolerance]}
	/delay 5
	/if (${Me.Skill[Alcohol Tolerance]}>=${MaxSkill}) {
		/echo Alcohol Tolerance is now ${MaxSkill}.
        /endmacro
	}
/return
 
Rich (BB code):
| alc.mac - Sym 5.28.2011
| Simple alcohol tolerance / buying macro
| Edit Booze, MerchantName, MaxSkill and BuyStacks
|
| Macro searches inventory for Booze, if it finds some it force feeds it via inventory slot 8
| If it does not find any it will buy BuyStacks stacks of listed Booze from MerchantName and 
|   forcefeed via inventory slot 8 until MaxSkill is hit.
|
| No error checking for drunkenness, use DoCrack unlimiteddrunk
| Doesn't care about partial stacks. It'll drink until nothing exists in inventory slot 8.
|
| Uses a loop to find the right item on the merchant due to recent merchant changes (recent for me anyway)
| If you use a merchant with large amount of items may need to increase the 5s delay so the list is full populated
| If there is a better way I'm all ears
|
| Set Debug to 1 for item purchasing output. Will not actually buy with Debug enabled.
|
| If the MerchantName doesn't exist in zone it will stop running when all Booze has been consumed.
| Useful when stocking up and going to an out of the way zone.
|

#event SkillUp  "#*#You have become better at Alcohol Tolerance#*#"

sub Main

/declare Booze string outer Ale
/declare MerchantName string outer Dray
/declare MaxSkill int outer 450
/declare BuyStacks int outer 5

/declare Debug int outer 0

:Start
/if (${FindItemCount[=${Booze}]}) {

    :Drink
        /useitem Ale
        /delay 5
        /doevents

    /goto :Start
} else {
    /call BuyBooze
    /goto :Start
}

/return

sub BuyBooze

    /if (!${Spawn[npc ${MerchantName}].ID}) {
        /e Out of booze, exiting
        /endm
    }

    /declare ItemCounter int local
    /declare ItemSlotNumber int local
    /declare a int local

    /target ${MerchantName}
    /delay 1s
    /click right target
    /delay 5s

    /for ItemCounter 1 to ${Window[MerchantWnd].Child[MW_ItemList].Items}
        /if (${Debug}) /e ${ItemCounter} ${Window[MerchantWnd].Child[MW_ItemList].List[${ItemCounter},2]}
        /if (${Window[MerchantWnd].Child[MW_ItemList].List[${ItemCounter},2].Equal[${Booze}]}) /varset ItemSlotNumber ${ItemCounter}
    /next ItemCounter
    /delay 2s
         
    /if (${ItemSlotNumber}) {
        /notify MerchantWnd MW_ItemList listselect ${ItemSlotNumber}
        /if (${Debug}) /e /notify MerchantWnd MW_ItemList listselect ${ItemSlotNumber}
        /for a 1 to ${BuyStacks}
            /if (${Debug}) /e Buying item under cursor
            /if (!${Debug}) /buyitem 20
            /delay 2s
        /next a
    }
        
    /notify MerchantWnd MW_Done_Button leftmouseup

/return

Sub Event_SkillUp
	/echo Alcohol tolerance increased to ${Me.Skill[Alcohol Tolerance]}
	/delay 5
	/if (${Me.Skill[Alcohol Tolerance]}>=${MaxSkill}) {
		/echo Alcohol Tolerance is now ${MaxSkill}.
        /endmacro
	}
/return

I slightly modified this for VoA people - doesn't move items, instead it will just click it inside bags.
 
Last edited by a moderator:
Thanks HR. I'll check this out, I forgot they raised AT again after I just used unlimited drunk and another drink macro to raise it to 475. Oh well, but one must be a prepared drunkard. You never know when you'll be faced with drunkenness on raids or in the lobby! :)

/cheers :drink
 
Not sure if anyone still uses this. I dug it up today and found it didn't run. I had to replace line 37 with "/useitem Ale"

Replace:
/nomodkey /itemnotify ${FindItem[=${Booze}].InvSlot} rightmouseup

With:
/useitem Ale
 
Simple alcohol tolerance macro

Users who are viewing this thread

Back
Top
Cart