Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
Pickled
- a lesser mummy

- Posts: 34
- Joined: Tue Sep 16, 2003 11:29 am
Post
by Pickled » Sat Jul 24, 2004 8:55 am
I simply want to modify the Hunter.mac when it hits the Sub ObstacleHit to loop through this 10 times... (looks bad if keep's getting stuck in walls for ages, people might start to notice things :) -> then if failed after 10 loops -> sit -> camp. I guess i'll need to declare a counter too.
But I can't seem to get the /for syntax correct, could someshow me a simple way of declaring and running a loop 10 times!
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Sat Jul 24, 2004 8:57 am
I believe it would be
Code: Select all
/declare i int
/for i 1 to 10
/next 1
I am not 100% on this, this is a best guess.
Edit removed = from /for line. Thank you Hiipii
Last edited by
aChallenged1 on Sun Jul 25, 2004 7:14 am, edited 2 times in total.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Sat Jul 24, 2004 9:13 am
Here's an example from my root/dotting macro:
Code: Select all
/for DotCounter 1 to ${Dots}
/varset DotActive[${DotCounter}] 0
/next DotCounter
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Sat Jul 24, 2004 10:51 am
Then my example is correct, for his needs.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
hiipii
- a ghoul

- Posts: 93
- Joined: Sat Jun 19, 2004 5:01 pm
Post
by hiipii » Sat Jul 24, 2004 10:21 pm
aChallenged1 you are almost correct but there should not be an equal sign in your code.
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Sun Jul 25, 2004 7:12 am
Thanks hiipii, relic from other scripting language.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sun Jul 25, 2004 8:30 am
aChallenged1 wrote:I believe it would be
Code: Select all
/declare i int
/for i 1 to 10
/next 1
I am not 100% on this, this is a best guess.
Edit removed = from /for line. Thank you Hiipii
Almost:
change
/next 1 to
/next i