Code:
/run local x,y,z,i,s=0,0,10,1,100 CreateFrame"Frame":SetScript("OnUpdate",function(f,e)f.e=(f.e or 0)+e if f.e<1 then return end f.e=0 SendChatMessage(format(".worldport %s %s %s %s",i,x,y,z))x,y=x+s,y+s Screenshot()end)
The number 1 is the number of wait time in seconds. So you could make it f.e<2 for 2 seconds or f.e<8.6 for 8.6 seconds. f.e stands for the frame object which I'm using for the OnUpdate handler, the e is the table index of f which contains the complete time elapsed. Fully written out it would be like this:
Code:
local frame = CreateFrame("Frame")
local elapsed = 0
frame:SetScript("OnUpdate", function(frame, timesincelastupdate)
elapsed = elapsed + timesincelastupdate
if elapsed < 1 then return end -- if less then 1 second passed then we exit the function here
elapsed = 0 -- reset the timer
-- do shit here(take screenshot, worldport and increase values by step
end) -- and end the function