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

How does this work? arm macro
http://forum.yoko.com.ua/viewtopic.php?f=3&t=10354
Page 1 of 1

Author:  Infectous [ 2006-12-06 22:06:00 ]
Post subject:  How does this work? arm macro

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:
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.

Author:  Nmy [ 2006-12-07 00:04:53 ]
Post subject: 

Code:
uo.findtype("", -1 ,"self")

Author:  Infectous [ 2006-12-07 05:16:57 ]
Post subject: 

thanx brotha!

Author:  Nmy [ 2006-12-07 09:10:45 ]
Post subject: 

Infectous wrote:
thanx brotha!

:lol:

Author:  Infectous [ 2006-12-09 17:19:37 ]
Post subject:  arm key macro

Code:
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!

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