RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

".where command"

Nes

Wanderer
".where command"

Hello,

Its there a command like the .where one there is on Sphere... please ?

Please thank you
 

UOT

Knight
I haven't used sphere in ages, so could you tell me what the where does and I can tell you if there is a similar command. If it's to get the location of a targeted object then use [get location, if it's to locate a player use the [who gump.
 

Mina

Wanderer
The where was saying something like : You are in "region name" "x,y,z"

Where x,y,z is for the location...
but it was used by players and not only by gms ...
 

Phantom

Knight
So there isn't a command that does this.

If its not in the Script Submission forum you will have to write it yourself.
 

Mortis

Knight
there is one in script submission or at least there used to be.

do a search for where.

If nothing comes up it is no longer there. Some have disapeared when the forum was down before

***EDIT*****
did a search myself and came up empty handed.

so I will repost it. I forget the original posters name.
[code:1]using System;
using System.Text;
using System.Reflection;
using System.Collections;
using Server;
using Server.Network;
using Server.Targeting;

namespace Server.Scripts.Commands
{
public class Where
{
public static void Initialize()
{
Server.Commands.Register( "Where", AccessLevel.Player, new CommandEventHandler( Where_OnCommand ) );
}

public static void Where_OnCommand( CommandEventArgs e )
{
e.Mobile.SendMessage(11, "I am in {0} ({1}.{2}.{3})", e.Mobile.Region.Name == "" ? "Unknown area" : e.Mobile.Region.Name, e.Mobile.X, e.Mobile.Y, e.Mobile.Z );
}
}
}[/code:1]
 

Wolverana

Wanderer
ahh but that only gives you coords doesn't tell you what region you're in if you do the [get location

I would myself like to alter this to give the [get map location also, but not sure what I would add and I can't find that command anywhere to see what it looks like lol I looked in every file I could and no luck. Mine also is a little different than yours is Mortis:

[code:1]using System;
using System.IO;
using System.Text;
using System.Reflection;
using System.Collections;
using Server;

namespace Server.Scripts.Commands
{
public class Where
{
public static void Initialize()
{
Server.Commands.Register( "Where", AccessLevel.Player, new CommandEventHandler( Where_OnCommand ) );

}

private static void Where_OnCommand( CommandEventArgs e )
{
e.Mobile.Say( "I am in " + e.Mobile.Region.Name );
e.Mobile.Say( e.Mobile.Location.X + ", " + e.Mobile.Location.Y + ", " + e.Mobile.Location.Z);
}
}
}[/code:1]


Also Mortis is there more to your code than that one? seems you have some variables it's using {0}, {1}, etc... that mine doesn't do, so is there something else that goes with that file that it's taking the info from?
 

David

Moderate
The [code:1]{0} ({1}.{2}.{3}[/code:1]Is replaced with [code:1]e.Mobile.Region.Name, e.Mobile.X, e.Mobile.Y, e.Mobile.Z [/code:1]Assuming the region name is not null. :)
 
Top