door (#156)(an instance of Generic Post-Apocalypse Exit made by legba)VERB SOURCE CODE: weather_daytime:
"Copied from Generic Post-Apocalypse Room (#110):weather_daytime by Calkins (#150)
Sun Apr 24 22:22:57 1994 EDT";
hour = tonum(ctime(clock = time())[12..13]);
if ((hour < 6) || (hour > 20))
daytime = this.night_msg;
elseif (hour < 9)
daytime = this.morning_msg;
elseif (hour < 18)
daytime = this.day_msg;
else
daytime = this.evening_msg;
endif
noise = abs((((clock / 3600) / 8) * 1103515245) + 12345) % 3;
climate = abs(((clock / 3600) / 24) + noise) % 11;
if (climate == 2)
weather = this.raining_msg;
elseif (climate < 6)
weather = this.warm_msg;
elseif (climate == 8)
weather = this.snowing_msg;
else
weather = this.cool_msg;
endif
if (typeof(args[1]) == STR)
s = strsub(args[1], "%weather", weather);
return strsub(s, "%daytime", daytime);
elseif (typeof(args[1]) == LIST)
l = {};
for s in (args[1])
s = strsub(s, "%weather", weather);
s = strsub(s, "%daytime", daytime);
l = {@l, s};
endfor
return l;
else
return args[1];
endif
.
PROPERTY DATA: |