Yoko http://forum.yoko.com.ua/ |
|
Скрипт "Угадай-ка" http://forum.yoko.com.ua/viewtopic.php?f=17&t=17068 |
Page 1 of 1 |
Author: | d3n [ 2012-09-25 15:44:22 ] |
Post subject: | Скрипт "Угадай-ка" |
sub gm() var line, chislo, otvet, name, id var item_amount = 0 var stavka = 100 var timer start: uo.moveoff() #чтобы от UO.RClick() чар не дергался UO.Exec('exec reklama') otvet=uo.random(3)+1 item_amount = 0 timer=1 while not UO.TradeCount() wait(100) wend UO.Exec('terminate reklama') uo.exec("set finddistance 5") uo.findtype("0x0190",-1,"ground") id=uo.TradeOpponent() name=uo.getname(uo.TradeOpponent()) REPEAT UO.FindType('0x0EED', '-1', UO.TradeContainer('right')) If UO.FindCount() Then If UO.GetQuantity('finditem')==0 Then item_amount = item_amount + 1 Else item_amount = item_amount + UO.GetQuantity('finditem') EndIf UO.Ignore('finditem') UO.FindType('0x0EED', '-1', UO.TradeContainer('right')) EndIf Until UO.FindCount()==0 or UO.Dead() UO.IgnoreReset() if item_amount == stavka then while not UO.TradeCheck('','right',1) and timer < 6 timer = timer + 1 wait(1000) uo.print(STR(timer)) wend if timer == 6 then UO.RClick(176,90) wait(500) goto start endif timer = 1 wait(500) UO.TradeCheck('','left',1) uo.msg(name + ", отгадайте число от 1 до 3, у Вас есть 5 секунд!") wait(7000) else uo.msg(name + ", для игры нужно дать мне 100гп") UO.RClick(176,90) wait(500) goto start endif line=UO.injournal(name) chislo=Trim(Right(UO.Journal(line-1),1)) uo.msg("Ваш ответ " + chislo + ", а я загадал " + STR(otvet) + "!") if val(chislo) == otvet then uo.msg("Поздравляю " + name + ", Вы отгадали и выиграли 300гп!") if UO.TradeCount() then UO.RClick(176,90) wait(500) endif uo.findtype("0x0EED") uo.moveitem('finditem','300',id) wait(500) UO.TradeCheck('','left',1) timer = 0 while not UO.TradeCheck('','right',1) and timer < 5 timer = timer + 1 wait(1000) uo.print(STR(timer)) wend if timer == 5 then UO.RClick(176,90) wait(500) goto start endif goto start else uo.msg("К сожалению Вы не отгадали!") UO.RClick(176,90) wait(500) endif goto start end sub sub reklama() while 1 wait(60000) uo.msg("Игра в наперстки!") uo.msg("Для начала игры просто дайте чару 100гп") wend end sub Прблема в том что не отдает деньги и не видет имён игроков... помогайте пожалуйста. Заранее спасибо |
Page 1 of 1 | All times are UTC+02:00 |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |