mont 0 Жалоба Опубликовано 14 июля, 2008 var from_bag=0x716B7BE8 #мешок откуда брать вещь для отравления. var to_bag=0x7169A58C #мешок, куда вещь падает когда отравлена "maxPoisonItem" раз var ptype=0x0f0e #тип бутылки var pcolor=0x0694 #цвет бутылки var maxPoisonItem = 10 #сколько раз травить один и тот-же предмет sub main() var item var ppotion var poisonNum while (true) uo.findtype(-1,-1,from_bag) item=uo.getserial('finditem') #no items if (UO.FindCount() == 0) then return endif for poisonNum = 1 to maxPoisonItem DeleteJournalLine('You succeed in poisoning the item') uo.findtype(ptype,pcolor) ppotion=uo.getserial('finditem') #no poison left if (UO.FindCount() == 0) then return endif uo.grab(1,item) uo.waittargetobject(ppotion,item) uo.useskill('Poisoning') WaitJournal('You succeed in poisoning the item',7000) wait(10000) next uo.moveitem(item,1,to_bag) wend end sub sub WaitJournal(Line,maxWait) if (maxWait < 0) then maxWait = 60*60*24*30*12 end if while (not UO.InJournal(Line)) and (maxWait > 0) wait(100) maxWait = maxWait - 100 wend wait(100) end sub Sub DeleteJournalLine(msg) while uo.injournal(msg) uo.setjournalline(uo.injournal(msg)-1,"") wend end sub Вот, собственно может кому понадобиться. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты