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
Target.Cancel()
Cancel the current target.
Target.ClearLast()
Clear the last target.
Target.ClearLastAttack()
Clear the last attacked target
Target.ClearLastandQueue()
Target.ClearLastandQueue()
Clear last target and target queue.
Target.ClearQueue()
Clear Queue Target.
Target.GetLast()
Get serial number of last target
Target.GetLastAttack()
Get serial number of last attack target
Target.GetTargetFromList(target_name)
Target.GetTargetFromList(target_name)
Get Mobile object from GUI filter selector, in Targetting tab.
Parameters
target_nameStringName of the target filter.
Return
MobileMobile 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
targetFlagStringThe target flag to check for can be "Any", "Beneficial", "Harmful", or "Neutral".
Return
BooleanTrue if the client has a target cursor and the optional flag matches; otherwise, false.
Target.Last()
Execute the target on the last Item or Mobile targeted.
Target.LastQueued()
Enqueue the next target on the last Item or Mobile targeted.
Target.LastUsedObject()
Returns the serial of last object used by the player.
Target.PerformTargetFromList(target_name)
Target.PerformTargetFromList(target_name)
Execute Target from GUI filter selector, in Targetting tab.
Parameters
target_nameStringName of the target filter.
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
messageStringHint on what to select.
colorInt32Color of the message. (default: 945, gray)
Return
Point3DA 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
messageStringHint on what to select.
colorInt32Color of the message. (default: 945, gray)
Return
Int32Serial of the selected object.
Target.Self()
Execute the target on the Player.
Target.SelfQueued()
Enqueue the next target on the Player.
Target.SetLast(serial, wait)
Target.SetLast(serial, wait)
Set the last target to specific mobile, using the serial.
Parameters
serialInt32
MobileSerial of the Mobile.
waitBooleanWait confirmation from the server.
Target.SetLastTargetFromList(target_name)
Target.SetLastTargetFromList(target_name)
Set Last Target from GUI filter selector, in Targetting tab.
Parameters
target_nameStringName of the target filter.
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
UOEntitySerial of the Target
X coordinate.
object can be a Mobil or an Item.
yInt32Y coordinate.
zInt32Z coordinate.
StaticIDInt32ID of Land/Tile
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
MobileMobile object to target.
Serial of the mobile
offsetInt32Distance from the target.
+- distance to offset from the mobile identified with serial
Target.TargetResource(item_serial, resource_number)
Target.TargetResource(item_serial, resource_number)
Find and target a resource using the specified item.
Parameters
item_serialInt32
ItemItem object to use.
resource_numberString
Int32name 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
Target.TargetType(graphic, color, range, selector, notoriety)
Target.TargetType(graphic, color, range, selector, notoriety)
Parameters
graphicInt32
colorInt32
rangeInt32
selectorString
notorietyList[Byte]
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
delayInt32Maximum amount to wait, in milliseconds
noshowBooleanPevent the cursor to display the target.
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
delayInt32Maximum amount to wait, in milliseconds
noshowBooleanPrevent the cursor to display the target.