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

/ / Camping
set # dl 40 / / The shortest distance between centers of adjacent tiles in pixels (40dlya 640 * 480)
set # mbasex 319 / / X coordinate of the pixel of a handful of wood chips under the charom
set # mbasey 245 / / Y coordinate of a pixel of a handful of wood chips under the charom
/ / Goto test
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
set # basex # mbasex
set # basey # mbasey
for # x - # dl # dl # dl
for # y - # dl # dl # dl
set # Targx # basex + # x
set # Targy # basey + # y
set # a # basex - # dl
set # b # basey + # dl
set # c # basey - # dl
if ((# Targx = # a) and (# Targy = # b)) or ((# Targx = # mbasex) and (# Targy = # mbasey)) or ((# Targx = # mbasex) and (# Targy = # c))
goto next1
end_if
repeat 19
drag # mbasex, # mbasey # Targx, # Targy a
wait 50
set # a LastLiftedID
set LastObjectID # a
repeat 4
send F11 / / LastObject in the client
end_repeat
end_repeat
: Next1
end_for
end_for

/ /: Test
set # a # dl / 2
set # b # dl / 2
set # basex # mbasex + # a
set # basey # mbasey - # b

for # x - # dl # dl # dl
for # y - # dl # dl # dl
set # Targx # basex + # x
set # Targy # basey + # y
set # a # basex + # dl
set # b # basey - # dl
if (# Targx = # a) and (# Targy = # b)
goto next2
end_if
repeat 19
drag # mbasex, # mbasey # Targx, # Targy a
wait 50
set # a LastLiftedID
set LastObjectID # a
repeat 4
send F11 / / LastObject in the client
end_repeat
end_repeat
: Next2
end_for
end_for

/ / Repeat 5
alarm
/ / Wait 2s
/ / End_repeat
/ / Stop_script
/ / Do not forget to click with a bind LastObject
-------------------------------------------------------------------------------




Добавлено через 46 секунд
/ / ----------- FISHING -------------
gosub fishingsub / / fishing
/ / 13 tiles on the bridge
repeat 13
send PageDown 200 / / direction of motion. Change to the desired
end_repeat
end_repeat
/ / Walk along the beach at the starting point tile 7.
repeat 27 / / one tile on the turn.
send home 200
end_repeat
send PageDown 200 / / turn.
/ / How many cycles have a night (for the optimists and statisticians)
set # counter # counter +1
: Fishingsub / / fishing sub
/ / Treant part borrowed from someone, but refined and optimized to the low visibility.
for # y -6 6 1 / /! BOOT here, if you dig down to the shore, and not from the bridge,
for # x -6 6 1 / /! need to tweak the max coordinates of X and Y.
: Fishing / / routine fishing
set lasttargetx charposx + # x
set lasttargety charposy + # y
set lasttargetkind 2
send F1 1000 / / LastObject, WaitForTarget, LastTarget
set timer 0
while_not (lastmsg pull) or (lastmsg fail) or (lastmsg Try) or (lastmsg quick) or (lastmsg no fish) or (timer> 6000)
end_while
if (lastmsg Try) or (lastmsg quick) or (lastmsg no fish) or (lastmsg fail)
wait 1500 / / delay after unsuccessful use of the bait.
end_if

if (lastmsg pull) and (wght <620) / /! if the goal is simply pumping, it can be turned off to save time.
drag 406, 298 404, 254 all / / dragging the fish themselves.
drag 406, 298 404, 254 all / / dragging the fish themselves.
wait 500
end_if

if lastmsg destroer / / broken rod
send f3 500 / /! assists in the - target type for the bait
double_left 810, 68 / /! coordinates of the rod in his hand. It is safer than taking from the pack.
wait 500
send f2 1000
end_if
if_not (lastmsg are no fish) or (lastmsg Try) or (lastmsg pull)
/ /! Last or - Fishing will continue only once, instead of catching up to no fish
/ / If the length of the shore enough, it accelerates the process of catching and bleeding.
/ / If the skill is less than 60, then it makes sense to put / / before or (lastmsg pull)
goto fishing / / procedure for fishing.
end_if
end_for
end_for
return / / fishing


+ Add to the script
/ / Pause phishing script to script is not interrupted at some inconvenient time
if lastmsg world
pause_script 3 / /! number should be stopped to register the script!
wait 10 000
say Save the Power of Macros! / / To reset the floor Lastmsg
resume_script 3 / /! number should be stopped to register the script!
end_if
/ / Check - if not kill you until you calm udite ..
if (lastmsg hit) or (lastmsg attacking you) or (hits <str)
repeat 3
say guards
wait 1000
end_repeat
end_if
__________________
Welcome

Последний раз редактировалось LanceR; 04.02.2012 в 14:20.. Причина: Добавлено сообщение
LanceR вне форума   Ответить с цитированием