Author Topic: %cnt and repeat  (Read 3420 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
%cnt and repeat
« on: May 07, 2015, 06:48:04 PM »
0
I'm trying to find a better way to move my ship that just said 8 time  event macro 3 0 one forward   I try to play with this but I don't understand  how to use it.   Can anyone shade some light plx

Code: [Select]
set %cnt 0
repeat
for %cnt 1 8
(
msg one forward$
wait 10
set %cnt %cnt + 1
}
until %cnt = 8

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: %cnt and repeat
« Reply #1 on: May 08, 2015, 07:19:42 AM »
0
That's confusing. Just remove the Repeat until.

For %Cnt 1 8
{
msg one forward$
wait 10
}
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6205
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +274
  • Referrals: 3
    • View Profile
Re: %cnt and repeat
« Reply #2 on: May 08, 2015, 08:56:07 AM »
0
That's confusing. Just remove the Repeat until.

For %Cnt 1 8
{
msg one forward$
wait 10
}

or this should also work


set %cnt 0
repeat
(
msg one forward$
wait 10
set %cnt %cnt + 1
}
until %cnt = 8

or better event Macro {param 1} [param 2] [param 3]

set %cnt 0
repeat
(
event macro 3 0 one forward$
wait 10
set %cnt %cnt + 1
}
until %cnt = 8



« Last Edit: May 08, 2015, 09:01:17 AM by gimlet »

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: %cnt and repeat
« Reply #3 on: May 08, 2015, 09:16:36 AM »
0
That's confusing. Just remove the Repeat until.

For %Cnt 1 8
{
msg one forward$
wait 10
}


ManWinc: I try that yesterday and it was just moving once.    I want fish until I receive the msg their no fish and move 8 title forward.      


** THx  gimlet   will try that later tonight.  
« Last Edit: May 08, 2015, 09:19:51 AM by The Ghost »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: %cnt and repeat
« Reply #4 on: May 08, 2015, 09:22:07 AM »
0
What MWinc suggested should work.  What wasn't working about it?  Perhaps make the wait 20 instead?  Gimlets suggestion of using event macro 3 0 is also a good one.  You just don't need the trailing "$" if you do that.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: %cnt and repeat
« Reply #5 on: May 08, 2015, 12:53:04 PM »
0
Cool

Both code work.  guest last night I was to tired to count and see the text in my journal.  Thx for the help.

 
Code: [Select]
set %cnt 0
repeat
(
msg one forward$
wait 10
set %cnt %cnt + 1
}
until %cnt = 8
halt

and
Code: [Select]
For %Cnt 1 8
{
msg l forward$
wait 10
}
halt

Tags: