Здравствуйте, гость ( Вход | Регистрация )

 
Ответить в эту темуОткрыть новую тему
> help to write script please
rdg
сообщение 27.4.2020, 21:19
Сообщение #1


**

Neophyte
Сообщений: 19
Регистрация: 22.10.2018
Группа: Пользователи
Наличность: 0
Пользователь №: 19.088
Возраст: 23



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


Эскизы прикрепленных изображений
Прикрепленное изображение
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
nykep
сообщение 28.4.2020, 1:33
Сообщение #2


****

Apprentice
Сообщений: 233
Регистрация: 1.9.2012
Группа: Пользователи
Наличность: 1200
Пользователь №: 15.246
Возраст: 25



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"
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
rdg
сообщение 28.4.2020, 4:13
Сообщение #3


**

Neophyte
Сообщений: 19
Регистрация: 22.10.2018
Группа: Пользователи
Наличность: 0
Пользователь №: 19.088
Возраст: 23



Цитата(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
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
nykep
сообщение 29.4.2020, 2:44
Сообщение #4


****

Apprentice
Сообщений: 233
Регистрация: 1.9.2012
Группа: Пользователи
Наличность: 1200
Пользователь №: 15.246
Возраст: 25



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
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
rdg
сообщение 2.5.2020, 4:06
Сообщение #5


**

Neophyte
Сообщений: 19
Регистрация: 22.10.2018
Группа: Пользователи
Наличность: 0
Пользователь №: 19.088
Возраст: 23



Цитата(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
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
nykep
сообщение 2.5.2020, 23:51
Сообщение #6


****

Apprentice
Сообщений: 233
Регистрация: 1.9.2012
Группа: Пользователи
Наличность: 1200
Пользователь №: 15.246
Возраст: 25



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
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения

Ответить в эту темуОткрыть новую тему
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0

 

- Текстовая версия | Версия для КПК Сейчас: 24.4.2024, 12:02
Designed by Nickostyle