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

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

UoKit.com Форумы _ UO Pilot _ RANDOM left click

Автор: wlaient 21.3.2024, 1:20

I would like to create a script, within a given coordinate space, a "box", and the script randomly selects a coordinate within that box, and clicks with the left button.

That would be the idea, but it doesn't work:

if_not 202, 30 3355443
wait 1000
set #random_x random 560 597
set #random_y random 512 594
mouse_left #random_x #random_y
wait 1000
end_if

I want to avoid always clicking in the same place, if condition X happens, is this possible?

Автор: Madeus 21.3.2024, 8:19

I don't use native syntax, but it must be something like this.

if_not 202, 30 3355443
wait 1000
set #x0 560
set #x1 597
set #y0 512
set #y1 594
set #x #x0 + random(#x1 - #x0)
set #y #y0 + random(#y1 - #y0)
mouse_left #x #y
wait 1000
end_if

Автор: wlaient 22.3.2024, 0:27

Цитата(Madeus @ 21.3.2024, 8:19) *

I don't use native syntax, but it must be something like this.

if_not 202, 30 3355443
wait 1000
set #x0 560
set #x1 597
set #y0 512
set #y1 594
set #x #x0 + random(#x1 - #x0)
set #y #y0 + random(#y1 - #y0)
mouse_left #x #y
wait 1000
end_if



YOU ARE MY HERO!!!
With some small changes I made this code work, I don't understand anything about programming, I was using CHATGPT + tentative and error, thank you very much

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