• 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

Brewing Tradeskill mac

Joined
May 21, 2014
RedCents
994¢
I scrounged around and found a Brewing tradeskill macro I could get running. I want to have it evovlve the tradeskill trophy as it goes. Right now it goes all the way to 248, but you have to learn the Minotaur Hero's Brew recipe and put it in your favorites for it to work. Any help getting the trophy to evolve would be greatly appreciated.

Here are the relevant files:


Brewing.mac
Rich (BB code):
| Brew.mac version 1.0
|
| Written by Armysoldier
|
| 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 Abysmal Sea
|
| *** FOR THIS CODE TO WORK ***
| You need to Stand between Dray Curves and Galidnus Corkpopper
| 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
	/declare Trophytrigger string outer
	/declare CurrentSkill int outer ${Me.Skill[Brewing]}

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

    /varset MerchantNameA "Galidnus Corkpopper" 
    /varset MerchantNameB "Dray Cuves" 
    /varset SkillMaxWanted 248
    /varset DelayMult 1
    /declare Filename string outer Brewing.ini
	/varset Trophytrigger ${Ini[${Filename},Default,Trophy,yes]} 

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

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

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

	/if (${Zone.ID}!=279) { 
		/echo You must be in The Abysmal Sea, between ${MerchantNameA} and ${MerchantNameB}, before starting this macro.
		/end
	} else {
		/if (${Spawn[${MerchantNameA}].Distance}>35 || ${Spawn[${MerchantNameB}].Distance}>35) {
			/echo You must be in The Abysmal Sea, between ${MerchantNameA} and ${MerchantNameB}, before starting this macro.
			/end
		}
	}
    :start
	/if (${Zone.ID}!=279) /end
|--- Check Current Skill against Skill wanted 
	/echo Brewing is currently at ${CurrentSkill}.
	/if (${SkillMaxWanted}==300 && ${Trophytrigger.Equal[yes]}) {
		/varset SkillMaxWanted 301
		/echo Brewing is currently at ${CurrentSkill}, max is set to ${SkillMaxWanted} (for trophy evolution).
	} else {
		/if (${CurrentSkill}>=${SkillMaxWanted}) {
			/echo Brewing is currently at ${CurrentSkill}, max is set to ${SkillMaxWanted}.  Total skill ups this session: ${TotalSkillUps}
			/echo Stopping macro!
			/end
		}
	}
  |  /echo Brewing is at ${Me.Skill[Brewing]}

    /if (${Me.Skill[Brewing]}>=${SkillMaxWanted}) {
      /echo Brewing is at ${SkillMaxWanted}. Quiting!
      /endmacro
    }
      /varset CombItemName "MHB"
      /varset ItemTo "Minotaur Hero's Brew"
      /varset ItemToB "bottle"
      /varset ItemToC "cask"

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

    /varset EndingVar 1
    /varset NewUI 1

    /target ${MerchantNameA}

    /nomodkey /click right target

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

    /call OpenPacks

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

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

    /call Buy "${Component[3]}" 80

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /echo Buying from ${MerchantNameB}

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

    /nomodkey /click right target

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

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

    /call Buy "${Component[5]}" 160

    /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp

    /call ClosePacks

    /echo Moving to the Barrel

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

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

    /echo Moving to ${MerchantNameA}
    /echo Selling off and starting over
    /call Movement 2 2 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


Brewing.ini
Rich (BB code):
[Abysmal Sea]
Value=2
Loc1=-212.82,169.36
Loc2=-167.32,171.46
 
 
[MHB]
Cont=Enviro
Comp0=yeast
Comp1=malt
Comp2=cask
Comp3=Water flask
Comp4=short beer
Comp5=short beer
Comp6=water flask
Comp7=malt
Comp8=malt

The following files in the \Macros\Common folder.

