Yoko

All sides of Injection
It is currently 2026-03-10 16:44:22

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2004-09-11 07:34:42 
Offline

Joined: 2004-09-11 03:02:43
Posts: 3
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


Top
   
 Post subject:
PostPosted: 2004-09-11 07:57:28 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
tile, x, y, z - string vars.

UO.Target("0x2c", "ground", "1", tile, x, y, z)


Top
   
 Post subject: updated..
PostPosted: 2004-09-11 08:17:22 
Offline

Joined: 2004-09-11 03:02:43
Posts: 3
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?


Top
   
 Post subject:
PostPosted: 2004-09-11 15:14:22 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Tile - number of your tile. Try 2 use "0". But usualy it must have real value.


Top
   
 Post subject:
PostPosted: 2004-09-11 21:04:14 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
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**


Top
   
 Post subject: Thank you
PostPosted: 2004-09-11 21:31:05 
Offline

Joined: 2004-09-11 03:02:43
Posts: 3
Thank you SO much yoko!!
:D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited