Page 1 of 1
,target HELP... i'm utterly confused! (ENG) (4yoko)
Posted: 2004-09-11 07:34:42
by merlix
Hi yoko. I have read all english documentation, and I still can't get ,target working. I even tried babelfish (babelfish.altavista.com) to try to read the russian, but i still couldent understand it
Heres my script:
It readies a purple potion, waits until its just about to explode, tracks down the players movement, and predicts where to throw the potion for optimal hit in PVP
target lasttargetkey enemy works sometimes... but i want to tell it properly so i dont have to pretarget with a katana! please help!
sub pot()
UO.Exec("usetype purple")
wait(2750)
x = UO.GetX("enemy")
y = UO.GetY("enemy")
k = 0
while k < 2
k = k + 1
wait(100)
wend
x = (UO.GetX("enemy")) - x
y = (UO.GetY("enemy")) - y
x = (UO.GetX("enemy")) + x
y = (UO.GetY("enemy")) + y
UO.Exec("target 0x2c enemy")
// Uo.Exec("target 0x2c x y z") <---- ?!?!
end sub
Posted: 2004-09-11 07:57:28
by AGRS
tile, x, y, z - string vars.
UO.Target("0x2c", "ground", "1", tile, x, y, z)
updated..
Posted: 2004-09-11 08:17:22
by merlix
sub pot()
UO.Exec("usetype purple")
wait(2730)
x = UO.GetX("enemy")
y = UO.GetY("enemy")
k = 0
while k < 2
k = k + 1
wait(100)
wend
x = (UO.GetX("enemy")) - x
y = (UO.GetY("enemy")) - y
x = (UO.GetX("enemy")) + x
y = (UO.GetY("enemy")) + y
z = (UO.GetZ("enemy"))
UO.Target("0x2c", "ground", "1", "tile", x, y, z)
end sub
It still doesent work
I think the problem may be with "ground" and "tile"
what do I put in these values? And, is there anything wrong with my script?
Posted: 2004-09-11 15:14:22
by AGRS
Tile - number of your tile. Try 2 use "0". But usualy it must have real value.
Posted: 2004-09-11 21:04:14
by Yoko
ok, i will explain about ,target command more widely.
*WARNING*
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.
**added to FAQ section**
Thank you
Posted: 2004-09-11 21:31:05
by merlix
Thank you SO much yoko!!
