• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Macro Help (1 Viewer)

unknown405

Active member
Joined
Nov 17, 2006
RedCents
90¢
I have no macro experience at all, but I'm working to get all the tradeskill macros up to max instead of just 150-200. So far everything was working perfectly, until I realized to get from 248-300 in brewing you need to buy stuff that's not in abysmal sea. So I succesfully re-wrote it to work in Crescent Reach. Only problem, is it crashes. Here's the Recipe I'm using. Both Soda Water and Champagne Magnum need to be combined. Soda Water can be brewed, but Champagne Magnum needs to be bought/jewelcrafted so I suggest running jewelery.mac before my brew2.mac, anyway here's the problem.


The brew barrel and the NPC are directly beside eachother, so what it's supposed to do is check to see if you have at least 5 soda waters, if not it buys all the components needed to make soda water, and combines. If it does, then it gets all the components, except Champagne Magnum, needed to make Brut Champagne and combines it. What happens though, is it buys all the items needed to make Soda Water, but then buys all the items needed to make Brut Champagne right after that, without making soda water first. Then once it turns to face the brew I get an error message, I can go check the exact error message, but basically it says cannot target brew. Then the brew barrel wont open, so I clicked it to open it and the whole game freezed. Look below to see the code.
 
Rich (BB code):
| Brew2.mac version 1.0
|
| Written by Armysoldier edited by UnkNowN
|
| March 5 2006
|
| Modifications:
|
| 26 MAR 2006: moved 2 subs and event declarations to CommonSubs.inc
|
| This new line of tradeskill macros uses the NEW UI and the OLD UI for TS containers
| 
| The Macro will attempt to find the recipe using the NEW UI first
| If no recipe is found it will go Old school and do a set of combines
| these macros take into account the SALVAGE function and react accordingly
| 
|
| A special thanks to A_Druid_00 for advising on some streamlining modifications
| and to Override for his Tradeskill Code that has been around for so long 
| and is the inspiration for this code
|
| Some of the code was pulled from other macros and modified and manipulated 
| to do the tasks set forth.
|
| This code is designed for Crescent Reach
|
| *** FOR THIS CODE TO WORK ***
| You need to Stand between the brew barrel and Brewmaster Isaq
| You need to be in the first person view
| You need to ensure that when you click the tradeskill container the NEW UI comes up first
| the 5 FILES need to be in the macro\common folder (see includes below)


#include common/sell.inc
#include common/buy.inc
#include common/packs.inc
#include common/cleanpacks.inc
#include common/CommonSubs.inc


Sub Main
    /declare OldSkill int outer ${Me.Skill[Brewing]}
    /declare SkillMaxWanted int outer
    /declare PackCode string outer 
    /declare Component[10] string outer
    /declare i int outer
    /declare MerchantNameA string Outer
    /declare MerchantNameB string Outer
    /declare CombItemName string outer
    /declare ItemTo string outer
    /declare ItemToB string outer
    /declare ItemToC string outer
    /declare EndingVar int outer
    /declare DelayMult int outer
    /declare Container string outer
    /declare Checkrecipe string outer
    /declare NewUI int outer

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Customize these settings if you want
|                    
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /varset MerchantNameA "Brewmaster Ishaq" 
    /varset SkillMaxWanted 300
    /varset DelayMult 1
    /declare Filename string outer Brewing.ini

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Call Read INI for locations array
|                    
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /call ReadINIA ${Filename} "Crescent Reach" 
    /if (!${Defined[LocArray]}) { 
       /echo No Loc Array Created...
       /endmacro 
    } 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Begin 
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :start

