Code: Select all
##*********************************************************
##*********************************************************
##**************Арена, блесс за деньги. *******************
##*********************************************************
##*********************************************************
sub bless_for_money()
var client, time
var money_bag ='0x61F9241C' ##Это сумка, которая должна быть у мага. В неё убираются все деньги после каста
uo.ignore(money_bag)
uo.moveoff() ##Запрет на перемещение - для того чтоб при закрытии окна обмена чар никуда не бежал
while (uo.gs>1 and uo.ga>2 and uo.sa>1 and uo.mr>1)
while not uo.TradeCount()
wait(100)
wend
if uo.TradeCount() then ##Проверяем наличие окна обмена..
Check()
if Check()==0 then
uo.fontcolor('0x0026')
uo.msg('Не вижу тут денег...')
while uo.TradeCount()
uo.RClick(173,98)
wait(2500)
wend
endif
if Check()==1 then
uo.fontcolor('0x0026')
uo.msg('Для обкаста нужно 750 монет, а не меньше!')
while uo.TradeCount()
uo.RClick(173,98)
wait(2500)
wend
endif
if Check()==2 then
uo.fontcolor('0x010c')
uo.msg('Нажмите галочку, пожалуйста.')
while not (uo.TradeCheck('n', 'right', '1') or uo.TradeCount()==0) ##Ожидаем закрытия окна или нажатия галки
wait(100)
wend
if uo.TradeCount() then
client = uo.TradeOpponent('n')
uo.TradeCheck('n', 'left', 1) ##Жмём галку
wait(2500)
cast(client)
wait(1000)
endif
endif
endif
endif
uo.findtype('0x0EED','-1', 'backpack')
uo.moveitem('finditem','all',money_bag) ##Убираем деньги в сумку
wait(1000)
wend
uo.fontcolor('0x0026')
uo.msg('Фсё, цЫрк сворачивается!')
uo.closeuo()
end sub
sub Check()
var gold
uo.findtype('0x0EED','0x0000', uo.TradeContainer('right')) ##Проверка наличия денег в правои окне, цвет добавлен для защиты от подсовывания песка
gold = 750 - uo.getQuantity('finditem') ##Проверка количества денег
if gold==750 then
return 0
endif
if gold>0 then
return 1
endif
if gold<=0 then
return 2
endif
end sub
sub cast(client)
if uo.mana<50 then
uo.fontcolor('0x010c')
uo.msg('Секундочку.')
while uo.mana<50
uo.useskill('Meditation')
wait(11000)
wend
endif
uo.cast('Bless',client)
while uo.waiting()
wait(100)
wend
uo.cast('Protection',client)
while uo.waiting()
wait(100)
wend
end sub
sub zazjvalka()
while not uo.dead()
uo.fontcolor('0x0003')
uo.msg('Фпервые под куполом цЫрка - обкаст за деньги: Bless+Protectioin фсего за 750 монет')
uo.msg('Для обкаста просто дайте мне денег :)')
wait(50000)
wend
end sub
Code: Select all
Не забывайте о тегах. aka I'm