45 lines
No EOL
1.3 KiB
C#
45 lines
No EOL
1.3 KiB
C#
using System;
|
|
using Server;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Server.Misc;
|
|
using Server.Items;
|
|
using Server.Network;
|
|
using Server.Commands;
|
|
using Server.Commands.Generic;
|
|
using Server.Mobiles;
|
|
using Server.Accounting;
|
|
using Server.Regions;
|
|
using System.IO;
|
|
|
|
namespace Server.Scripts.Commands
|
|
{
|
|
public class GoLog
|
|
{
|
|
public static void Initialize()
|
|
{
|
|
CommandSystem.Register("GoLog", AccessLevel.Counselor, new CommandEventHandler( GoLogs ));
|
|
}
|
|
|
|
[Usage("GoLog")]
|
|
[Description("Records the x, y, and z coordinates of the caller...for the go menu.")]
|
|
public static void GoLogs( CommandEventArgs e )
|
|
{
|
|
string sX = e.Mobile.X.ToString();
|
|
string sY = e.Mobile.Y.ToString();
|
|
string sZ = e.Mobile.Z.ToString();
|
|
|
|
string sRegion = e.Mobile.Region.Name;
|
|
|
|
string sMap = "Map.Britannia";
|
|
if ( e.Mobile.Map == Map.Underworld ){ sMap = "Map.Underworld"; }
|
|
|
|
StreamWriter w = File.AppendText("go.txt");
|
|
w.WriteLine( "<child name=\"xxxxxxxxx\" x=\"" + sX + "\" y=\"" + sY + "\" z=\"" + sZ + "\" />" );
|
|
|
|
w.Close();
|
|
|
|
e.Mobile.SendMessage( sRegion + " " + "(" + sX + ", " + sY + ", " + sZ + ") " + sMap );
|
|
}
|
|
}
|
|
} |