Mobile

The Mobile class represents an single alive entity. While the Mobile.Serial is unique for each Mobile, Mobile.MobileID is the unique for the Mobile appearance, or image. Sometimes is also called Body or Body ID. Mobiles which dies and leave a corpse behind, they stop existing as Mobiles and instead leave a corpse as a Item object appears.

Table of Contents

Properties

Backpack

Syntax: Mobile.Backpack
Returns: Item

Get the Item representing the backpack of a Mobile. Return null if it doesn't have one.

CanRename

Syntax: Mobile.CanRename
Returns: Boolean

Determine if a mobile can be renamed. (Ex: pets, summons, etc )

Color

Syntax: Mobile.Color
Returns: UInt16

Color of the mobile.

Contains

Syntax: Mobile.Contains
Returns: List[Item]

Returns the list of items present in the Paperdoll (or equivalent) of the Mobile. Might not match the items found using via Layer.

Deleted

Syntax: Mobile.Deleted
Returns: Boolean

Direction

Syntax: Mobile.Direction
Returns: String

Returns the direction of the Mobile.

Fame

Syntax: Mobile.Fame
Returns: Int32

Fame has to be reverse engineered from the title so it is just ranges: 0: neutral - 3 is highest fame

Female

Syntax: Mobile.Female
Returns: Boolean

The Mobile is a female.

Flying

Syntax: Mobile.Flying
Returns: Boolean

The mobile is Flying ( Gargoyle )

Graphics

Syntax: Mobile.Graphics
Returns: UInt16

Hits

Syntax: Mobile.Hits
Returns: Int32

The current hit point of a Mobile. To be read as proportion over Mobile.HitsMax.

HitsMax

Syntax: Mobile.HitsMax
Returns: Int32

Maximum hitpoint of a Mobile.

Hue

Syntax: Mobile.Hue
Returns: UInt16

InParty

Syntax: Mobile.InParty
Returns: Boolean

True: if the Mobile is in your party. - False: otherwise.

IsGhost

Syntax: Mobile.IsGhost
Returns: Boolean

If is a Ghost Match any MobileID in the list: 402, 403, 607, 608, 694, 695, 970

IsHuman

Syntax: Mobile.IsHuman
Returns: Boolean

Check is the Mobile has a human body. Match any MobileID in the list: 183, 184, 185, 186, 400, 401, 402, 403, 605, 606, 607, 608, 666, 667, 694, 744, 745, 747, 748, 750, 751, 970, 695

ItemID

Syntax: Mobile.ItemID
Returns: Int32

Karma

Syntax: Mobile.Karma
Returns: Int32

Karma has to be reverse engineered from the title so it is just ranges: -5: most evil, 0: neutral, 5 most good

KarmaTitle

Syntax: Mobile.KarmaTitle
Returns: String

This is the title string returned from the server

Mana

Syntax: Mobile.Mana
Returns: Int32

The current mana of a Mobile. To be read as proportion over Mobile.ManaMax.

ManaMax

Syntax: Mobile.ManaMax
Returns: Int32

Maximum mana of a Mobile.

Map

Syntax: Mobile.Map
Returns: Int32

Current map or facet.

MobileID

Syntax: Mobile.MobileID
Returns: Int32

Represents the type of Mobile, usually unique for the Mobile image. ( Alias: Mobile.Body )

Mount

Syntax: Mobile.Mount
Returns: Item

Returns the Item assigned to the "Mount" Layer.

Name

Syntax: Mobile.Name
Returns: String

Name of the Mobile.

Notoriety

Syntax: Mobile.Notoriety
Returns: Int32

Get the notoriety of the Mobile. Notorieties: 1: blue, innocent 2: green, friend 3: gray, neutral 4: gray, criminal 5: orange, enemy 6: red, hostile 6: yellow, invulnerable

Paralized

Syntax: Mobile.Paralized
Returns: Boolean

The mobile is Paralyzed.

Poisoned

Syntax: Mobile.Poisoned
Returns: Boolean

The mobile is Poisoned.

Position

Syntax: Mobile.Position
Returns: Point3D

Properties

Syntax: Mobile.Properties
Returns: List[Property]

Get all properties of a Mobile as list of lines of the tooltip.

PropsUpdated

Syntax: Mobile.PropsUpdated
Returns: Boolean

True: Mobile.Properties are updated - False: otherwise.

Quiver

Syntax: Mobile.Quiver
Returns: Item

Get the Item representing the quiver of a Mobile. Return null if it doesn't have one.

Serial

Syntax: Mobile.Serial
Returns: Int32

Stam

Syntax: Mobile.Stam
Returns: Int32

The current stamina of a Mobile. To be read as proportion over Mobile.StamMax.

StamMax

Syntax: Mobile.StamMax
Returns: Int32

Maximum stamina of a Mobile.

Visible

Syntax: Mobile.Visible
Returns: Boolean

True: The Mobile is visible - False: The mobile is hidden.

WarMode

Syntax: Mobile.WarMode
Returns: Boolean

Mobile is in War mode.

YellowHits

Syntax: Mobile.YellowHits
Returns: Boolean

The mobile healthbar is not blue, but yellow.

Methods

DistanceTo

Syntax: Mobile.DistanceTo(other_mobile)

Returns the UO distance between the current Mobile and another one.

Parameters:
  • other_mobile (Mobile): The other mobile.
Returns: Int32

Equals

Syntax: Mobile.Equals(obj)
Parameters:
  • obj (Object)
Returns: Boolean

GetHashCode

Syntax: Mobile.GetHashCode()
Returns: Int32

GetItemOnLayer

Syntax: Mobile.GetItemOnLayer(layer)

Returns the Item associated with a Mobile Layer.

Parameters:
  • layer (String): Layers: Layername RightHand LeftHand Shoes Pants Shirt Head Gloves Ring Neck Waist InnerTorso Bracelet MiddleTorso Earrings Arms Cloak OuterTorso OuterLegs InnerLegs
Returns: Item

UpdateKarma

Syntax: Mobile.UpdateKarma()

Costly! Updates the Fame and Karma of the Mobile, but it can take as long as 1 second to complete.

Returns: Boolean