Code:
#///////////////////////////////////////////////////////////////
#//////////////Scripted/by/Hotride/for/The/Abyss////////////////
#///////////////////////////////////////////////////////////////
sub Lumber()
uo.deletejournal()
while true
if CheckLumberNow() then
GetLumberNow()
GetLumberInstr()
endif
wait(1000)
wend
end sub
Sub GetLumberNow()
dim msgs[5]
msgs[0]='in your pack'
msgs[1]='but fail to'
msgs[2]='no logs left'
msgs[3]='That is too far away'
msgs[4]='You have no line of sight to that location'
var t=0,f=0
repeat
uo.deletejournal()
uo.waittargettile('lasttile')
GetLumberInstr()
t=0
repeat
wait(1000)
t=t+1
until uo.injournal(msgs[0]) or uo.injournal(msgs[1]) or uo.injournal(msgs[2]) or uo.injournal(msgs[3]) or uo.injournal(msgs[4]) or t>=10
if uo.injournal(msgs[1]) then
f=f+1
else
f=0
endif
until uo.injournal(msgs[2]) or uo.injournal(msgs[3]) or uo.injournal(msgs[4])
uo.deletejournal()
end sub
Sub CheckLumberNow()
dim msgs[2]
msgs[0]='in your pack'
msgs[1]='but fail to'
var i
for i=0 to 1
if uo.injournal(msgs[i]) then
return 1
endif
next
return 0
end sub
Sub GetLumberInstr()
dim instr[4]
instr[0]='0x0F43'
instr[1]='0x0F39'
instr[2]='0x0E85'
instr[3]='0x0E86'
var i
while true
for i=0 to 3
uo.findtype(instr[i],-1,'my')
if uo.findcount() then
uo.useobject('finditem')
return
endif
next
uo.print('Не найден инструмент')
wait(3000)
wend
end sub
Посмотри, какие у тебя на шарде вылезают мессаги и замени эти на свои:
Code:
msgs[0]='in your pack'
msgs[1]='but fail to'
msgs[2]='no logs left'
msgs[3]='That is too far away'
msgs[4]='You have no line of sight to that location'
Сюда впиши типы топоров, которыми будешь рубить:
Code:
instr[0]='0x0F43'
instr[1]='0x0F39'
instr[2]='0x0E85'
instr[3]='0x0E86'