Версия для печати темы

Нажмите сюда для просмотра этой темы в обычном формате

UoKit.com Форумы _ UO Pilot _ findimage WORKS, but I need some HELP

Автор: wlaient 28.4.2024, 1:51

I have this script that works

-------------------------------------------------------
set $a FindImage(982, 0 1364, 328 (C:\macro\v1.png) %crds 2 100 1))
move %arr [1 1] %arr [1 2]
End_script
end_if
-------------------------------------------------------

can be
move %crds [ 1 1 ] %crds [ 1 2 ]
or
move %crds [ 1 3 ] %crds [ 1 4 ]

-------------------------------------------------------

however, the cursor is always moved to a fixed coordinate x or y

-------------------------------------------------------
I have this script that works too:

set #x0 1326
set #y0 634
set #x1 1348
set #y1 644
set #x #x0 + random(#x1 - #x0)
set #y #y0 + random(#y1 - #y0)
move #x #y

In the script above, the cursor is randomly moved to the pre-established X Y coordinates
-------------------------------------------------------

How do I deploy these 2 scripts? How do I make %crds move the cursor to a random coordinate within the found image?

-------------------------------------------------------



Автор: DarkMaster 28.4.2024, 3:44

set #x %crds [1 1] + random(%crds [1 3] - %crds [1 1] + 1)
set #y %crds [1 2] + random(%crds [1 4] - %crds [1 2] + 1)

Автор: wlaient 28.4.2024, 4:34

Цитата(DarkMaster @ 28.4.2024, 3:44) *

set #x %crds [1 1] + random(%crds [1 3] - %crds [1 1] + 1)
set #y %crds [1 2] + random(%crds [1 4] - %crds [1 2] + 1)

When you die, you will go straight to heaven, thank you very much young man

Русская версия Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)