Code: Select all
sub MagicRes()
var Container='0x402094BB'
var Exit=0
repeat
control_Mana(10)
uo.exec("cast 'Feeblemind' laststatus")
wait(2100)
control_Mana(10)
uo.exec("cast 'Clumsy' laststatus")
wait(2100)
wend
checkLag()
if uo.Count(0x0F85)==0 then
CheckLag()
uo.FindType('0x0F85','0x0000',Container)
if uo.GetQuantity('finditem')>0 then
uo.MoveItem('finditem','400','backpack')
else
Exit=1
end if
end if
if uo.Count(0x0F88)==0 then
CheckLag()
uo.FindType('0x0F88','0x0000',Container)
if uo.GetQuantity('finditem')>0 then
uo.MoveItem('finditem','800','backpack')
else
Exit=1
end if
end if
if uo.Count(0x0F7B)==0 then
CheckLag()
uo.FindType('0x0F7B','0x0000',Container)
if uo.GetQuantity('finditem')>0 then
uo.MoveItem('finditem','400','backpack')
else
Exit=1
end if
end if
wend
CheckLag()
uo.FindType('0x0F0E','0x09DF',Container)
if uo.GetQuantity('finditem')>0 Then
uo.MoveItem('finditem','100','backpack')
end if
wait(500)
until UO.GetQuantity('finditem')==0
end sub
sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(500)
until uo.InJournal('backpack')
end sub
sub control_Mana(need)
if UO.Mana< need then
uo.findtype ('0x0F0E','0x09DF','my')
if uo.count('0x0F0E','0x09DF')>0 then
uo.useobject ('finditem')
wait(100)
else
uo.print('кончились манки ')
endif
endif
end sub