Rich (BB code):
| 
| buy.inc 
| Buy Include File needed for macros 
| Version 1.7b 
| 
| Date: August 20, 2005 
| UPDATED BY OUNVME 
| 
| 14 MAR 2006: Armysoldier refined code to improve speed 
| 
| These file MUST be in the common directory in your macros directory. 
| 
| Usage: /call Buy (ItemToBuy) (Amount Needed) 
| 
| Use the Buy function for buying if you need a set total amount, like if you have 
| 20 of the item on you already and you need a total of 30, it will only buy 10 
| of the item. 
| 
| Usage: /call PCBuy (ItemToBuy) (Amount to buy off merchant) 
| 
| Use the PCBuy function if you don't need a set total amount, you just need 
| a set amount off that merchant. 
| 
| Disclaimer: 
| Code was used from other programers also from the MQ Forums. 
| 


#event Broke1 "#*#You cannot afford#*#" 
#event Broke2 "#*#You can't afford#*#" 
#event BuyFullInv "#*#Your inventory appears full! How can you buy more?#*#" 

Sub Buy(Item ItemToBuy, int amount) 
	|/echo Buying ${ItemToBuy}! 
	/declare QTY int Inner 
	/declare l2 int local
	/declare LastItemCount int local
	/declare CurrentItemCount int local
	/varset LastItemCount ${Window[MerchantWnd].Child[ItemList].Items}
	|---SMALL delay to allow the MERCHANT Window to populate
	/delay ${Math.Calc[${DelayMult}*2]}s
	/varset QTY ${Math.Calc[${amount}-${FindItemCount[=${ItemToBuy}]}]} 
	:Filling
	/delay 1s 
	/varset CurrentItemCount ${Window[MerchantWnd].Child[ItemList].Items}
	/if (${CurrentItemCount}!=${LastItemCount}) {
		/varset LastItemCount ${Window[MerchantWnd].Child[ItemList].Items}
		/goto :Filling
	}	
	/if (${FindItemCount[=${ItemToBuy}]}>= ${amount}) { 
		/return 
	}    
	/varset l2 ${Window[MerchantWnd].Child[ItemList].List[=${ItemToBuy},2]} 
	/if (!${l2}) { 
		/echo Couldn't find ${ItemToBuy} 
		/end 
	} else { 
		/nomodkey /notify MerchantWnd ItemList listselect ${l2} 
		/delay 2          
	}  
	/echo Buying ${ItemToBuy} until I get ${amount}  
	:Loop 
	/if (${QTY}>19) { 
		|/buyitem 20 
		/call MyBuyItem 20 ${l2} "${ItemToBuy}"
		/delay 1s 
		/doevents 
		/varset QTY ${Math.Calc[${amount}-${FindItemCount[=${ItemToBuy}]}]} 
		/delay 1s
		/goto :Loop 
	} else { 
		/if (${QTY}>0 && ${QTY}<20) { 
			|/buyitem ${QTY} 
			/call MyBuyItem ${QTY} ${l2} "${ItemToBuy}"
			/delay 1s 
		} 
	} 
	/varset QTY ${Math.Calc[${amount}-${FindItemCount[=${ItemToBuy}]}]} 
	/if (${QTY}<=0) { 
		/return 
	} 
	/goto :Loop 
	/return 

Sub PCBuy(Item ItemToBuy, int amount) 
	/declare TotalMItems int Inner 
	/varset TotalMItems ${Merchant.Items} 
	/declare x int Inner 
	/declare ItemSlotNum int Inner 
	/varset ItemSlotNum 0 
	/delay 2s 
	/declare l2 local int 
	/delay 20 
	:BuyPC 
	/varset l2 ${Window[MerchantWnd].Child[ItemList].List[=${ItemToBuy},2]} 
	/if (!${l2}) { 
		/echo Couldn't find ${ItemToBuy} 
		/return
	} else { 
		/nomodkey /notify MerchantWnd ItemList listselect ${l2} 
		/delay 2 
		|/buyitem 4 
		/call MyBuyItem 4 ${l2} "${ItemToBuy}"
		/delay 2 
	} 
	/if (${SelectedItem.Stackable}) { 
		/if (${amount}>=4) { 
			|/buyitem 4 
			/call MyBuyItem 4 ${l2} "${ItemToBuy}"
			/varset amount ${Math.Calc[${amount}-4]} 
		} else { 
			|/buyitem ${amount} 
			/call MyBuyItem ${amount} ${l2} "${ItemToBuy}"
			/varset amount 0
		} 
	} else { 
		|/buyitem 1 
		/call MyBuyItem 1 ${l2} "${ItemToBuy}"
		/varset amount ${Math.Calc[${amount}-1]} 
	} 
	/delay 5 
	/doevents 
	/if (${amount}) /goto :BuyPC 
	/return

Sub MyBuyItem(int MyAmount, int MyIndex, string MyItemToBuy) 
	/declare char string local 
	/declare InStr string local
	/declare loopctr int local 
	/declare BuyStr string local
	/declare QtyStr string local
	/declare x int local
	/declare IndCost int local
	/varset BuyStr ${MyItemToBuy}
	|/echo Buying ${MyAmount} ${BuyStr}
	/if (!${Window[MerchantWnd].Open}) {
		/echo Merchant window is not open!
		/return
	}
	/nomodkey /notify MerchantWnd MW_Buy_Button leftmouseup
	/varset QtyStr ${Window[MerchantWnd].Child[ItemList].List[${MyIndex},3]}
	/varset IndCost ${Window[MerchantWnd].Child[ItemList].List[${MyIndex},4]}
	/if (${IndCost} > ${Me.Platinum}) {
		/echo You are out of money! 
		/beep 
		/end
	}
	/if (!${BuyStr.Find[bow staff]}) {
		/delay 5 ${Window[QuantityWnd].Open}
	}
	/if (${Window[QuantityWnd].Open}) {
		/nomodkey /notify QuantityWnd QTYW_SliderInput leftmouseup 
		/nomodkey /keypress right chat
		/nomodkey /keypress right chat
		/nomodkey /keypress right chat
		/nomodkey /keypress backspace chat
		/nomodkey /keypress backspace chat
		/nomodkey /keypress backspace chat
		/delay 5
		/varset InStr ${MyAmount}
		/for loopctr 1 to ${InStr.Length} 
			/varset char ${InStr.Mid[${loopctr},1]} 
			/if (!${char.Length}) { 
				/nomodkey /keypress Space chat 
			} else { 
				/nomodkey /keypress ${char} chat 
			} 
		/next loopctr 
		/delay 5s ${Window[QuantityWnd].Child[QTYW_Accept_Button].Enabled}  
		/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
		/delay 5s !${Window[QuantityWnd].Open}
		/if (${Window[QuantityWnd].Open}) {
				/echo Merchant window / quantity window close timeout!
				/return
		}
	}
	/return

Sub Event_Broke1
	/echo You are out of money! 
	/beep 
	/end
	/return

Sub Event_Broke2
	/echo You are out of money! 
	/beep 
	/end
	/return

Sub Event_BuyFullInv
	/echo Your inventory is full!
	/beep 
	/end
	/return

Rich (BB code):
| 
| cleanpacks.inc
| cleanpacks Include File needed for macros
| Version 1.1
| Date: August 7, 2004
|
| APR 2 2011: hard coded pack8 in for TS containers in your inventory
|
| MAR 26 2006 : Modified some code to speed up the process (TKS A_Druid_00)
|
| MARCH 06 2006: Added /call ClearCursor to sub
|
| JAN 15 2006: Fixed String issues
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 

