Yoko

All sides of Injection
It is currently 2026-03-04 11:29:11

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2009-03-12 18:46:14 
Offline

Joined: 2008-12-12 04:30:22
Posts: 89
Подправьте пожалуйста скрипт на мининг. Дело в том что он после каждой попытки пытаеться сново копать тот же таил. А у нас на сервере нужно всего лишь 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]


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited