687 @verb #7214:"pop" this none this rxd #7214 @program #7214:"pop" this none this COLS = 72 NOW = time() ageSegment = (NOW - 770494361) / COLS age_buckets = $list_utils:make(COLS + 1) maxBucket = 0 for x in (players()) try i = age_buckets[(NOW - x.first_connect_time) / ageSegment] age_buckets[(NOW - x.first_connect_time) / ageSegment] = i + 1 except (E_RANGE, E_PROPNF) "Pbbt, take that Cats!" endtry maxBucket = max(i + 1, maxBucket) "Yeah, that could've been instead done with maxBucket = max(@age_buckets); so sue me." endfor player:tell("age_buckets: " + toliteral(age_buckets)) desc = {} for y in [1..35] line = $string_utils:left(y % 2 ? "" | tostr(toint(tofloat(y) * tofloat(maxBucket) / 35.0)), 3) for x in [1..COLS] line = line + (toint(tofloat(age_buckets[x]) * 35.0 / tofloat(maxBucket)) > y ? "*" | " ") endfor index(line, "*") && (desc[1..0] = {line}) endfor desc = {@desc, $string_utils:space(COLS + 1, "=")} desc = {@desc, $string_utils:space(COLS + 1)} first_year = toint($string_utils:explode(ctime(770494361))[5]) this_year = toint($string_utils:explode(ctime(NOW))[5]) for y in [first_year..this_year] datestring = "Mon Jan 01 00:00:00 " + tostr(y) + " GMT" when = NOW - $time_utils:from_ctime(datestring) try desc[$][when / ageSegment + 1..when / ageSegment + length(tostr(y)) + 6] = "^ 01/" + tostr(y) except (E_RANGE) "" endtry endfor desc[$ - 1] = " " + desc[$ - 1] desc[$] = " " + desc[$] return {"This graph displays a histogram plotting the first connect times of MOOers.", @desc} "Last modified by JS (#7214) on Sat Jul 21 01:46:10 2001 MDT." . 0