Код
set #pickaxeid lastobjectid
set #move 0
set $msg1 :
set $msg2 you put
set $msg3 fail
set $msg4 try
set $msg5 line
set $msg6 where
set $msg7 no ore
set $msg8 skill
:body
set #orex charposx - 2
set #orey charposy - 2
repeat 5
repeat 5
gosub work
set #orex #orex + 1
end_repeat
set #orex charposx - 2
set #orey #orey + 1
end_repeat
if #move = 0
set #move 2
if_not chardir = 0
send pageup 500
end_if
repeat 5
send pageup 500
end_repeat
goto body
end_if
if #move = 2
set #move 4
if_not chardir = 2
send pagedown 500
end_if
repeat 5
send pagedown 500
end_repeat
goto body
end_if
if #move = 4
set #move 6
if_not chardir = 4
send end 500
end_if
repeat 5
send end 500
end_repeat
goto body
end_if
if #move = 6
set #move 0
if_not chardir = 6
send home 500
end_if
repeat 5
send home 500
end_repeat
goto body
end_if
goto body
end_script
:work
set lastobjectid #pickaxeid
set lasttargetkind 3
set laststatictype 1339
set lasttargetx #orex
set lasttargety #orey
send f1 // lastobject waitfortarget lasttarget
waitfortarget 1000
set timer
while lastmsg = $msg6 or lastmsg = $msg1
wait 5
if timer > 8000
send escape
return
end_if
if hits < str
say guards
wait 1000
end_if
end_while
:msgs
if lastmsg = $msg2 or lastmsg = $msg3 or lastmsg = $msg8
goto work
end_if
if lastmsg you must
wait 2000
goto work
end_if
if lastmsg = $msg3 or lastmsg = $msg4 or lastmsg = $msg5 or lastmsg = $msg7
return
end_if
if timer > 6000
return
else
goto msgs
end_if
Народ, что нужно добавить в этом скрипте, чтобы чар сам брал кирку из бэкпэка в том случае, если она сломается?