Sub cleanPack(string PackName)
	/echo Please Wait ...... Cleaning out ${PackName} container
	/declare iSlot int local    
	/declare iCount int local    
	/declare PackNumber string local
	/call ClearCursor
	/if (${PackName.Equal[Enviro]}) { 
		/varset PackNumber e 
	} else { 
		/varset PackNumber ${FindItem[=${PackName}].InvSlot.ID} 
		/if (${PackNumber}) { 
			/varcalc PackNumber ${PackNumber}-122 
			/varset PackNumber ${PackNumber.Arg[0,.]} 
		} else { 
			/echo Could not find container in your inventory
			/echo Contanier name = ${PackName} 
			/endmacro
		} 
	}
	/if (${PackNumber.Equal[e]}) { 
		/for iSlot 1 to 10 
			/nomodkey /shiftkey /itemnotify enviro${iSlot} leftmouseup
			/delay 1s
			/autoinv
		/next iSlot 
	} else { 
		/if (${Me.Inventory[Pack${PackNumber}].Container}==0) { 
			/return 
		} 
		/for iSlot 1 to ${Me.Inventory[Pack8].Container} 
			| Quit if the pack is empty 
			/if (${Me.Inventory[Pack8].Container}==0) /return 
			/if (${Me.Inventory[Pack8].Item[${iSlot}].ID}!=NULL) { 
				/varset iCount ${Me.Inventory[Pack8].Items} 
				/nomodkey /shiftkey /itemnotify in pack8 ${iSlot} leftmouseup
				/delay 5s ${Cursor.ID} 
				/timed 5 /autoinv 
				/delay 5s !${Cursor.ID}
				/if (${Me.Inventory[Pack8].Items}==${iCount}) { 
					/echo Unable to empty container. 
					/endmacro 
				} 
			} 
		/next iSlot 
	} 
	/echo Done Cleaning ${PackName} Container. Thank you for waiting!
	/return


Rich (BB code):
|
| CommonSubs.inc
|
| 1 APR 2006: fixed Clear cursor
|             fixed the EVENT Container in use 
|             fixed The NEW UI - Favorite recipe selection
|
| 26 MAR 2006: Moved Salvage and Readini Sub to here
|              Changed some redundant coding
|              Changed clear cursor to A_Druid_00 clear cursor code
|              Added /nomodkey to all /notify statements
|
#event CombineError "#*#There was no place to put that#*#" 
#event CombineError "#*#You cannot combine these items in this container type!#*#" 
#event CombineError "#*#did not accept these items#*#" 
#event CombineError "#*#You are missing#*#" 
#event Advance "#*#You can no longer advance #*#" 
#event ContUsed "#*#Someone else is using that. Try again later.#*#" 
#event End "#*#can not afford#*#" 
#Event Skillup "#*#become better at#*#" 
#Event Salvage "You failed the combine, but you managed to recover #*#" 


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Type input string "Recipe" into search box in new tradeskill interface, 
| click search and select the first recipe returned in the search results. 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub ChooseRecipe 
         /delay 1s
         /nomodkey /notify TradeskillWnd COMBW_SearchTextEdit leftmouseup 
         /delay 5 
         /echo Searching for Recipe
         /call Type "${ItemTo}"

|--- First Check to see if Recipe is in favorites

	   /nomodkey /notify TradeskillWnd COMBW_RecipeList listselect ${Window[TradeskillWnd].Child[COMBW_RecipeList].List[${ItemTo}]} 
	   /delay 2 

           /varset Checkrecipe ${Window[TradeskillWnd].Child[COMBW_RecipeList].List[${ItemTo}]}

