скрипт взят с этого сайта, извените но автора не помню. когда запускаешь и пишеш ему ключевое слово (trade) он выдаёт ошибку в скрипте Unhendled exception in parser. перерыл скрипт куча раз но ошибка так и неполучилось найти. может ктото помоч ?
Code: sub vendor() UO.DeleteJournal() uo.exec('exec trade') var id Var FileName='D:\lol.txt' Var Tl Var F=File(FileName) start: #UO.SetGlobal('process','yes') F.Open() while 1 while UO.InJournal('trade') id=uo.JournalSerial(uo.InJournal("trade")-1) uo.say("Hi" + " " + uo.getname(id)) begin: Tl=safecall F.Readln() Tl=Trim(Tl) If Tl=='File read error' Then #F.Close() #UO.SetGlobal('process','no') UO.msg("Для покупки товара наберите mega buy и номер товара") DeleteJournal("trade") goto start EndIf UO.say(Trim(left(Tl,2)) + uo.getname(mid(Tl, 2, 10))+ " po " + Trim(mid(Tl, 12, 10))) goto begin wend wend end sub
######################################################
sub trade() var nomer, line, dolj, imya var sum=0 var time Var FileName='D:\lol.txt' Var Tl Var F=File(FileName) start: F.Open() UO.DeleteJournal() while not (uo.InJournal("mega buy")) wait(100) wend line=UO.injournal("mega buy") nomer=Trim(Right(UO.Journal(line-1),2)) #uo.say(nomer) #uo.say("Tovar dlya" + " " + uo.getname(uo.JournalSerial(uo.InJournal("mega buy")-1)) + " N " + nomer)
begin: Tl=safecall F.Readln()
If Tl=='File read error' Then #F.Close() goto start EndIf
If nomer==Trim(left(Tl, 2)) then #uo.say(uo.getname(mid(Tl, 2, 10))) uo.MoveItem(mid(Tl, 2, 10),"-1",uo.JournalSerial(uo.InJournal("mega buy")-1)) # #ПРОВЕРКА ДЕНЕГ! #uo.say("Vi doljni " + STR(mid(Tl, 12, 10)) + "gp") imya=uo.getname(uo.JournalSerial(uo.InJournal("mega buy")-1)) dolj=Trim(mid(Tl, 12, 10)) uo.say(imya + ", BbI DoJI}|{HbI " + dolj)
#podschet: time=0 uo.findtype("0x0EED",-1,uo.tradecontainer("right")) while uo.FindCount()==0 and time<10 uo.findtype("0x0EED",-1,uo.tradecontainer("right")) wait(1000) time=time+1 wend
if time==10 then uo.msg("Время вышло") UO.RClick(168,70) goto start endif
UO.IgnoreReset() UO.FindType('0x0EED', '-1', UO.TradeContainer('right')) uo.print(uo.FindCount()) while uo.FindCount() > 0 sum=sum+UO.GetQuantity('finditem') UO.Ignore("finditem") UO.FindType('0x0EED', '-1', UO.TradeContainer('right')) wend uo.print(STR(sum)+"GP")
uo.print(STR(sum)) uo.print(dolj)
if sum==val(dolj) then UO.LClick(67,43) wait(500) uo.msg("Спасибо за покупку, " + imya) sum=0 goto start endif
goto start EndIf goto begin end sub
######################################################
sub hah() var time=0 uo.findtype("0x0EED",-1,uo.tradecontainer("right")) while uo.FindCount()==0 and time<60 uo.findtype("0x0EED",-1,uo.tradecontainer("right")) wait(1000) time=time+1 wend uo.say("lala") end sub
######################################################
Sub DeleteJournal(What) Var T,J J=False If UO.InJournal(What) Then J=True UO.DeleteJournal() EndIf RETURN J EndSub
######################################################
sub info() UO.IgnoreReset() UO.FindType('',',-1','backpack') uo.print(uo.FindCount()) while uo.FindCount() > 0 uo.info('finditem') #uo.print(uo.GetSerial("finditem")) UO.Ignore("finditem") wait(500) UO.FindType('',',-1','backpack') wend uo.textclear() uo.textclose() end sub
######################################################
sub baza() var I var c uo.textopen() UO.IgnoreReset() UO.FindType('',',-1','backpack') uo.print(uo.FindCount()) c=uo.FindCount() uo.print(STR(c)) For I=1 to c uo.textprint(STR(I) + " " + uo.getserial("finditem") + " " + uo.GetName("finditem")) next end sub
sub CheckGold() var item_amount = 0 var i=0 If UO.TradeCount() and i<5 Then 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() UO.Print("Gold: "+STR(item_amount)+"Gp") Else UO.Print("No Trade") i=i+1 wait(1000) EndIf
end sub
|