Code: Select all
sub Alchemy()
var gs, RegCont, keg, EmptyBottle, HealPotion, a, b, t
uo.print("Где лежит гинсенг?")
uo.exec('addobject GinsChest')
while uo.targeting()
wait(100)
wend
uo.useobject('GinsChest')
RegCont = uo.getserial('GinsChest')
keg = '0x1940'
gs = '0x0F85'
EmptyBottle = '0x0F0E'
HealPotion = '0x0F0C'
DIM Gump[2]
Gump[0] = 'Miscellaneous'
Gump[1] = 'Heal'
while not uo.dead()
if uo.gs < 1 then
uo.findtype(gs,'-1',RegCont)
if uo.fincount() > 0 then
uo.moveitem('finditem', '1000','backpakc')
wait(1000)
else
uo.print("There is no ginseng here...")
return
endif
endif
CheckLag()
uo.warmode('0')
uo.usetype('0x0E9B')
for b = 0 to 1
t = 0
repeat
wait(100)
t = t + 1
until uo.LastGump('text',b) == Gump[b] or t > 50
if b == 0 then
uo.lclick(200,200)
else
uo.lclick(290,333)
endif
next
t = 0
repeat
wait(100)
t = t + 1
until uo.count(HealPotion) or t > 50
uo.waittargettype(HealPotion)
uo.usetype(keg)
t = 0
repeat
wait(100)
t = t + 1
until uo.count(EmptyBottle) or t > 50
wend
endsub