Ever since the night description code was put into the mud, I've been interested in having other things be day/night - like smell and listen - and sometimes even touch. A couple years ago Parnassus came up with something that didn't quite work, but it is the basis for what I've started using which is this:
if %time.hour% > 6 && %time.hour% <21
return 0
halt
else
This checks to see if the hour is between 6am and 9pm (daylight hours for the mud). If it is, it will use whatever I have put into the listen/smell room description. If it isn't - that's where the else comes in.
if %cmd.mudcommand%==listen
%send% %actor% - whatever it is you want them to hear at night that isn't there during the day.
halt
elseif %cmd.mudcommand%==smell
%send% %actor% - whatever it is you want them to smell at night that isn't there during the day
halt
else
return 0 - in case the player is trying to do something other than listen or smell, like move or look at things or... stuff like that.
end
Obviously if you do this for more than one room, you'll have to add a check in for the room vnum (which, strangely %room.vnum% doesn't seem to work, but %actor.room.vnum% does).
So, in the end my current script looks like this:
if %time.hour% > 6 && %time.hour% <21
return 0
halt
else
if %cmd.mudcommand%==listen
if %actor.room.vnum% == 47108
%send% %actor% You hear some horses whiney from the barn.
halt
elseif %actor.room.vnum%== 47113
%send% %actor% You hear horses whineying a complaint from the barn.
halt
end
elseif %cmd.mudcommand%==smell
if %actor.room.vnum%==47108
%send% %actor% There is a strong scent of manure coming from the barn.
halt
elseif %actor.room.vnum%==47113
%send% %actor% The smell of fresh manure assaults you from the pasture to the south.
halt
else
return 0
end
else
return 0
end
else
return 0
end