Moon_Dog | Дата: Среда, 08.02.2012, 00:26 | Сообщение # 1 |
Рядовой
Группа: Администраторы
Сообщений: 5
Статус: Offline
| F9 - lastobject+waitfortarget+lasttarget
:start set #grad 5 set #wait 300 set #startx charposx set #starty charposy set #step 0 set #h hits set #err 0
set $msg1 what do you want set $msg2 it appears set $msg3 you can't reach set $msg4 you put the logs set $msg5 your skill set $msg6 you see set $msg7 there are no logs set $msg9 world save set $msg10 you hack at set $msg12 try set $msg13 too far away
:1 set $right free set $left free set $switch 00 set $turn right set #p 0 set #end 1 set #ai 0
set #dx charposx - #startx gosub tunex
:12
if_not $switch = 11 if_not chardir = 0 send pageup wait #wait end_if
set #chary charposy send pageup wait #wait if #chary = charposy send pageup wait #wait end_if
if_not #chary = charposy
set $left free set $right free if #p < 0 and $switch = 00 set #dx charposx - #startx gosub tunex2 end_if set $switch 00 set #p #p - 1 set #end 1
set #step #step + 1 set #parity #step / #grad * #grad - #step if #parity = 0 gosub work end_if goto 12 end_if if $left = free and $right = free set #end #end + 1 else set #end #end + 2 end_if
if $switch = 01
:13 set $switch 10
if $left = free and $right = free
if $turn = left set $turn right else set $turn left end_if end_if end_if
if $switch = 10
set #dx charposx - #startx gosub tunex2
if $left = stop and $right = stop
if #leftstop < #rightstop
set $turn left set #end #leftstop else set $turn right set #end #rightstop end_if
set $left free set $right free set #ai #ai + 2 if #ai > #end set #end #ai end_if set #p 0
if_not chardir = 4 send end wait #wait end_if repeat #ai / 2 set #chary charposy send end wait #wait + 50 if_not #chary = charposy set #step #step - 1 set #p #p + 1 else break end_if end_repeat end_if set $switch 11 end_if end_if
if ( $left = free or $right = free ) and ( $switch = 00 or $switch = 11 ) repeat #end / 2 if $turn = right and $right = free if_not chardir = 2 send pagedown wait #wait end_if set #charx charposx send pagedown wait #wait if charposx = #charx send pagedown
wait #wait end_if if #charx = charposx set $turn left
set $right stop set #end #end + 1 set #rightstop #end + 1 goto 13 end_if else if $turn = left and $left = free if_not chardir = 6 send home wait #wait end_if set #charx charposx send home wait #wait
|
|
| |
Moon_Dog | Дата: Среда, 08.02.2012, 00:26 | Сообщение # 2 |
Рядовой
Группа: Администраторы
Сообщений: 5
Статус: Offline
| if charposx = #charx send home wait #wait end_if if #charx = charposx set $turn right set $left stop set #end #end + 1 set #leftstop #end + 1 goto 13 end_if end_if end_if
end_repeat set $switch 01 end_if
goto 12
:tunex if_not #dx = 0 :tunex2 if #dx < 0 if_not chardir = 2 send pagedown wait #wait end_if repeat -#dx set #charx charposx send pagedown
wait #wait if #charx = charposx send pagedown wait #wait end_if end_repeat end_if if #dx > 0 if_not chardir = 6 send home wait #wait end_if
repeat #dx set #charx charposx send home wait #wait if #charx = charposx send home wait #wait end_if end_repeat end_if end_if return
:work set #workx charposx - 2
set #worky charposy - 2 repeat 5 repeat 5 set #tempx #workx / 2 * 2 set #tempx #workx - #tempx set #tempy #worky / 3 * 3 set #tempy #worky - #tempy if_not #tempx = 0 and #tempy = 0 set #workx #workx + 1 continue end_if
set lasttargetx #workx set lasttargety #worky :chop send f9 waitfortarget 1000 set timer while ( lastmsg what ) and timer < 6000 wait 100 end_while
if ( lastmsg put ) or ( lastmsg fail ) goto chop end_if set #workx #workx + 1 end_repeat set #workx charposx - 2 set #worky #worky + 1 end_repeat return
|
|
| |