Target
The Target class provides various methods for targeting Land, Items and Mobiles in game.
TODO: Target Constructors
Methods
Target.AttackTargetFromList(target_name)
Target.AttackTargetFromList(target_name)
Attack Target from gui filter selector, in Targetting tab.
Parameters
target_nameString
Return
Void
Target.Cancel()
Target.Cancel()
Cancel the current target.
Return
Void
Target.ClearLast()
Target.ClearLast()
Clear the last target.
Return
Void
Target.ClearLastAttack()
Target.ClearLastAttack()
Clear the last attacked target
Return
Void
Target.ClearLastandQueue()
Target.ClearLastandQueue()
Clear last target and target queue.
Return
Void
Target.ClearQueue()
Target.ClearQueue()
Clear Queue Target.
Return
Void
Target.GetLast()
Target.GetLast()
Get serial number of last target
Return
Int32
Serial as number.
Target.GetLastAttack()
Target.GetLastAttack()
Get serial number of last attack target
Return
Int32
Serial as number.
Target.GetTargetFromList(target_name)
Target.GetTargetFromList(target_name)
Get Mobile object from GUI filter selector, in Targetting tab.
Parameters
target_nameString
Name of the target filter.
Return
Mobile
Mobile object matching. None: not found
Target.HasTarget(targetFlag)
Target.HasTarget(targetFlag)
Get the status of the in-game target cursor Optionally specify the target flag and check if the cursor is "Beneficial", "Harmful", or "Neutral".
Parameters
targetFlagString
The target flag to check for can be "Any", "Beneficial", "Harmful", or "Neutral".
Return
Boolean
True if the client has a target cursor and the optional flag matches; otherwise, false.
Target.Last()
Target.Last()
Execute the target on the last Item or Mobile targeted.
Return
Void
Target.LastQueued()
Target.LastQueued()
Enqueue the next target on the last Item or Mobile targeted.
Return
Void
Target.LastUsedObject()
Target.LastUsedObject()
Returns the serial of last object used by the player.
Return
Int32
Target.PerformTargetFromList(target_name)
Target.PerformTargetFromList(target_name)
Execute Target from GUI filter selector, in Targetting tab.
Parameters
target_nameString
Name of the target filter.
Return
Void
Target.PromptGroundTarget(message, color)
Target.PromptGroundTarget(message, color)
Prompt a target in-game, wait for the Player to select the ground. Can also specific a text message for prompt.
Parameters
messageString
Hint on what to select.
colorInt32
Color of the message. (default: 945, gray)
Return
Point3D
A Point3D object, containing the X,Y,Z coordinate
Target.PromptTarget(message, color)
Target.PromptTarget(message, color)
Prompt a target in-game, wait for the Player to select an Item or a Mobile. Can also specific a text message for prompt.
Parameters
messageString
Hint on what to select.
colorInt32
Color of the message. (default: 945, gray)
Return
Int32
Serial of the selected object.
Target.Self()
Target.Self()
Execute the target on the Player.
Return
Void
Target.SelfQueued()
Target.SelfQueued()
Enqueue the next target on the Player.
Return
Void
Target.SetLast(serial, wait)
Target.SetLast(serial, wait)
Set the last target to specific mobile, using the serial.
Parameters
serialInt32 Mobile
Serial of the Mobile.
waitBoolean
Wait confirmation from the server.
Return
Void
Target.SetLastTargetFromList(target_name)
Target.SetLastTargetFromList(target_name)
Set Last Target from GUI filter selector, in Targetting tab.
Parameters
target_nameString
Name of the target filter.
Return
Void
Target.TargetExecute(x, y, z, StaticID)
Target.TargetExecute(x, y, z, StaticID)
Execute target on specific serial, item, mobile, X Y Z point. Targets the Mobil or Item specified
Parameters
xInt32 UOEntity
Serial of the Target X coordinate. object can be a Mobil or an Item.
yInt32
Y coordinate.
zInt32
Z coordinate.
StaticIDInt32
ID of Land/Tile
Return
Void
Target.TargetExecuteRelative(mobile, offset)
Target.TargetExecuteRelative(mobile, offset)
Execute target on specific land point with offset distance from Mobile. Distance is calculated by target Mobile.Direction.
Parameters
mobileInt32 Mobile
Mobile object to target. Serial of the mobile
offsetInt32
Distance from the target. +- distance to offset from the mobile identified with serial
Return
Void
Target.TargetResource(item_serial, resource_number)
Target.TargetResource(item_serial, resource_number)
Find and target a resource using the specified item.
Parameters
item_serialInt32 Item
Item object to use.
resource_numberString Int32
name of the resource to be targeted. ore, sand, wood, graves, red mushroom Resource as standard name or custom number 0: ore 1: sand 2: wood 3: graves 4: red_mushrooms n: custom
Return
Void
Target.TargetType(graphic, color, range, selector, notoriety)
Target.TargetType(graphic, color, range, selector, notoriety)
Parameters
graphicInt32 colorInt32 rangeInt32 selectorString notorietyList[Byte]
Return
Boolean
Target.WaitForTarget(delay, noshow)
Target.WaitForTarget(delay, noshow)
Wait for the cursor to show the target, pause the script for a maximum amount of time. and optional flag True or False. True Not show cursor, false show it
Parameters
delayInt32
Maximum amount to wait, in milliseconds
noshowBoolean
Pevent the cursor to display the target.
Return
Boolean
Target.WaitForTargetOrFizzle(delay, noshow)
Target.WaitForTargetOrFizzle(delay, noshow)
Wait for the cursor to show the target, or the sound for fizzle (0x5c) or pause the script for a maximum amount of time. and an optional flag True or False. True Not show cursor, false show it
Parameters
delayInt32
Maximum amount to wait, in milliseconds
noshowBoolean
Prevent the cursor to display the target.
Return
Boolean