|--- Its not in Favorites.. so lets type it in and do a search
      /if (!${Checkrecipe}) {

           /delay 8s  
           /nomodkey /notify TradeskillWnd COMBW_SearchButton leftmouseup 
           /delay 10 
	   /nomodkey /notify TradeskillWnd COMBW_RecipeList listselect ${Window[TradeskillWnd].Child[COMBW_RecipeList].List[${ItemTo}]} 
	   /delay 2 
           /varset Checkrecipe ${Window[TradeskillWnd].Child[COMBW_RecipeList].List[${ItemTo}]}

|--- Search could not find it either so lets do a old school combine
           /if (!${Checkrecipe}) {
                /nomodkey /notify TradeskillWnd COMBW_ExperimentButton leftmouseup
               /varset NewUI 2
               /call OLDUICOMBINE
               /nomodkey /notify ${PackCode} Container_DoneButton Leftmouseup
               /return
               } else {
                     /call DoCombine
                     }
        } else {
              /call DoCombine
              }
    /nomodkey /notify TradeskillWnd COMBW_CloseButton Leftmouseup
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Type out the input string.   
| 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Sub Type(InStr) 
   /echo trying to enter Recipe Desired
   /declare char string local 
   /declare loopctr int local 
   /for loopctr 1 to ${InStr.Length} 
      /varset char ${InStr.Mid[${loopctr},1]} 
      /if (!${char.Length}) { 
         /nomodkey /keypress space chat 
      } else { 
         /nomodkey /keypress ${char} chat 
      } 
   /next loopctr 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub DoCombine
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub DoCombine
        /call ClearCursor 
    :Loop 
	/nomodkey /notify TradeskillWnd CombineButton leftmouseup 
        /delay 2s ${Cursor.ID} 
        /call ClearCursor 

      	/doevents 
        /delay 2
      /if (${EndingVar}==1) /goto :Loop
      /varset EndingVar 1 

    /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Clear Cursor
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub ClearCursor 
/declare x int local 
:auto_inv 
/if (${Cursor.ID}) { 
  /if (${Cursor.Container}) { 
    /for x 1 to 10 
    /if (!${InvSlot[pack${x}].Item.Container}) /nomodkey /itemnotify pack${x} leftmouseup 
    /next x 
  } else { 
    /timed 5 /autoinventory 
  } 
  /goto :auto_inv 
} 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub OLD UI COMBINE
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub OLDUICOMBINE
   /echo recipe not found yet .. Going old school

   /call OpenPacks
   /call cleanPack "${Container}"

    :Begin
       /doevents
       /if (${EndingVar}==1) {
       /call ClearCursor 
       /for i 1 to 10 
       /call AddComp "${Component[${i}]}" ${i} 
       /next i
       /delay ${Math.Calc[${DelayMult}*1]}s
       /call OldDoCombine 
       /doevents
       /goto :Begin
}
/return


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Movement Sub
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sub Movement(Start,Finish,Door)
  /declare Location int inner
  /for Location ${Start} to ${Finish}
     :MoveLoop
     /face nolook loc ${LocArray[${Location}]}
     /if (${Math.Distance[${LocArray[${Location}]}]}>4) {
        /nomodkey /keypress forward hold
        /face nolook loc ${LocArray[${Location}]}

        /if (${Location}==${Door}) {
        /nomodkey /keypress USE
        /nomodkey /keypress USE
         }
     }
     /if (${Math.Distance[${LocArray[${Location}]}]}<=4) {
        /nomodkey /keypress forward
        /goto :next
     }
     /goto :MoveLoop
     :next
  /next Location
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Add Components
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
sub AddComp(CompName, PackSlot) 
   /if (${CompName.Equal[NOTFOUND]}) /return 

   /if (!${FindItem[=${CompName}].ID}) { 
      /echo Could not find ${CompName} in inventory 
      /beep 
      /varset EndingVar 2
      /return 
    } 

   :Loop 
      /nomodkey /ctrl /itemnotify ${FindItem[=${CompName}].InvSlot} leftmouseup 

      /if (!${Cursor.ID}) { 
         /delay ${Math.Calc[${DelayMult}*1]}s
         /goto :Loop 
      } 

   /if (${PackCode.Equal[Enviro]}) { 
      /nomodkey /itemnotify ${InvSlot[enviro${PackSlot}]} leftmouseup 
   } else { 
      /nomodkey /itemnotify in ${PackCode} ${PackSlot} leftmouseup 
   }
   /doevents    
   /return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Do the Combine
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
sub OldDoCombine 
/combine ${PackCode} 
/doevents 
/delay ${Math.Calc[${DelayMult}*1]}s
/delay 5s ${Cursor.ID} 
/Call ClearCursor
/doevents 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Read INI file for Loc array
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sub ReadINIA(FileName,SectionName) 
	/echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}... 
	/if (${Ini[${FileName},${SectionName}].Count[|]}==0) { 
		/echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro... 
		/return
	}
   } 
   /declare nValues     int local 
   /declare nArray      int local  0 

