| Yoko http://forum.yoko.com.ua/ |
|
| Помогите со скриптом на мининг. http://forum.yoko.com.ua/viewtopic.php?f=20&t=50 |
Page 1 of 1 |
| Author: | ReaI [ 2004-04-09 16:56:30 ] |
| Post subject: | Помогите со скриптом на мининг. |
Скрипт для маленького випа на дрв... Я вскриптах не разбираюсь, короче он почему глючит когда вылезает елем, не пьет инвизку потом морф в демона и ошибка какаято. И когда он одну половину прокапывает и пытаеться идти на 2 то упераеться в стенку ( sub main() var mx, my, mz, i, j, t repeat uo.addobject("Bag", 0x400006840) #Сумка с регами и инвизом uo.addobject("Book", 0x401424C3) #Книжка магии uo.addobject("Shovel", 0x401a78f8) #Кирка или лопата dim x[3] dim y[3] x[0]=5135 # Координаты y[0]=1181 # x[1]=5189 # Точек y[1]=1182 # x[2]=5144 # Копки y[2]=1181 # for t=0 to 2 na4: gotoxy(x[t],y[t]) mx = UO.GetX("self") my = UO.GetY("self") mz = UO.GetZ("self") UO.DeleteJournal() for i = mx-4 to mx+4 for j = my-4 to my+4 while not UO.Hidden() UO.Warmode("0") UO.UseSkill("Stealth") wait(4000) wend UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j)) while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") UO.DeleteJournal() if uo.waiting() then uo.canceltarget() endif UO.Waittargettile("1341", str(i), str(j), str(mz)) UO.Useobject("Shovel") while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock") wait(500) if uo.injournal('elemental') or uo.injournal('Elemental') then elem() endif wend UO.DeleteJournal() if uo.Weight>550 then # максимальный вес loot() goto na4 endif next next next until uo.dead() end sub sub loot() gotoxy(5133,1184) # Координата возле сундука if uo.waiting() then uo.canceltarget() endif uo.exec("emptycontainer 400 'backpack' 0x40081FE1") #сундук для выкладки wait(1000) uo.setreceivingcontainer('backpack') wait(500) uo.grab(0, "Book") wait(1000) uo.grab(0, "Bag") wait(1000) end sub sub elem() var jor,ser,noto,eid uo.findtype(0x0F0E,0x0631) uo.useobject('finditem') ser = uo.journalserial(uo.injournal('Elemental')-1) eid=ser cd: uo.waitmenu('What','Daemon') uo.deletejournal() uo.cast('Polymorph') wait(4000) if uo.injournal('fizzles') then goto cd endif uo.findtype(0x0F0E,0x09DF) uo.useobject('finditem') repeat uo.waittagetobject('self') uo.cast('Greater Heal') wait(3000) if uo.mana<20 then uo.findtype(0x0F0E,0x09DF) uo.useobject('finditem') endif until uo.gethp('self')>240 uo.attack(eid) while uo.gethp(eid)>0 gotoxy(uo.getx(eid),uo.gety(eid)) wait(5000) wend uo.findtype(0x19B9,'-1','ground') uo.grab(0,'finditem') end sub sub gotoxy(xx,yy) var lagfactor=5 var msbase=150 var dx,dy var x=val(xx) var y=val(yy) if x==0 then x=xx end if if y==0 then y=yy end if var mx,my start: mx=UO.GetX() my=UO.GetY() dx=mx-x if dx<0 then dx=0-dx endif dy=my-y if dy<0 then dy=0-dy endif if dy>dx then dx=dy end if uo.print(STR(dx)) if dx<3 then wait(msbase*lagfactor) else wait(msbase) end if if mx==x then if my==y then return endif if my>y then UO.Print("UR") UO.Press(33) goto start endif UO.Print("DL") UO.Press(35) goto start end if if mx<x then if my>y then UO.Print("R") UO.Press(39) goto start endif if my==y then UO.Print("DR") UO.Press(34) goto start endif UO.Print("D") UO.Press(40) goto start end if if my<y then UO.Print("L") UO.Press(37) goto start endif if my==y then UO.Print("LU") UO.Press(36) goto start endif UO.Print("U") UO.Press(38) goto start end sub |
|
| Author: | Edred [ 2004-04-09 18:18:53 ] |
| Post subject: | |
Сразу с ходу скажу, что в main() не хватает одного wend-а... Который явно должен быть как раз перед if-ом с проверкой на элементаля... |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|