Yoko

All sides of Injection
It is currently 2025-11-06 01:03:12

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Looting regs from bank
PostPosted: 2004-06-19 13:07:41 
Offline

Joined: 2004-06-01 12:50:42
Posts: 9
Code:
sub loot() 
UO.FindType("0x0F88","-1","container")  #NightShade
UO.Grab("50","finditem")
UO.FindType("0x0F85","-1","container")  #Gingseng
UO.Grab("50","finditem")
UO.FindType("0x0F7B","-1","container")  #BloodMoss
UO.Grab("50","finditem")
UO.FindType("0x0F8C","-1","container")  #Sulfour's Ash
UO.Grab("50","finditem")
UO.FindType("0x0F86","-1","container")  #Mandrake Roots
UO.Grab("50","finditem")
UO.FindType("0x0F84","-1","container")  #Garlic
UO.Grab("50","finditem")
UO.FindType("0x0F8D","-1","container")  #Spider's Silk
UO.Grab("50","finditem")
UO.FindType("0x0F7A","-1","container")  #Black Pearl's
UO.Grab("50","finditem")
end sub


I'm trying to make script that loots 50 of each reg from the bank when i open bank and say ,exec loot. But i get error: "invalid object: 0" 8 times and script stops without taking any regs :(. Anyone know where is the problem?


Top
   
 Post subject:
PostPosted: 2004-06-19 14:32:55 
Offline
Expert!
User avatar

Joined: 2004-05-31 09:31:51
Posts: 838
Try This



sub Reagents()
VAR StoreRegCont=0x400271DE
VAR CharRegBag='CharRegBag'
VAR CountReg=30
VAR WaitTime=600
VAR MainSafe=0x40057901

uo.print('Choose BAG for regs')
uo.exec('addobject CharRegBag')
while uo.targeting()
wait(100)
wend

UO.UseObject(MainSafe)
UO.UseObject(StoreRegCont)

UO.SetReceivingContainer(CharRegBag)
wait(WaitTime)

if UO.BM<CountReg then
UO.FindType('0x0F7B','-1',StoreRegCont) ; BM
UO.Grab(STR((CountReg-UO.BM)),'finditem')
wait(WaitTime)
endif

if UO.BP<CountReg then
UO.FindType('0x0F7A','-1',StoreRegCont) ; BP
UO.Grab(STR(CountReg-UO.BP),'finditem')
wait(WaitTime)
endif

if UO.GA<CountReg then
UO.FindType('0x0F84','-1',StoreRegCont) ; GA
UO.Grab(STR(CountReg-UO.GA),'finditem')
wait(WaitTime)
endif

if UO.GS<CountReg then
UO.FindType('0x0F85','-1',StoreRegCont) ; GS
UO.Grab(STR(CountReg-UO.GS),'finditem')
wait(WaitTime)
endif

if UO.MR<CountReg then
UO.FindType('0x0F86','-1',StoreRegCont) ; MR
UO.Grab(STR(CountReg-UO.MR),'finditem')
wait(WaitTime)
endif

if UO.NS<CountReg then
UO.FindType('0x0F88','-1',StoreRegCont) ; NS
UO.Grab(STR(CountReg-UO.NS),'finditem')
wait(WaitTime)
endif

if UO.SA<CountReg then
UO.FindType('0x0F8C','-1',StoreRegCont) ; SA
UO.Grab(STR(CountReg-UO.SA),'finditem')
wait(WaitTime)
endif

if UO.SS<CountReg then
UO.FindType('0x0F8D','-1',StoreRegCont) ; SS
UO.Grab(STR(CountReg-UO.SS),'finditem')
endif
end:
UO.UnsetReceivingContainer()
end sub


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 8 guests


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