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

Looting regs from bank
http://forum.yoko.com.ua/viewtopic.php?f=20&t=604
Page 1 of 1

Author:  Nazgul [ 2004-06-19 13:07:41 ]
Post subject:  Looting regs from bank

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?

Author:  BETEPAH [ 2004-06-19 14:32:55 ]
Post subject: 

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

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