Target
The Target class provides various methods for targeting Land, Items and Mobiles in game.
Table of Contents
Methods
AttackTargetFromList
Target.AttackTargetFromList(target_name)Attack Target from gui filter selector, in Targetting tab.
target_name(String)
VoidCancel
Target.Cancel()Cancel the current target.
VoidClearLast
Target.ClearLast()Clear the last target.
VoidClearLastAttack
Target.ClearLastAttack()Clear the last attacked target
VoidClearLastandQueue
Target.ClearLastandQueue()Clear last target and target queue.
VoidClearQueue
Target.ClearQueue()Clear Queue Target.
VoidGetLast
Target.GetLast()Get serial number of last target
Int32GetLastAttack
Target.GetLastAttack()Get serial number of last attack target
Int32GetTargetFromList
Target.GetTargetFromList(target_name)Get Mobile object from GUI filter selector, in Targetting tab.
target_name(String): Name of the target filter.
MobileHasTarget
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".
targetFlag(String): The target flag to check for can be "Any", "Beneficial", "Harmful", or "Neutral".
BooleanLast
Target.Last()Execute the target on the last Item or Mobile targeted.
VoidLastQueued
Target.LastQueued()Enqueue the next target on the last Item or Mobile targeted.
VoidLastUsedObject
Target.LastUsedObject()Returns the serial of last object used by the player.
Int32PerformTargetFromList
Target.PerformTargetFromList(target_name)Execute Target from GUI filter selector, in Targetting tab.
target_name(String): Name of the target filter.
VoidPromptGroundTarget
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.
message(String): Hint on what to select.color(Int32): Color of the message. (default: 945, gray)
Point3DPromptTarget
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.
message(String): Hint on what to select.color(Int32): Color of the message. (default: 945, gray)
Int32Self
Target.Self()Execute the target on the Player.
VoidSelfQueued
Target.SelfQueued()Enqueue the next target on the Player.
VoidSetLast
Target.SetLast(serial, wait)Set the last target to specific mobile, using the serial.
serial(Int32): Serial of the Mobile.wait(Boolean): Wait confirmation from the server.
VoidSetLastTargetFromList
Target.SetLastTargetFromList(target_name)Set Last Target from GUI filter selector, in Targetting tab.
target_name(String): Name of the target filter.
VoidTargetExecute
Target.TargetExecute(x, y, z, StaticID)Execute target on specific serial, item, mobile, X Y Z point. Targets the Mobile or Item specified
x(Int32): X coordinate.y(Int32): Y coordinate.z(Int32): Z coordinate.StaticID(Int32): ID of Land/Tile
VoidTargetExecuteRelative
Target.TargetExecuteRelative(mobile, offset)Execute target on specific land point with offset distance from Mobile. Distance is calculated by target Mobile.Direction.
mobile(Mobile): Mobile object to target.offset(Int32): Distance from the target.
VoidTargetResource
Target.TargetResource(item_serial, resource_number)Find and target a resource using the specified item.
item_serial(Int32): Item object to use.resource_number(Int32): Resource as standard name or custom number 0: ore 1: sand 2: wood 3: graves 4: red_mushrooms n: custom
VoidTargetType
Target.TargetType(graphic, color, range, selector, notoriety)graphic(Int32)color(Int32)range(Int32)selector(String)notoriety(List[Byte])
BooleanWaitForTarget
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
delay(Int32): Maximum amount to wait, in millisecondsnoshow(Boolean): Pevent the cursor to display the target.
BooleanWaitForTargetOrFizzle
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
delay(Int32): Maximum amount to wait, in millisecondsnoshow(Boolean): Prevent the cursor to display the target.
Boolean