Seeking input, have questions.

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Eru
decaying skeleton
decaying skeleton
Posts: 1
Joined: Tue Sep 09, 2003 12:14 pm
Location: Fort Gordon, GA
Contact:

Seeking input, have questions.

Post by Eru » Tue Sep 09, 2003 12:16 pm

Code: Select all

| Mino.mac 
| 
| Created by Wassup 
|  Editted by Eru for making Minotaur Heroes Brew
| 
| Makes Minotaur Heroes Brew 
| 
| I am certain this macro could me modified easily for other combines. 
| 
| This macro will perform as many combines as you have components VERY quickly. 
|  
#define DelayValue v40 

Sub Main 

   |Set the delay value 
   /varset DelayValue 10

   /sendkey down ctrl 

   :CombineLoop 
|Get first component 
   /finditem "water flask" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :EndIt 

   :ReClick 
|Place water flask in barrel
   /click left enviro 0 
   /delay $DelayValue 
   /if "$cursor(name)"=="Water Flask" /goto :ReClick 

|Get second component 
   /finditem "water flask" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick2 
|Place water flask in barrel 
   /click left enviro 1 
   /delay $DelayValue 
   /if "$cursor(name)"=="water flask" /goto :ReClick2 

|Get third component 
   /finditem "yeast" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick3 
|Place yeast in barrel 
   /click left enviro 2 
   /delay $DelayValue 
   /if "$cursor(name)"=="yeast" /goto :ReClick3 

|Get fourth component 
   /finditem "cask" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick4 
|Place cask in barrel 
   /click left enviro 3 
   /delay $DelayValue 
   /if "$cursor(name)"=="cask" /goto :ReClick4 

|Get fifth component 
   /finditem "short beer" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick5 
|Place short beer in barrel 
   /click left enviro 4 
   /delay $DelayValue 
   /if "$cursor(name)"=="short beer" /goto :ReClick5

|Get sixth component 
   /finditem "short beer" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick6 
|Place short beer in barrel 
   /click left enviro 5 
   /delay $DelayValue 
   /if "$cursor(name)"=="short beer" /goto :ReClick6

|Get seventh component 
   /finditem "malt" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick7 
|Place malt in barrel 
   /click left enviro 6 
   /delay $DelayValue 
   /if "$cursor(name)"=="yeast" /goto :ReClick7  

|Get eighth component 
   /finditem "malt" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick8
|Place malt in barrel 
   /click left enviro 7 
   /delay $DelayValue 
   /if "$cursor(name)"=="yeast" /goto :ReClick8

|Get ninth component 
   /finditem "malt" 
   /delay $DelayValue 
   /if $cursor()!=True /goto :Endit 

   :ReClick8 
|Place malt in barrel 
   /click left enviro 8 
   /delay $DelayValue 
   /if "$cursor(name)"=="yeast" /goto :ReClick9

|Click the Combine button 
   /click left enviro combine 
   :WaitCombine 
   /delay 2

   |Always going to have the cask as a result of the combine 
   /if $cursor()==True { 
       /goto :AutoDrop 
   } else /goto :WaitCombine 

|Drop everything in auto equip 
   :AutoDrop 
   /if $cursor()==True { 
       /click left auto 
       /delay 1 
       /goto :AutoDrop 
   } 

   |Start a new Combine 
   /goto :CombineLoop 

   :EndIt 
   /zapvars 
   /sendkey up ctrl 
   /endmacro 

/return 
First, this needs to run on a pretty mediocre machine. How can I edit it to take the machines speed into accountability? Other than that. Please comment on how you think it might work, if it will, etc. Thanks.

-Eru

edit: Valerian likes code brackets.
I'm here to learn.

User avatar
auth
a ghoul
a ghoul
Posts: 84
Joined: Sun Apr 13, 2003 12:47 am

Post by auth » Tue Sep 09, 2003 12:40 pm

#define DelayValue v40 is just a means of setting up a variable to hold the delay value in the script, which seems to be 10 in that example. all variables have to be initialized in almost any language, and this is the equivalent of initializing it to hold a value. the v40 is just an open slot for holding a value, delayvalue is what stores the number to v40. everytime you call delayvalue, you are actually calling v40, which holds 10 in this example.
Auth - "If it isn't broke, let VI patch it"