Hey everyone. I'm playing an old school game called Helbreath and I'm trying to make a little more complex macro for the Manufacturing skill.
What I need to be able to do is grab the text "Successful" when I successfully create an Item and then add it to a counter. Sometimes you fail sometimes you succeed. But I want to be able to count the success then move on to the next part of the macro.
I would like to be able to make X number of item A, then make Y number of item B, then make Item C, then go back and repeat.
I have no issues with the completion of the items I'm trying to make. For it's just a series of mouse move's and clicks. Only the grabbing of info from in the game is holding me up.
Text Capture - Add counter help
Moderators: Dorian (MJT support), JRL
Re: Text Capture - Add counter help
So this is kind of where I'm at.. I'm not sure what to do now
LET>REPEAT=0
LABEL>REPEAT LOOP
IF>REPEAT=2,DONE_REPEATING
//Make Super Coal(Item A)
MouseMove>350,232
Wait>.01
Ldown
Wait>.01
Lup
Wait>.01
Ldown
Wait>.01
Lup
Wait>2
Ldown
Wait>.01
Lup
Wait>1.8
GetTextInit
GetWindowTextEx>Helbreath Olympia 6.4,result
Wait>1
IF>result=Item manufacture success!
ADD>REPEAT,1
ELSE
GOTO>REPEAT LOOP
ENDIF
Wait>1
LABEL>DONE_REPEATING
If I could just get this much to work.. I could figure out the rest of the macro just fine. Any suggestions?
LET>REPEAT=0
LABEL>REPEAT LOOP
IF>REPEAT=2,DONE_REPEATING
//Make Super Coal(Item A)
MouseMove>350,232
Wait>.01
Ldown
Wait>.01
Lup
Wait>.01
Ldown
Wait>.01
Lup
Wait>2
Ldown
Wait>.01
Lup
Wait>1.8
GetTextInit
GetWindowTextEx>Helbreath Olympia 6.4,result
Wait>1
IF>result=Item manufacture success!
ADD>REPEAT,1
ELSE
GOTO>REPEAT LOOP
ENDIF
Wait>1
LABEL>DONE_REPEATING
If I could just get this much to work.. I could figure out the rest of the macro just fine. Any suggestions?
Re: Text Capture - Add counter help
So this is a great macro assuming you never fail.. Which is not the case.. but it works..
Label>Start
Let>CoalBar=0
Let>IronBar=0
Let>Flach=0
Label>Coal
//Make Super Coal(Item A)
MouseMove>350,232
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>CoalBar,1
IF>CoalBar=48,Iron
Goto>Coal
Label>Iron
//Make Iron Bar
MouseMove>350,249
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>IronBar,1
IF>IronBar=32,Flachion
Goto>Iron
Label>Flachion
//Make Flachion
MouseMove>350,412
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>Flach,1
Goto>Flachion
If>Flach=16,Start
Label>Start
Let>CoalBar=0
Let>IronBar=0
Let>Flach=0
Label>Coal
//Make Super Coal(Item A)
MouseMove>350,232
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>CoalBar,1
IF>CoalBar=48,Iron
Goto>Coal
Label>Iron
//Make Iron Bar
MouseMove>350,249
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>IronBar,1
IF>IronBar=32,Flachion
Goto>Iron
Label>Flachion
//Make Flachion
MouseMove>350,412
Wait>.05
Ldown
Wait>.05
Lup
Wait>.05
Ldown
Wait>.05
Lup
Wait>1.9
Ldown
Wait>.05
Lup
Wait>.05
Add>Flach,1
Goto>Flachion
If>Flach=16,Start