How does this work? arm macro

Ask for help

Moderators: Murderator+, Murderator

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

How does this work? arm macro

Post by Infectous »

I am not sure how this works or why it does...

I simply want to find my kite type shield in my hand, if it's there equip the bow and if it's not, equip the sword and shield

basically not to waste 2 different keys to arm 2 sets of weapons, I want it to one key

the sword and shield is setarm 1
the bow is setarm 2

Code: Select all

sub arm()
var shield = '0x1B78'
uo.findtype(shield,"-1",'UO.Objatlayer("Rhand")')
if uo.findcount() > 0 then
uo.arm(1) ; sword & shield
else
uo.arm(2) ; bow
endif
end sub


mom always said if it works don't fix it but I want to understand the logic to this... shouldn't the arm(1) and arm(2) BE SWITCHED? if it is it only arms the one set but this way it actually does what I want it to...

did I mess up the findtype line useing the objatlayer rhand?? The only thing I can think of is that Injections is looking in my bag but I don't want it to do that case I have 2 shields and want to equip the bow

or am I not understanding the else part of the if statement.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

uo.findtype("", -1 ,"self")
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

Post by Infectous »

thanx brotha!
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Infectous wrote:thanx brotha!

:lol:
Infectous
Posts: 55
Joined: 2004-07-29 16:29:52

arm key macro

Post by Infectous »

Code: Select all

sub arm()
var bow = '0x13B1'
UO.Setcatchbag("pouch")
uo.findtype(bow,'0x07B5','self') ; Ruby bow(fair damage/no arrows)
if uo.findcount() > 0 then
uo.arm(1) ; sword & shield
wait(250)
UO.Unsetcatchbag()
uo.exec('terminate arm')
endif
uo.findtype(bow,'0x0044','self') ; Acid bow(poisons)
if uo.findcount() > 0 then
uo.arm(2) ; ruby bow
else
uo.arm(3) ; acid bow
endif
wait(250)
UO.Unsetcatchbag()
end sub


yeah baby yeah!
Post Reply