Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
72
Scripts/Scripts-master/Commands/ChangeSeason.cs
Normal file
72
Scripts/Scripts-master/Commands/ChangeSeason.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
// ___|========================|___
|
||||
// \ | Written by Felladrin | / This script was released on RunUO Community under the GPL licensing terms.
|
||||
// > | August 2013 | <
|
||||
// /__|========================|__\ [Change Season] - Current version: 1.0 (August 17, 2013)
|
||||
|
||||
using System;
|
||||
using VitaNex.Network;
|
||||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public class ChangeSeason
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("ChangeSeason", AccessLevel.Administrator, new CommandEventHandler(ChangeSeason_OnCommand));
|
||||
|
||||
//Console.WriteLine("The Season for Felucca has been set to Summer.");
|
||||
//Map.Felucca.Season = 1;
|
||||
|
||||
}
|
||||
|
||||
[Usage("ChangeSeason [Spring|Summer|Autumn|Winter|Desolation]")]
|
||||
[Description("Changes the current season of all facets to the specified one.")]
|
||||
public static void ChangeSeason_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
if (e.Length != 1)
|
||||
{
|
||||
e.Mobile.SendMessage("Usage: [ChangeSeason [Spring|Summer|Autumn|Winter|Desolation]");
|
||||
return;
|
||||
}
|
||||
|
||||
int season;
|
||||
|
||||
switch (e.GetString(0).ToLower())
|
||||
{
|
||||
case "spring":
|
||||
season = 0;
|
||||
break;
|
||||
case "summer":
|
||||
season = 1;
|
||||
break;
|
||||
case "autumn":
|
||||
case "fall":
|
||||
season = 2;
|
||||
break;
|
||||
case "winter":
|
||||
season = 3;
|
||||
break;
|
||||
case "desolation":
|
||||
season = 4;
|
||||
break;
|
||||
default:
|
||||
e.Mobile.SendMessage("Usage: [ChangeSeason [Spring|Summer|Autumn|Winter|Desolation]");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Map map in Map.AllMaps)
|
||||
{
|
||||
map.Season = season;
|
||||
|
||||
foreach (Network.NetState ns in Network.NetState.Instances)
|
||||
{
|
||||
if (ns.Mobile == null)
|
||||
continue;
|
||||
|
||||
ns.Send(Network.SeasonChange.Instantiate(ns.Mobile.GetSeason(), true));
|
||||
ns.Mobile.SendEverything();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user