Felladrin submitted a new resource:

Time Command - Recplacement for the default [Time command that also informs the in-game time of current region.

Time Command

This is a recplacement for the default [Time command. It informs the in-game time of your current region besides the the real-world time (UTC).

View attachment 4848

Installation
  1. Drop this script anywhere inside your Scripts folder.
  2. Delete the default Time Command file: Scripts/Commands/ShardTime.cs

Read more about this resource...
 
使用服务器;
Provide a modification to enable this code to run on Runuo2.0:

Using Server;

Using Server Commands;

Using Server Items;



Namespace Felladrin.Commands

{

Public static class Time

{

Public static void Initialize()

{

CommandSystem Register ("Time", AccessiLevel. Player, new CommandEventHandler (OnCommand));

}



[Usage ("Time")]

[Description ("Informs the in game time of your current region and also the real world time (UTC).")]

Public static void OnCommand (CommandEventArgs e)

{

Mobile m=e.Mobile;

Int currentHour, currentMinute;

Clock GetTime (m.Map, m.X, m.Y, out currentHour, out currentMinute);

m. SendMessage ("It's {0} now in {1}.", System. DateTime. Parse (currentHour+":"+currentMinute) ToString ("HH: mm"), (m.Region. Name?? m. Map. Name));

m. SendMessage ("Real World UTC: {0}.", System. DateTime. UtcNow. ToString ("HH: mm"));

}

}

}
 
Back