Yoko
http://forum.yoko.com.ua/

Targeting inside a container??
http://forum.yoko.com.ua/viewtopic.php?f=3&t=8822
Page 1 of 1

Author:  Infectous [ 2006-09-18 17:35:09 ]
Post subject:  Targeting inside a container??

Is there a way to target items inside a container?

We have a trash system that uses a repeating targeting cursor that by hand we can simply trash our items by clicking on them over and over.

I loot all kinds of different things and have recieveing container called "catch" that I want to trash the items inside it useing this trash system.


#uo.findtype("-1","-1",'catch','backpack')

I have tried wait target type/object/objecttype but nothing works... either can't find the object or get an invalid type or cancels the tageting all together.

i have even tried UOA but with the same result, rumor has it someone with easyuo has made such a macro but I am stumped either way.

Author:  Nmy [ 2006-09-19 15:48:10 ]
Post subject: 

how do you trash? where is trash? what do you want to trash?
I guess catch is the trash or bag with items witch you want to trash?
I just dont get it...

Author:  Infectous [ 2006-09-22 04:16:47 ]
Post subject: 

example

sub targ_in_cont()
repeat
uo.findtype(-1,-1,'catch','backpack') <-- any item in my catch bag (used addobject catch)
if UO.GetQuantity('finditem') and uo.targeting() then <-- the uo cursor auto repeats as you trash over and over
uo.target('finditem') <-- *this is where I am haveing trouble, system message "Unexpected target info"
wait(500)
endif
wait(100)
until uo.injournal("stop")
end sub

* I have tried various ways to target with the same result... nothing works for me.

explaination of trash system... you simply double click the trash can and choose the "trash an item option"
when you do a targeting uo cursor appears and you simply target your item
then another one appears and you target another... then another then another etc...
you have to hit "ESC" button to quit.

I am trying to automate targeting those items I have in my "catchbag"

Author:  Nmy [ 2006-09-22 06:39:32 ]
Post subject: 

Code:
uo.findtype() //find some trash
if uo.findcount() then //
uo.waittargetobject('finditem') //targets the item for trashing
uo.useobject() or uo.usetype() //uses trash can
CheckLag() or wait()
endif

Author:  Infectous [ 2006-10-01 03:55:26 ]
Post subject: 

uo.waittargetobject('finditem') //targets the item for trashing
uo.useobject() or uo.usetype() //uses trash can

that's the problem... there is no "waittarget" thus no useobject to be used.

the targeting cursor auto repeats as you click/target one item then it auto pops up to target another over and over till you hit "ESC" button to stop the sphere script.

Author:  Nmy [ 2006-10-01 14:19:55 ]
Post subject: 

Infectous wrote:
uo.waittargetobject('finditem') //targets the item for trashing
uo.useobject() or uo.usetype() //uses trash can

that's the problem... there is no "waittarget" thus no useobject to be used.

the targeting cursor auto repeats as you click/target one item then it auto pops up to target another over and over till you hit "ESC" button to stop the sphere script.

maybe you can try loop:
Code:
uo.findtype()
while uo.findcount()
uo.waittargetobject()
wait(100)
uo.findtype()
wend


or each time close target and try to use every time the trashcan
uo.canceltarget()

Author:  Infectous [ 2006-10-05 11:52:42 ]
Post subject: 

NMY wrote:
or each time close target and try to use every time the trashcan


yeah that was about the only way I can do it

Code:
sub targ_in_cont()
uo.canceltarget()
uo.print('Target the bag if items...')
uo.exec('addobject rewardbag')
while uo.targeting()
wait(100)
Wend
uo.useobject('rewardbag')
uo.findtype('-1',"-1",'rewardbag','backpack')
repeat
uo.waittargetobject('finditem')
uo.usefromground('0x0E77','0x079A')
wait(200)
uo.lclick(87,169)
wait(200)
uo.lclick(306,329)
wait(200)
checklag()
uo.findtype('-1',"-1",'rewardbag','backpack')
until uo.findcount() == 0
end sub


till I master gumps she's uo.lclick() for me
and thank you for the help brain storming ideas

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/