Target
The Target class provides various method 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()
Target.HasTarget()
Get status if have in-game cursor has target shape.
Return
Boolean
True: Cursor has target - False: otherwise
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.
Parameters
xInt32 Mobile Item
X coordinate. Mobile object to Target. Serial of the Target Item object to Target.
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
mobileMobile Int32
Serial of the mobile Mobile object to target.
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_numberInt32 String
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.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