|--- Check Current Skill against Skill wanted 
    /echo Brewing is at ${Me.Skill[Brewing]}

    /if (${Me.Skill[Brewing]}>=${SkillMaxWanted}) {
      /echo Brewing is at ${SkillMaxWanted}. Quiting!
      /endmacro
    }

    /if (${FindItemCount[=Soda Water]}<5) {
    /echo You have less than 5 Soda Water! Combining more for you.
    /varset CombItemName MQSW
    /varset ItemTo Soda Water
    /call ReadIni "${CombItemName}"
    /target "${MerchantNameA}"

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[1]}" 100

    /call Buy "Soda" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /varset CombItemName MQSW
    /varset ItemTo Brut Champagne

    /if (${Me.Skill[Brewing]}>=248 && ${Me.Skill[Brewing]}<=300) {
      /varset CombItemName "MQBC"
      /varset ItemTo "Brut Champagne"
    }

    /call ReadIni "${CombItemName}"
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Buy Components
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /varset EndingVar 1
    /varset NewUI 1

    /echo moving to ${MerchantNameA}

    /target ${MerchantNameA}

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[2]}" 300

    /call Buy "${Component[4]}" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /echo Moving to the Barrel

    /call Movement 1 0 0
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| MAKE Items
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


      /nomodkey /itemtarget Brew Barrel notarget 
      /face item nolook 
      /click left item 
/delay 3s ${Window[TradeskillWnd].Open} 
      /doevents
      /delay 3s ${Window[TradeskillWnd].Open} 
      /if (!${Window[TradeskillWnd].Open}) /nomodkey /click left Item 
      /delay 3s ${Window[TradeskillWnd].Open} 
      /call ChooseRecipe
      /call ClosePacks

    /echo Moving to ${MerchantNameA}
    /echo Selling off and starting over
    /call Movement 1 0 0

    /target ${MerchantNameA}
   
    /delay 5s ${Target.ID}==${Spawn[${MerchantNameA}].ID}

    /nomodkey /click right target

