Тема: Macros
Показать сообщение отдельно
Re: Macros
Старый 03.02.2012, 19:51   #5
LanceR
Mystical Hero
 
Аватар для LanceR
 
Регистрация: 12.01.2010
Адрес: [frozen]
Сообщений: 1,057
Репутация: 13 [+/-]
на правильном пути, пока что (от 5 до 15)
LanceR на правильном пути, пока что (от 5 до 15)
Чар: Burning
Гильдия: [frozen]
По умолчанию Re: Macros

/ / Mining near wall
/ / Spacing between lines 20
set # napravl 3 / / direction to dig around the rock (0 = N, 1 = E, 2 = S, 3 = W)
set $ miningbtn01 F10 / / button binds LastObject / WFT in the client
set $ miningbtn2 F11 / / button in the client binds LastTarget
set # wstep 1500 / / delay before the transition to a new tile chara after the filing of this team
set # wmine 4300 / / delay before the digging charom Tail said after calling $ miningbtn2
set # pich 1 / / light the need to support the replacement picks for failure (0 = need a = not applicable)
set% pickaxe [1] 0 / / ID first alternate picks
set% pickaxe [2] 0 / / ID second alternate picks
set% pickaxe [3] 0 / / ID third alternate picks
set # pickaxetype 0 / / itemtayp picks

set $ s1 is no ore here
set $ s2 have no line
set $ s3 try mining
set $ s4 too far away
set $ s5 has changed
set $ s6 loosen some rocks
set $ s7 has increased
set $ s8 put the
set $ broke broke / / failure message when you pick
set $ loose reach that / / Message for the loss of picks (including the break)
set # broke 0 / / counter pick breakdowns
set # a 0 / / turn indicator is needed
set # ston 0 / / display on the site of stasis
set # superston 0 / / display on the site of major congestion

if (# napravl = 0)
set $ correctx + 0
set $ correcty - 1
set $ nexttilebtn Home
set $ otskalibtn End
set $ kskalebtn PageUp
end_if
if (# napravl = 1)
set $ correctx + 1
set $ correcty + 0
set $ nexttilebtn PageUp
set $ otskalibtn Home
set $ kskalebtn PageDown
end_if
if (# napravl = 2)
set $ correctx + 0
set $ correcty + 1
set $ nexttilebtn Home
set $ otskalibtn PageUp
set $ kskalebtn End
end_if
if (# napravl = 3)
set $ correctx - 1
set $ correcty + 0
set $ nexttilebtn PageUp
set $ otskalibtn PageDown
set $ kskalebtn Home
end_if

: Start

set lasttargetx charposx $ correctx
set lasttargety charposy $ correcty
set lasttargetkind 2
send $ miningbtn01 300
set $ prevmsg lastmsg
if (lastmsg = $ broke) or (lastmsg = $ loose)
if (# pich = 0)
set # broke # broke + a
if (# broke <= 3)
set LastObjectID% pickaxe [# broke]
set LastObjectType # pickaxetype
goto start
else
Do you run out msg replacement picks!
end_if
else
msg You broke a pick!
end_if
end_if
send $ miningbtn2 # wmine
if (lastmsg = $ prevmsg)
alarm
say Ping troubles! Or do you lag, or an incorrectly displayed "# wmine", or got antimakros.
end_if
set timer
while_not (lastmsg = $ s1) or (lastmsg = $ s2) or (lastmsg = $ s4) / / or (timer> 800)
while_not (lastmsg = $ s5) or (lastmsg = $ s6) or (lastmsg = $ s7) or (lastmsg = $ s8) or (timer> 7000)
if (lastmsg = $ s3) / / approach to rock, if the line is moved away from us digging (triggered by the absence of rocks)
repeat 2
send $ kskalebtn # wstep
end_repeat
goto start
end_if
set # a 1
end_while
goto start
end_while

: Nextstep
set # prevx charposx
set # prevy charposy
if (# a> <0)
send $ nexttilebtn # wstep
set # a 0
end_if
send $ nexttilebtn # wstep

if (charposx = # prevx) and (charposy = # prevy) / / pripyatstviya crawl from the rock towards the chara (triggered by congestion on the site (including the upiranii the rock))
set # ston # ston + 1
set # superston # superston + 1
if (# ston> 2)
repeat 2
send $ otskalibtn # wstep
end_repeat
set # ston 0
set # superston 0
set # a 1
goto nextstep
else
goto nextstep
end_if
else
set # ston 0
set # superston 0
end_if

goto start



/ / Before using the script must:
/ / Check that there are no obstacles to the perpendicular away from the rocks in its entirety
/ / Take into account that the digging must be to the south to ~ ~ the north, and not vice versa (allows you to bypass most of the textures bugs)
/ / Do not forget to pick juzat handles before each new start script
__________________
Welcome
LanceR вне форума   Ответить с цитированием