Yoko

All sides of Injection
It is currently 2025-12-04 07:12:57

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2006-12-06 22:06:00 
Offline

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


Top
   
 Post subject:
PostPosted: 2006-12-07 00:04:53 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
uo.findtype("", -1 ,"self")

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-12-07 05:16:57 
Offline

Joined: 2004-07-29 16:29:52
Posts: 55
thanx brotha!


Top
   
 Post subject:
PostPosted: 2006-12-07 09:10:45 
Offline
Expert!
User avatar

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

:lol:

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject: arm key macro
PostPosted: 2006-12-09 17:19:37 
Offline

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited