Не пойму в чём дело?!
Posted: 2010-02-11 15:08:38
Это скрипт на стрижку овец - он был сделал для Антараса, а я играю на Abyss переделал его вроде правельно но всёравно он не хочет работать после того как он срезает шерсть с овечек, после этого больше нечего не происходит... Заранее спасибо!
Code: Select all
sub Skinning()
var pile='0x0DF8'
var leather='0x0DF8'
var cotton='0x0DF8'
var k
uo.Set('finddistance','15')
#Scripts Writer#Antares#
#02/08/07#
DIM sheep[2]
sheep[0]=0x00CF
sheep[1]=0x00DF
while uo.Weight < 420
uo.FindType(sheep[0],'-1','ground')
if uo.FindCount() then
WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
k=0
if uo.GetDistance('finditem') <= 2 then
uo.Click('finditem')
wait(100)
repeat
wait(100)
k=k+1
until uo.InJournal('a sheep') || k>50
uo.WaitTargetObject('finditem')
uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
wait(500)
if uo.InJournal('You put') then
uo.Print('You get a pile of wool. There are '+STR(uo.Count(pile))+ ' piles of wool.')
end if
k=0
uo.DeleteJournal()
uo.Click('finditem')
wait(100)
repeat
wait(100)
k=k+1
until uo.InJournal('a lamb') || k>50 || uo.InJournal('You must wait for the wool')
end if
else
uo.Print('There are no sheep. Start to kill lambs.')
uo.FindType(sheep[1],'-1','ground')
if uo.FindCount() then
WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
k=0
uo.DeleteJournal()
if uo.GetDistance('finditem') <= 1 then
uo.Click('finditem')
wait(100)
repeat
wait(100)
k=k+1
until uo.InJournal('a lamb') || k>50
if k<50 then
uo.WarMode(true)
uo.Attack('finditem')
uo.DeleteJournal()
k=0
wait(100)
repeat
wait(100)
k=k+1
until uo.InJournal('Body of lamb') || k>100
if uo.InJournal('Body of lamb') && k<100 then
uo.usetype('0x13F6')
uo.WarMode(false)
uo.WaitTargetObject('lastcorpse')
uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
uo.DeleteJournal()
k=0
wait(100)
repeat
wait(100)
k=k+1
until uo.InJournal('You carve') || k>50
uo.Click('lastcorpse')
wait(250)
if uo.InJournal('0 items') || uo.InJournal('1 items') then
if uo.InJournal('1 items') then
wait(500)
uo.FindType(leather,'-1','lastcorpse')
if uo.FindCount() then
uo.moveitem('finditem')
wait(500)
uo.Print('There are '+STR(uo.Count(leather))+' leather in a backpack.')
end if
else
uo.FindType(cotton,'-1','lastcorpse')
if uo.FindCount() then
uo.moveitem('finditem')
wait(500)
uo.Print('There are '+STR(uo.Count(cotton))+' cotton in a backpack.')
end if
end if
end if
else
uo.Print('There are no body. 0_0')
end if
end if
end if
end if
end if
wait(1000)
wend
end sub