/delay 5s ${Window[MerchantWnd].Open} 

    /call OpenPacks

    /call Sell ${ItemTo}

    /call Sell ${ItemToB}

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /doevents

    /goto :start

    /return


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Skill up
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Event_Skillup
        /if (${Me.Skill[Brewing]}>${OldSkill}) {
        /echo Your Brewing Went Up!! It's now ${Me.Skill[Brewing]}!
        /varset OldSkill ${Me.Skill[Brewing]}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event No Longer Advance 
|used if there are some subcombines that need to be made in some TS
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_Advance
    /varset EndingVar 2
/return
 
I think I figured the problem out.

Rich (BB code):
    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /varset CombItemName MQSW
    /varset ItemTo Brut Champagne

    /if (${Me.Skill[Brewing]}>=248 && ${Me.Skill[Brewing]}<=300) {
      /varset CombItemName "MQBC"
      /varset ItemTo "Brut Champagne"
    }

    /call ReadIni "${CombItemName}"

This tells MQ to combine soda water, and put Brut Champagne away which doesn't make sense because it's not combining Brut Champagne. Then it goes straight to making Brut Champagne, it's all screwed up. There's a couple of other errors I found, working them all out right now then going to test it out.

Even though I think I've got it, feel free to tell me what I did wrong if you know.

**EDIT**

Just tested it out, still crashed. Here's my code so far:

Rich (BB code):
Rich (BB code):
| Brew2.mac version 1.0
|
| Written by Armysoldier edited by UnkNowN
|
| March 5 2006
|
| Modifications:
|
| 26 MAR 2006: moved 2 subs and event declarations to CommonSubs.inc
|
| This new line of tradeskill macros uses the NEW UI and the OLD UI for TS containers
| 
| The Macro will attempt to find the recipe using the NEW UI first
| If no recipe is found it will go Old school and do a set of combines
| these macros take into account the SALVAGE function and react accordingly
| 
|
| A special thanks to A_Druid_00 for advising on some streamlining modifications
| and to Override for his Tradeskill Code that has been around for so long 
| and is the inspiration for this code
|
| Some of the code was pulled from other macros and modified and manipulated 
| to do the tasks set forth.
|
| This code is designed for Crescent Reach
|
| *** FOR THIS CODE TO WORK ***
| You need to Stand between the brew barrel and Brewmaster Isaq
| You need to be in the first person view
| You need to ensure that when you click the tradeskill container the NEW UI comes up first
| the 5 FILES need to be in the macro\common folder (see includes below)


#include common/sell.inc
#include common/buy.inc
#include common/packs.inc
#include common/cleanpacks.inc
#include common/CommonSubs.inc


Sub Main
    /declare OldSkill int outer ${Me.Skill[Brewing]}
    /declare SkillMaxWanted int outer
    /declare PackCode string outer 
    /declare Component[10] string outer
    /declare i int outer
    /declare MerchantNameA string Outer
    /declare MerchantNameB string Outer
    /declare CombItemName string outer
    /declare ItemTo string outer
    /declare ItemToB string outer
    /declare ItemToC string outer
    /declare EndingVar int outer
    /declare DelayMult int outer
    /declare Container string outer
    /declare Checkrecipe string outer
    /declare NewUI int outer

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Customize these settings if you want
|                    
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /varset MerchantNameA "Brewmaster Ishaq" 
    /varset SkillMaxWanted 300
    /varset DelayMult 1
    /declare Filename string outer Brewing.ini

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Call Read INI for locations array
|                    
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /call ReadINIA ${Filename} "Crescent Reach" 
    /if (!${Defined[LocArray]}) { 
       /echo No Loc Array Created...
       /endmacro 
    } 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Begin 
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :start

|--- Check Current Skill against Skill wanted 
    /echo Brewing is at ${Me.Skill[Brewing]}

    /if (${Me.Skill[Brewing]}>=${SkillMaxWanted}) {
      /echo Brewing is at ${SkillMaxWanted}. Quiting!
      /endmacro
    }

    /if (${FindItemCount[=Soda Water]}<5) {
    /echo You have less than 5 Soda Water! Combining more for you.
    /varset CombItemName MQSW
    /varset ItemTo "Soda Water"
    /call ReadIni "${CombItemName}"
    /target "${MerchantNameA}"

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[1]}" 100

    /call Buy "Soda" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

	 ELSE {

    /if (${Me.Skill[Brewing]}>=248 && ${Me.Skill[Brewing]}<=300) {
      /varset CombItemName "MQBC"
      /varset ItemTo "Brut Champagne"
    }

    /call ReadIni "${CombItemName}"
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Buy Components
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /varset EndingVar 1
    /varset NewUI 1

    /echo moving to ${MerchantNameA}

    /if (!${CombItemName.Equal[MQSW]}) {

    /target "${MerchantNameA}"

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call Buy "${Component[1]}" 100

    /call Buy "${Component[2]}" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    }

	 ELSE {

    /target ${MerchantNameA}

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[2]}" 300

    /call Buy "${Component[4]}" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /echo Moving to the Barrel

    /call Movement 1 0 0
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| MAKE Items
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


      /nomodkey /itemtarget Brew Barrel notarget 
      /face item nolook 
      /click left item 
/delay 3s ${Window[TradeskillWnd].Open} 
      /doevents
      /delay 3s ${Window[TradeskillWnd].Open} 
      /if (!${Window[TradeskillWnd].Open}) /nomodkey /click left Item 
      /delay 3s ${Window[TradeskillWnd].Open} 
      /call ChooseRecipe
      /call ClosePacks

    /echo Moving to ${MerchantNameA}
    /echo Selling off and starting over
    /call Movement 1 0 0

    /target ${MerchantNameA}
   
    /delay 5s ${Target.ID}==${Spawn[${MerchantNameA}].ID}

    /nomodkey /click right target

/delay 5s ${Window[MerchantWnd].Open} 

    /call OpenPacks

    /call Sell ${ItemTo}

    /call Sell ${ItemToB}

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /doevents

    /goto :start

    /return


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Skill up
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Event_Skillup
        /if (${Me.Skill[Brewing]}>${OldSkill}) {
        /echo Your Brewing Went Up!! It's now ${Me.Skill[Brewing]}!
        /varset OldSkill ${Me.Skill[Brewing]}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event No Longer Advance 
|used if there are some subcombines that need to be made in some TS
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_Advance
    /varset EndingVar 2
/return
Can someone please send me a working code and tell me what I did wrong. I'll continue to work on it, but at the moment I don't have a clue what's wrong still trying to figure it out. Any help appreciated. Thanks, UnkNowN
 
Last edited:
Check your mq2map to see that the brew barrel is actually named that. I think it's ground setting to make the tradeskill containers visible/invisible on the map.

They used to change the names of some of the tradeskill containers to screw with macroers. Also would make fake containers that you could only select with mq2 that would crash you when you opened em. Sounds like that's what you're hitting. (at least that was the way I understood what they did in Shadowhaven for a while) All else fails... have it do /face loc (loc of where the barrel is) and /keypress u. I did a macro a while back that did misty thicket picnics in Shadowhaven and I remember having trouble with taht barrel too.
 
Thanks Timbuktu, I'll try that out. I'm sure it's named right because I didn't change the name from when it was designed to work in Abysmal Sea, and it's the same container type. Thanks for the help, I'll let you know how it goes.
 
I'll delete this if it works because I haven't tried it yet. But can someone double check there are no errors in this code:

**EDIT**
Everything is in working order now, except for the end crash which I'm still trying to fix. I tried your idea, didn't make a difference. I changed the coding, because for some reason it kept saying Buying water flask. Done. Buying Soda. Buying soda until I get 300.

The thing is I only wanted it to buy 100. Then when it finished buying 300 sodas it went straight to the champagne recipe without even attempting to make the soda water recipe. So, I fixxed everything up nice so it all works, but then it says /nomodkey /itemtarget brew barrel notarget unknown target and gives me an error number or something like that. I keep trying to write the exact error down but it crashes and I cant see it anymore.

Anyway, I'm going to keep trying to fix it. Should be done within an hour or so, if that. I just re-read the macro and found 1 or 2 more errors. I'm going to thoroughly read everything just to ensure I'm not missing anything. Like I said before, any help appreciated and I'll update you as much as I can.

Rich (BB code):
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Begin 
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :start

|--- Check Current Skill against Skill wanted 
    /echo Brewing is at ${Me.Skill[Brewing]}

    /if (${Me.Skill[Brewing]}>=${SkillMaxWanted}) {
      /echo Brewing is at ${SkillMaxWanted}. Quiting!
      /endmacro
    }

    /if (${FindItemCount[=Soda Water]}<5) {
    /echo You have less than 5 Soda Water! Combining more for you.
    /varset CombItemName MQSW
    /varset ItemTo "Soda Water"
    /call ReadIni "${CombItemName}"
    /target "${MerchantNameA}"

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[1]}" 100

    /call Buy "Soda" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

	 ELSE {

    /if (${Me.Skill[Brewing]}>=248 && ${Me.Skill[Brewing]}<=300) {
      /varset CombItemName "MQBC"
      /varset ItemTo "Brut Champagne"
    }

    /call ReadIni "${CombItemName}"
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Buy Components
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /varset EndingVar 1
    /varset NewUI 1

    /echo moving to ${MerchantNameA}

    /if (!${CombItemName.Equal[MQSW]}) {

    /target "${MerchantNameA}"

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call Buy "${Component[1]}" 100

    /call Buy "${Component[2]}" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    }

	 ELSE {

    /target ${MerchantNameA}

    /nomodkey /click right target

    /delay 5s ${Window[MerchantWnd].Open}

    /call OpenPacks

    /call Buy "${Component[2]}" 300

    /call Buy "${Component[4]}" 100

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /echo Moving to the Barrel

    /call Movement 1 0 0
 
Last edited:
Alright, crash is fixed. Everythings working, only problem is the macro just combines 1 soda water, sells it, and repeats. Going to try and fix that now haha.
 
Macro Help

Users who are viewing this thread

Back
Top