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
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(targetFlagsExists)
Target.HasTarget(targetFlagsExists)
Get status if have in-game cursor has target shape.
U can check if cursor is beneficial, harmful or neutral
Get status if have in-game cursor has target shape.
Parameters
targetFlagsExistsString
Return
BooleanTrue: Cursor has target - False: otherwise
True: Cursor has target - False: otherwise
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.
Parameters
xItem
Int32
MobileItem object to Target.
Mobile object to Target.
Serial of the Target
X coordinate.
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
offsetInt32+- distance to offset from the mobile identified with serial
Distance from the target.
Target.TargetResource(item_serial, resource_number)
Target.TargetResource(item_serial, resource_number)
Find and target a resource using the specified item.
Parameters
item_serialItem
Int32Item object to use.
resource_numberString
Int32Resource as standard name or custom number
0: ore
1: sand
2: wood
3: graves
4: red_mushrooms
n: custom
name of the resource to be targeted. ore, sand, wood, graves, red mushroom
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.