Помощь - Поиск - Пользователи - Календарь
Полная версия: help to write script please
UoKit.com Форумы > Кликер > UO Pilot
rdg
hi, i would like help to check these places marked with black square
wanted to do a check cap, F1 / F3 (potions) and Stamina
ex:
if cap <20
goto back
else
goto pot
end_if
*
:pot
if mp / hp <20
goto back
else
goto stamina
end_if

:stamina
if stamina < 15:00
goto back
else
goto hunt
end_if


that would be an idea that I have, but I can't put it into practice. AHHH and how do I "pause" a label in the same script? it's possible?


in battle is the target, I would like to activate the (General) tab and mark the 3 options that appear there, how can I do that too?
ex: there is 1 bug on the screen, I activate option 1, there are 3, I disable option 1 and activate 2 and 3
nykep
from what I understood :
in this case easiest way for hp mana and stamina is checking by color with operator IF or IF_NOT.
for CAP : if the number does not shift when the number of characters changes I would first use "findcolor" in the first character area in a three-digit number. if the color is not found, then the number is two-digit and we begin to look for a picture of number "1" and "2" with "findimage" in the first character area in a two-digit number.
You cant pause a label, you should use a cycles such as "while"
rdg
Цитата(nykep @ 28.4.2020, 1:33) *

from what I understood :
in this case easiest way for hp mana and stamina is checking by color with operator IF or IF_NOT.
for CAP : if the number does not shift when the number of characters changes I would first use "findcolor" in the first character area in a three-digit number. if the color is not found, then the number is two-digit and we begin to look for a picture of number "1" and "2" with "findimage" in the first character area in a two-digit number.
You cant pause a label, you should use a cycles such as "while"


checking hp and mana by color, it's not that easy, because it only changes color when it reaches 0, it can cause me to die on the way back. So I wanted to do, if possible, an accountant. The cap only changes color, just like potions, when it reaches 0. The stamina bar I think it is possible to change the color.

Could you give me an example of how the script would do if it were for you?
I did not understand correctly the part of the 1 ~ 2 digits
nykep
understand that changing the length of the hp/mana bar means the color has changed.
mouse over the right edge of the red hp bar and press ctrl+a(you will get coords of pixel and it color in uopilot), then lose some hp and press ctrl+b, this pixel will no longer be red, this will be the condition for further action.
example:

if_not 123, 321 13616357
sendex {f1}
end_if

https://uopilot.uokit.com/wiki/index.php?ti...%86%D0%B8%D0%B9
rdg
Цитата(nykep @ 29.4.2020, 2:44) *

understand that changing the length of the hp/mana bar means the color has changed.
mouse over the right edge of the red hp bar and press ctrl+a(you will get coords of pixel and it color in uopilot), then lose some hp and press ctrl+b, this pixel will no longer be red, this will be the condition for further action.
example:

if_not 123, 321 13616357
sendex {f1}
end_if

https://uopilot.uokit.com/wiki/index.php?ti...%86%D0%B8%D0%B9


this I can do, thanks. But I did refer to the hp and mana potions in the squares at the bottom left. The ideal for doing this and for the cap would be an itemcount (), but I have no idea how to start xD
nykep
the number recognition script is pretty complicated. If you are interested in the condition for specific numbers, for example, 20, then the easiest way is to take a screenshot when these numbers are in the right place, cut out the pictures and use "findimage" to check if right number is on the screen.
https://uopilot.uokit.com/wiki/index.php?title=Findimage
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.
Русская версия Invision Power Board © 2001-2024 Invision Power Services, Inc.