how can i?

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
Spirito
Posts: 27
Joined: 2004-05-04 20:05:56

how can i?

Post by Spirito »

get coords x and y of an item on screen for move after with drag

my problem is:

i will steal an item and after i will move the item in backpack of victim in a specified position for resteal with uo.lclik

thx very much!
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

the method you using is not appreciated by injection logics.
the power of injection in direct item manipulation without mouse clicks.

transfer of item from place to place provided by ,moveitem command
targeting items provided by waittarget* set of commands
e.t.c

for screen positioning use EasyUO (www.easyuo.com) programm, not injection
Spirito
Posts: 27
Joined: 2004-05-04 20:05:56

Post by Spirito »

thx good Yoko..

i post my macro..

Code: Select all

sub main()
uo.deletejournal()

While TRUE

   uo.exec ("useskill 'Stealing'")
   uo.lclick(734,608)
   wait (6000)

   while (uo.injournal("act!"))
      uo.deletejournal()   
      uo.exec ("useskill 'Stealing'")
      uo.lclick(734,608)
      wait (6000)
   wend
   
   if (UO.count('0x1BF2')>0) then
      #uo.exec("findtype 0x1BF2 my")
      uo.exec("moveitem lasttarget 1 backpack 105 102 0")
      #uo.exec("moveitem 0x1BF2 4 0x45EC3FEF")
      wait(2000)
   endif
   
   wait (1000)
   
wend

end sub


how can i use moveitem to move iron in my backpack to another backpack?
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

moveitem <object> <quantity> <target_container>

you already have examples in your script, the only thing use other's backpack serial, not word "backpack" (this is predefined object of SELF backpack)
Spirito
Posts: 27
Joined: 2004-05-04 20:05:56

Post by Spirito »

moveitem <object> <quantity> <target_container>

object is objecttype of item?
target_container is ID (serial) of backpack?
Necr0Potenc3
Expert!
Posts: 74
Joined: 2004-05-30 00:31:54

Post by Necr0Potenc3 »

Spirito: yeap
Spirito
Posts: 27
Joined: 2004-05-04 20:05:56

Post by Spirito »

yeap = yes?

sorry but i'm italien..
Spirito
Posts: 27
Joined: 2004-05-04 20:05:56

Post by Spirito »

uo.exec("moveitem 0x1BF2 4 0x45EC3FEF")

0x1BF2 = objecttype IRON
0x45EC3FEF = serial backpack victim

message is:
You can not pick up that

???
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Syntax: ,moveitem object [quantity containerobject/ground [x y z]]
none uo.moveitem(object,[quantity,containerobject/ground,[x,y,z]])

Theme: Work with objects. Keywords: command, uoscript, utility, objhandling

Move object "object". Can work both as grab and drop. Don't require targeting, which rise reliability of script.

Quantity "quantity" - if given as 0 or not given, then all stack will be moved.

Third parameter can be "ground" (to drop on ground), or container-object (to move item to this container). If continer - is another item stack, then moved item will unite with this stack. If container - is another NPC, then item will be given to this NPC (if player - trade gump will appear, if, for example, animal - he(she) will try to eat item, or place it in own packpack)
Coordinates mean absolute or relative world coordinates, if "container" is "ground". If "container" - is container-object, then coordinates - it's exact spot in this container (counting from upper left corner). If not given, coordinates considered as 0
Default conatainer is player's backpack.

You can't provide container, without providing quantity.

Examples:
uo.moveitem("finditem") - will move item you just found with uo.findtype() to your backpack. Just as uo.grab().
uo.moveitem("0x0f18a35b","-1","ground") - will move item (all items, if it's stack) with serial number 0x0f18a35b to ground right under you
uo.moveitem(obj,"10","finditem","10","10","1") - will move some object (obj - it's variable (var obj) and it's value - is serial (string like "0x12345678")) in quantity of 10 (if it's stack) to container you just found to upper left corner of this container.
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

Spirito wrote:moveitem <object> <quantity> <target_container>

object is objecttype of item?

object is a object. (serial of it for example).
to convert type to serial use ,findtype command
Post Reply