| Yoko http://forum.yoko.com.ua/ |
|
| Скрипт на мининг =) http://forum.yoko.com.ua/viewtopic.php?f=3&t=14529 |
Page 1 of 1 |
| Author: | Jekaaa [ 2009-03-12 18:46:14 ] |
| Post subject: | Скрипт на мининг =) |
Подправьте пожалуйста скрипт на мининг. Дело в том что он после каждой попытки пытаеться сново копать тот же таил. А у нас на сервере нужно всего лишь 1 раз кликнуть на таил и он будет его копать пока все не выкапает. Мне нужно чтобы когда он тыкал на таил он ждал пока все выкапываться и только потом начинал капать следующий таил =) [code] var fizzle = 0 var iron = 1 var d var k var i var try = 0 sub success() if UO.InJournal("You put the Iron Ore") and Iron == 1 then try = 0 return 1 end if if UO.InJournal("You loosen") then if fizzle == 0 then return 1 else if try < fizzle then try = try + 1 return 1 else try = 0 return 0 end if end if end if return 0 end if sub checkaction() if UO.InJournal("You loosen") then return 1 end if if UO.InJournal("You put") then return 1 end if if UO.InJournal("no ore") then return 1 end if if UO.InJournal("no line") then return 1 end if return 0 end sub sub definedir( d ) if d == 0 then k = 33 return k end if if d == 2 then k = 34 return k end if if d == 4 then k = 35 return k end if if d == 6 then k = 36 return k end if return 0 end sub sub main() UO.DeleteJournal() k = definedir(UO.GetDir("self")) if k == 0 then UO.Print("You are at wrong direction...") UO.Exec("terminate all") end if while 1 if k == 34 OR k == 36 then for i = UO.GetY("self") - 2 to UO.GetY("self") + 2 start1: UO.Exec("waittargettile * "+STR(UO.GetX("self"))+" "+STR(i)+" "+STR(UO.GetZ("self"))) Wait(200) UO.usetype("NPF") UO.DeleteJournal() while NOT checkaction() Wait(1000) wend if success() then goto start1 else Wait(1000) end if next UO.Press(k,2,500) end if if k == 33 OR k == 35 then for i = UO.GetX("self") - 2 to UO.GetX("self") + 2 start2: UO.Exec("waittargettile * "+STR(i)+" "+STR(UO.GetY("self"))+" "+STR(UO.GetZ("self"))) Wait(200) UO.usetype("NPF") UO.DeleteJournal() while NOT checkaction() Wait(1000) wend if success() then goto start2 else Wait(1000) end if next UO.Press(k,2,500) end if wend end sub[/code] |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|