View/Edit #1409:hourly

Switch to edit mode.

Name(s): hourly
1:  caller_perms().wizard || raise(E_PERM)
2:  hour = toint(ctime()[12..13])
3:  if (hour > 16 || hour < 6)
4:    return
5:  elseif (index(ctime(), "Sat") == 1 || index(ctime(), "Sun") == 1)
6:    return
7:  endif
8:  datestr = tostr(ctime()[21..24], "/", $time_utils:month() in $time_utils.months, "/", ctime()[9..10], ":", hour)
9:  datestr = strsub(datestr, " ", "")
10: datastr = tostr(datestr, " ")
11: for x in [1..length(this.quotes)]
12:   if (this.quotes[x][2] == -1)
13:     datastr = tostr(datastr, this:_get_index() / 500.0, " ")
14:   else
15:     datastr = tostr(datastr, this.quotes[x][2] / this.initial_prices[x], " ")
16:   endif
17: endfor
18: this:fileappend("plot.data", datastr)
19: for x in (this.quotes)
20:   this:makesmallplot(x[1])
21:   suspend(3)
22:   this:makeplot(x[1])
23:   suspend(3)
24: endfor
25: "Last modified by Dax (#789) on Tue May  3 14:09:33 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Lao-Tzu (#8084)

You are not logged in.

[home | help | who | search | setup | code]