For targeting in Injection there is in use following set of commands:
The ,[yhlp_target] command is a SPECIAL one and must be not in use in absolutely most scripts.
1. If you feel yourself impatient, have lack of time or imagination, have general Injection knowledge average or below - do not ever touch ,target command.
2. There is no any warranty, even of fitness for a particular purpose regarding this command.
3. There is almost no chance your action will NOT be displayed in server logs.
If you aware of these statements i will procede.
At first, this command represent creating of CLIENT_TAGET packet.
The practical mean of this is ALL needed info must be supplyed by user (not like in waittarget* ones).
This info's are:
1) special KEY (*see note below)
2) is this OBJECT or STATIC(place) target
3) serial of object targeted
4) X of place targeted (container or world's)
5) Y of place targeted (container or world's)
6) Z of place targeted (container or world's)
7) Tile/Model targeted
* KEY: this is some serial-like number MUST by supplied by user. It is a inner-server constant for action, which caused targeting. For example using scissors results number, using pickaxe - other number, using some gump - yet other, etc.
You may found it once by doing targeting manual, then review value of lasttargetkey pointer (Note: there is bug in some versions, due to which ,info lasttargetkey or ,addobject somename lasttargetkey not working)
Command ,target know how to fill SOME of fields.
Let's check up 2 main variants of using command
Variant 1: Targeting OBJECT (player or creature, for example)
,target 0x000002c myenemy
where 0x000002c is a known KEY for action (magic for example) and myenemy is a known object.
If OBJECT is known, injection will fill TargetType,X,Y,Z,Model fields of targeting packet making it appropriate for use.
For object targeting manual usage of X,Y,Z,Model fields if NOT reccomended but possible, for some exotic cases.
Variant 2: Targeting STATIC (some ground, boulder, tree, place)
,target 0x000002c ground 1 6543 123 456 10
where 0x000002c is a known KEY for action (magic for example),
ground is a keyword, must be entered lowcase as typed,
1 is a type of target, must be 1 for ground targeting,
6543 is a Tile number (MUST be stated by user! in the worst case try 0 here)
123, 456 and 10 is a X,Y,Z coordinates in world
Caveeat: the cursor remain in TARGET mode in client! And when you will do something in client the INVALID target packet WILL be send, and nothing you can do in this case.
The only possible way to workaround this is to disable all targeting transfer by command ,set blocktargets 1
It is not easy to master target and set commands cooperation to make useful script.
If this manual is not useful for you, do not use ,target command.