ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started 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:
set %Wait 50
Wait %Wait
But can I do this?
Wait ( 25 + 25 )
Or, more imporatantly, I know that I can do this:
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?
gosub PoisonItem
set %TempSCNT2 #SCNT2
gosub CureAndHeal
Wait 180 - ( ( #SCNT2 - %TempSCNT2 ) * 2 ) ;Same as above without first setting the variable
X
-
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.
-
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
-
How about
wait %wait - 10
-
How about
wait %wait - 10
It waited only the value of %wait, ignoring the equation following the variable.
X
-
In Openuo it would work as you like:
wait((((2*75)+(7.5*3))/3.5))
as extreme sample.
in easyuo i think you must do:
set %Curwait ( 10 *4) + (3*2)
wait %Curwait
Hope it Helps...
Crome
-
In Openuo it would work as you like:
wait((((2*75)+(7.5*3))/3.5))
as extreme sample.
in easyuo i think you must do:
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
-
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