How does this work? arm macro
Posted: 2006-12-06 22:06:00
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
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.
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.