ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: The Ghost on May 07, 2015, 06:48:04 PM

Title: %cnt and repeat
Post by: The Ghost on May 07, 2015, 06:48:04 PM
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
Title: Re: %cnt and repeat
Post by: manwinc on May 08, 2015, 07:19:42 AM
That's confusing. Just remove the Repeat until.

For %Cnt 1 8
{
msg one forward$
wait 10
}
Title: Re: %cnt and repeat
Post by: gimlet on May 08, 2015, 08:56:07 AM
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



Title: Re: %cnt and repeat
Post by: The Ghost on May 08, 2015, 09:16:36 AM
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.  
Title: Re: %cnt and repeat
Post by: TrailMyx on May 08, 2015, 09:22:07 AM
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.
Title: Re: %cnt and repeat
Post by: The Ghost on May 08, 2015, 12:53:04 PM
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