Macro Help...please!

Topics related to Second Age
Post Reply
Demetrius
Posts: 933
Joined: Fri Aug 31, 2012 6:51 pm

Macro Help...please!

Post by Demetrius »

Im trying to create a loop in a macro that if it fails it will repeat the same task over again
E.G.

For (1 to 1) - trying to make it loop
Use skill inscription
(tries to create scroll)
Pause 10 secs
If (Sys message "you fail to inscribe")
End for
End if
For (1 to 1) - trying to make it loop
Use skill inscription
(tries to create scroll)
Pause 10 secs
If (Sys message "you fail to inscribe")
End for
End if
If mana <= 100
Use skill Meditation
Pause 10 sec

This is my macro with two scrolls trying to be made. The macro goes on to make all 7th level scrolls.
What I am trying to do is; if the one scroll isn't inscribed (fails) it will try to make that same scroll again.
Right now if it fails then the macro just keeps going on the to the next stage. What am I doing wrong?
"The secret to acting is to never let them catch you doing it"
-Marlon Brando

User avatar
Bixby Legbone
Posts: 1219
Joined: Sun Mar 31, 2013 2:42 am

Re: Macro Help...please!

Post by Bixby Legbone »

Demetrius wrote:Im trying to create a loop in a macro that if it fails it will repeat the same task over again
E.G.

For (1 to 1) - trying to make it loop
Use skill inscription
(tries to create scroll)
Pause 10 secs
If (Sys message "you fail to inscribe")
End for
End if
For (1 to 1) - trying to make it loop
Use skill inscription
(tries to create scroll)
Pause 10 secs
If (Sys message "you fail to inscribe")
End for
End if
If mana <= 100
Use skill Meditation
Pause 10 sec

This is my macro with two scrolls trying to be made. The macro goes on to make all 7th level scrolls.
What I am trying to do is; if the one scroll isn't inscribed (fails) it will try to make that same scroll again.
Right now if it fails then the macro just keeps going on the to the next stage. What am I doing wrong?

I believe if I were wanting to make all 7th level scrolls, and making sure I re-attempt them if I fail then I might make macros like this:

I would make 1 individual macro for making each scroll. For example flamestrike;

IF mana <= 35
useskill meditation
wait for mana >= 99
Else
Useskill inscription
wait for target
Last target (or target by type depending on your preference)
wait for menu (any)
menuresponse 2
wait for menu (any)
menuresponse 1
Pause 10 seconds
IF sys mesage (fail to inscribe)
execute inscription macro flamestrike
Else
execute (next 7th scroll macro) *this line at the end of the 1st macro for scroll A, then starts the 2nd macro for scroll B.. each macro would start the next one for the next scroll.

If you want to just make 7th level scrolls all day long for as long as you can.. you can have your last macro execute the command to being the 1st one.. that way it loops until it runs out of resources or you hit stop.

This would make sure you're getting the macro right for re-making one scroll if it fails to make it then 1st time.
Image

Demetrius
Posts: 933
Joined: Fri Aug 31, 2012 6:51 pm

Re: Macro Help...please!

Post by Demetrius »

Thanks Bixby,
Its for making spell books with as little clicking as possible. I made a macro for every level. I might even try to make all the little ones into one giant one but one thing at a time.
I will give that a try and see what happens.
"The secret to acting is to never let them catch you doing it"
-Marlon Brando

Patek
UOSA Subscriber!
UOSA Subscriber!
Posts: 324
Joined: Wed Feb 20, 2013 7:53 am

Re: Macro Help...please!

Post by Patek »

As Bix said its a bit cleaner to have each scroll as a different macro and then just call them in succession.

If you want to do all 64 scrolls it in one epic fat-ass macro (not recommended, but hey, why not?), you just use pseudo-loop things ("for" loops with enough repeats for near enough to 100% success chance [below uses 10]). So two scrolls would look like...

// Start scroll 1
if mana <= 80
use skill meditation
wait for mana >=80
end if
use skill inscription
target blanks
menu one
menu two
select scroll 1
wait
for 1 to 10
if sysmessage = "fail"
use skill inscription
target blanks
menu one
menu two
select scroll 1
wait
end if
end for
// End scroll 1
// Start scroll 2
if mana <= 80
use skill meditation
wait for mana >=80
end if
use skill inscription
target blanks
menu one
menu two
select scroll 2
wait
for 1 to 10
if sysmessage = "fail"
use skill inscription
target blanks
menu one
menu two
select scroll 2
wait
end if
end for
// End scroll 2

The above tries to make each scroll and then has a pseudo-infinite "for" loop checking for failure straight after before going to the next scroll. If the scroll succeeds then Razor will just burn through the for loop in about 2 seconds and then go on to the next scroll.

Demetrius
Posts: 933
Joined: Fri Aug 31, 2012 6:51 pm

Re: Macro Help...please!

Post by Demetrius »

what I did was I made a macro called "level 1" and made all the scrolls required for that level. I did that for levels 1-6. Then I made separate macros for each spell for levels 7 and 8.
What I am going to try is to assign each level an execute key and then build my monster macro to look something like this

If mana <=35
Use skill meditation
Wait for mana >=99
Else
execute level one macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
Execute level two macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute Level 3 macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute Level 4 macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute Level 5 macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute Level 6 macro
Pause 100s
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute level 7 macros
pause 2 secs
end if
If mana <=35
Use skill meditation
Wait for mana >=99
execute leve 8 macros
end if
pause 2 sec
execute organizer agent 5
"The secret to acting is to never let them catch you doing it"
-Marlon Brando

Missy B
Posts: 424
Joined: Sun Feb 19, 2012 2:19 am

Re: Macro Help...please!

Post by Missy B »

hey demetrius, this is what i use for making spell books. This is 7th circle, 1st spell. you can use this to create the other 63 macros and linking them together. also, the only thing thats needed to do is set the scrolls as last target and the spell book as an organizing agent.


!Loop
Assistant.Macros.IfAction|1|1|70
Assistant.Macros.UseSkillAction|23
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.LastTargetAction
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|7|8385|0
Assistant.Macros.WaitForMenuAction|0|300
Assistant.Macros.MenuResponseAction|1|8332|0
Assistant.Macros.PauseAction|00:00:10
Assistant.Macros.ElseAction
Assistant.Macros.UseSkillAction|46
Assistant.Macros.PauseAction|00:00:11
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Black Pearl
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Blood Moss
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Ginseng
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Mandrake Root
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Nightshade
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Garlic
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Spider's Silk
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|Sulfurous Ash
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|50|0|20|scrolls
Assistant.Macros.HotKeyAction|0|Restock Agent-3
Assistant.Macros.AbsoluteTargetAction|0|0|1081756719|91|35|0|3701
Assistant.Macros.EndIfAction
Assistant.Macros.IfAction|4|0|backpack
Assistant.Macros.HotKeyAction|0|Play: Incribing\Spellbook\spellbook1\7\2
Assistant.Macros.EndIfAction
Image

Post Reply