ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: 12TimesOver on August 12, 2011, 11:06:09 AM

Title: Wait command
Post by: 12TimesOver on August 12, 2011, 11:06:09 AM
Can anyone tell me if the Wait command supports the use of an equation as the value or if it requires the actual value to be set first? For example -

I know I can do this:
Code: [Select]
set %Wait 50
Wait %Wait

But can I do this?
Code: [Select]
Wait ( 25 + 25 )
Or, more imporatantly, I know that I can do this:
Code: [Select]
gosub PoisonItem
set %TempSCNT2 #SCNT2
gosub CureAndHeal
set %PoisWait 180 - ( ( #SCNT2 - %TempSCNT2 ) * 2 ) ;set %PoisWait to 9 seconds minus the time that already went by during the Healing/Curing sub call
wait %PoisWait

But can I do this?
Code: [Select]
gosub PoisonItem
set %TempSCNT2 #SCNT2
gosub CureAndHeal
Wait 180 - ( ( #SCNT2 - %TempSCNT2 ) * 2 ) ;Same as above without first setting the variable

X
Title: Re: Wait command
Post by: TrailMyx on August 12, 2011, 12:15:55 PM
That's a good question.  There are times when the EUO parser doesn't parse out what you think might be logical.  Good cases in point are found in the menu commands as well as the display command.
Title: Re: Wait command
Post by: 12TimesOver on August 12, 2011, 02:42:05 PM
K, made it home from work and had a chance to test a little. Looks like it won't parse the equation, it needs to have the variable set first then the variable used.

wait 20 - resulted in a 1 second wait as expected
wait 10 + 10 - resulted in a .5 second wait, the + 10 was ignored
wait ( 10 + 10 ) - resulted in no wait at all

So there we go...

X
Title: Re: Wait command
Post by: gimlet on August 12, 2011, 04:01:56 PM
How about

wait %wait - 10
Title: Re: Wait command
Post by: 12TimesOver on August 12, 2011, 04:23:34 PM
How about

wait %wait - 10
It waited only the value of %wait, ignoring the equation following the variable.

X
Title: Re: Wait command
Post by: Crome969 on August 14, 2011, 12:12:36 PM
In Openuo it would work as you like:
Code: [Select]
wait((((2*75)+(7.5*3))/3.5))as extreme sample.
in easyuo i think you must do:
Code: [Select]
set %Curwait ( 10 *4) + (3*2)
wait %Curwait
Hope it Helps...

Crome
Title: Re: Wait command
Post by: 12TimesOver on August 14, 2011, 04:26:53 PM
In Openuo it would work as you like:
Code: [Select]
wait((((2*75)+(7.5*3))/3.5))as extreme sample.
in easyuo i think you must do:
Code: [Select]
set %Curwait ( 10 *4) + (3*2)
wait %Curwait
Hope it Helps...
Thanks m8. I'm good as far as setting the variable first, I do that all the time. I was just wondering if the parser would allow you to set the equation as the wait time directly but seems like no dice.

Sounds like OpenEUO handles things a little more efficiently.

X
Title: Re: Wait command
Post by: Crome969 on August 14, 2011, 09:12:27 PM
Well Compared to Openuo, euo goes allways the harder, more stupid, and less free controlable way.
But for having just one Result, euo gives you a clear path to it, no exception.

Crome