<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; Визуальное понимание полоски HP в (!)любой игре(!)]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=14501</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14501&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Визуальное понимание полоски HP в (!)любой игре(!)».]]></description>
		<lastBuildDate>Tue, 22 Jan 2019 10:36:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Визуальное понимание полоски HP в (!)любой игре(!)]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=131498#p131498</link>
			<description><![CDATA[<p>не совсем понятно в чем, собственно, проблема состоит.<br />Но как мне помнится в ПОЕ не полоска, а сфера, наполненная красным цветом как индикация уровня хп.<br />Я как то делал подобное -<br />Отмечаешь узкий вертикальный прямоугольник который затрагивает практически всю сферу.<br />И в нем ищешь красный цвет с большой вариативностью.<br />и первое нахождение красной точки по Y координате даст тебе возможность получить в процентах хп.</p>]]></description>
			<author><![CDATA[null@example.com (lngvar)]]></author>
			<pubDate>Tue, 22 Jan 2019 10:36:57 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=131498#p131498</guid>
		</item>
		<item>
			<title><![CDATA[Визуальное понимание полоски HP в (!)любой игре(!)]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=131427#p131427</link>
			<description><![CDATA[<p>Здравствуйте хотел написать некий скрипт который будет следить за полоской HP персонажа опираясь на визуально полученные данные, а <strong>не</strong> на значения из памяти игры ArtMoney и Cheat Engine. Но в процессе реализации столкнулся с непонятной мне проблемой. Пробую описать ниже после кода скрипта.<br />Код:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetBatchLines, -1
SetMouseDelay, -1
SetKeyDelay, -1
CoordMode, Pixel, Window
CoordMode, Window, Window
#MaxMem 999999999
;x100 y873 x120 y1070
SeaerchArea:= [100, 873 ,120 ,1070]
CenterArea:= [(SeaerchArea[3]-SeaerchArea[1])//2, SeaerchArea[2], (SeaerchArea[3]-SeaerchArea[1])//2, SeaerchArea[4]]
CenterDifferenceY:= SeaerchArea[4]-SeaerchArea[2]
;MsgBox, SeaerchArea = %SeaerchArea%`nCenterArea = %CenterArea%`nCenterDifferenceY = %CenterDifferenceY%

getCenterPixS()
{
	global
	CenterPixels:= []
	Loop, %CenterDifferenceY%
	{
		PixelGetColor, CenterPixel, CenterArea[1], CenterArea[2]
		CenterPixels.Push(CenterPixel)
		CenterArea[2]:= CenterArea[2]+1
	}
	Return, CenterPixels
}

getCenterPixS2()
{
	global
	CenterPixels2:= []
	Loop, %CenterDifferenceY%
	{
		PixelGetColor, CenterPixel2, CenterArea[1], CenterArea[2]
		CenterPixels2.Push(CenterPixel2)
		CenterArea[2]:= CenterArea[2]+1
	}
	Return, CenterPixels2
}

comparisonPixels()
{
	global
	comP:= 1
	comparison:= 0
	Loop, %CenterDifferenceY%
	{
		If (CenterPixels[A_Index] != CenterPixels2[A_Index])
		{
			comP++
		}
	}
	comparison:= (100 * comP) // CenterDifferenceY
	ToolTip, %comparison%
	Return, comparison
}

1::
getCenterPixS()
Loop
{
	getCenterPixS2()
	comparisonPixels()
}
Return

2::
ExitApp
Return</code></pre></div></div></div><p>Принцип работы скрипта:<br />1) Сохранение данных полоски HP в состояние &quot;полное HP&quot; (в данном случае полоска HP вертикальная игра POE (Path of Exile), не состоит никакого труда для адаптации под горизонтальную полосу.)<br />2) Постоянный сбор тех же(из тех же пикселей на экране) данных для сравнения.<br />3) Сравнение<br />_________________________________________________</p><p>Проблема:<br />Проблема заключается в сравнение. 100 раз за сегодня переписал всё, либо полное сходство с первоначальными данными, либо полное различие. Отсутствует какая-либо динамика в изменениях. И я не могу понять где ошибка.</p><p>Проверял я всё это дело не только в игре, так же проверял на рабочем столе. <strong>Игра тут не причем</strong>.</p><p>! = К любой игре где отсутствует какие либо фильтры и альфа слои. А так же полоса всегда находиться на одном месте.</p>]]></description>
			<author><![CDATA[null@example.com (romzes96)]]></author>
			<pubDate>Fri, 18 Jan 2019 18:11:27 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=131427#p131427</guid>
		</item>
	</channel>
</rss>
