Skip to content

LinesPerCycle

linespercycle {lines}

Also searchable as: LinesPerCycle · speed · lpc

A script runs in cycles: it runs a number of lines, then pauses 50 ms, which leaves the computer to the UO client. linespercycle sets that number. It does the same as set #LPC: see #LPC.

The default is 10, and a script starts with 10 again each time it is run. 0 and negative numbers are ignored.

Raise it to make plain calculations run faster, for example while building a big menu window. Commands that wait for the client, such as finditem or the event commands, take the time they need regardless.

linespercycle 1000 ; add up 1 to 1000 quickly
set %sum 0
for %i 1 1000
set %sum %sum + %i
linespercycle 10
display ok The sum is %sum
halt

See also

Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.