|~~~~~~~~~~~~~~~~~~~~~~ Locs ~~~~~~~~~~~~~~~~~
   /Varset nValues ${Ini[${FileName},${SectionName},Value]}
   /echo ${nValues} Locs
   :MakeArraylo 
   /if (!${nValues}) /return
   /if (${nValues}) { 
      /echo Declaring Loc Array... 
      /declare LocArray[${nValues}]  string outer
   }
   /for nArray 1 to ${nValues}
      /varset LocArray[${nArray}] ${Ini[${FileName},${SectionName},Loc${nArray}]}
      /echo  loc ${nArray} defined ${LocArray[${nArray}]}

   /next nArray



   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 

/return 


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
|Sub Event Container being used 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Event_ContUsed 
/echo Container in use. Waiting 1 Minute, or until no PCs are nearby and trying again. 
/delay 1m ${SpawnCount[pc radius 50]}<=1
/doevents 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Combine error
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_CombineError
    /varset EndingVar 2
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event End
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Event_End
    /call Ending
/return

Sub Ending
    /echo macro ending
    /end 
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub READ Ini File
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub ReadIni(RecipeName) 

    /echo Running ${RecipeName} recipe 

   /if (${Ini[${Filename},${RecipeName}].Count[|]}==0) { 
        /echo Recipe ${RecipeName} not found 
        /endmacro 
    } 

   /varset Container ${Ini[${Filename},${RecipeName},Cont,Enviro]} 

   /if (${Container.Equal[Enviro]}) { 
        /varset PackCode Enviro 
   } else { 
        /varset PackCode ${FindItem[=${Container}].InvSlot} 
       
      /if (${PackCode.Equal[NULL]}) { 
         /echo Could not find container ${Container} 
         /varset EndingVar 2
         /return
      } 
      | pack1 = 22, ... , pack10 = 31 
      /varset PackCode pack${Math.Calc[${PackCode}-22].Int} 
   }  

    /for i 1 to 10 
        /varset Component[${i}] ${Ini[${Filename},${RecipeName},Comp${Math.Calc[${i}-1].Int},NOTFOUND]}

    /next i 
    /return 


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Salvage
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Event_Salvage

        /if (${NewUI}==2) /call cleanPack "${Container}"

/return


Rich (BB code):
| 
| packs.inc
| Open and Close Packs Include File needed for macros
| Version 1.4
| Date: August 7, 2004
|
| DEC 1 2008 : Changed to updated code (TKS JJ)
| MAR 26 2006 : Modified some code to speed up the process (TKS A_Druid_00)
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 

Sub OpenPacks 
	/keypress open_inv_bags
	/return 

Sub ClosePacks 
	/keypress close_inv_bags
	/return

Rich (BB code):
| 
| sell.inc
| Selling Include File needed for macros
| Version 1.3
| Date: August 7, 2004
|
| 17 Mar 2006: Further refined by A_Druid_00
|
| 14 MAR 2006: Armysoldier refined code to improve speed
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 

Sub Sell(string ItemToSell)
	/declare OldMoney int Inner    
	/call ClearCursor
	/if (${ItemToSell.Equal[NULL]})  /return
	/delay 2s
	:Finding 
	/if (${FindItemCount[=${ItemToSell}]}) { 
		/nomodkey /itemnotify ${FindItem[=${ItemToSell}].InvSlot} leftmouseup 
		/delay 5 ${SelectedItem.ID}==${FindItem[=${ItemToSell}].ID}
		/if (${SelectedItem.ID}==${FindItem[=${ItemToSell}].ID}) {
			/delay 1s
			/varset OldMoney ${Me.Cash} 
			/nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup 
			/delay 2s (${Me.Cash}!=${OldMoney})
		}
		/goto :Finding 
	}
	/echo No more ${ItemToSell} to sell!!!      
	/return
 
Just grab as many indigents as you can and use the combine mac. Its so much easier. Armysoldiers maces have been broken forever.
 
Brewing Tradeskill mac

Users who are viewing this thread

Back
Top
Cart