Targeting inside a container??

Ask for help

Moderators: Murderator+, Murderator

Post Reply
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

Targeting inside a container??

Post by Infectous »

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.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

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...
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

Post by Infectous »

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"
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

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
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

Post by Infectous »

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.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

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: Select all

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()
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

Post by Infectous »

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: Select all

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
Post Reply