Felladrin

Member
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"));

}

}

}
 

Active Shards

  • Unchained
    Custom (Classic)
    • Players
    • 132 Online
    • 273 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 82 Online
    • 137 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 80 Online
    • 190 Peak
  • Insane UO
    Endless Journey
    • Players
    • 74 Online
    • 105 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 29 Online
    • 85 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 20 Online
    • 172 Peak
  • Arth
    Custom (Modern)
    • Players
    • 20 Online
    • 34 Peak
  • Pandora
    Custom (Modern)
    • Players
    • 17 Online
    • 32 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 15 Online
    • 48 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 13 Online
    • 30 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back