Code:
sub FindTypeName(name, type, color, container)
uo.FindType(type, color, container)
While uo.FindCount()
wait(100)
if uo.GetName('finditem') == name then
uo.ignorereset()
return 1
end if
uo.ignore('finditem')
uo.FindType(type, color, container)
wend
uo.ignorereset()
return 0
end sub
Пример:
FindTypeName('Greate Explosion', 0x0F0D, -1, 'backpack')
Если функция вернет 0 то ничего не было найдено если 1 то указатель finditem указывает на предмет который соответствует критерию.
Code:
sub UnParalyze()
if FindTypeName('Greate Explosion', '0x0F0D', '0x0B99', 'my') then
UO.Cast('Weaken','finditem')
UO.Print("Unparalyze!")
else
UO.Print("In GOD we TRUST")
end if
end sub