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_name
String
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_name
String
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_name
String
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
message
String
Hint on what to select.
color
Int32
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
message
String
Hint on what to select.
color
Int32
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
serial
Int32
Mobile
Serial of the Mobile.
wait
Boolean
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_name
String
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
x
Int32
Mobile
Item
Serial of the Target X coordinate. Item object to Target. Mobile object to Target.
y
Int32
Y coordinate.
z
Int32
Z coordinate.
StaticID
Int32
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
mobile
Int32
Mobile
Mobile object to target. Serial of the mobile
offset
Int32
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_serial
Int32
Item
Item object to use.
resource_number
Int32
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
delay
Int32
Maximum amount to wait, in milliseconds
noshow
Boolean
Pevent the cursor to display the target.
Return
Boolean