<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; [AHK - GTA SA:MP] Помогите с кодом.]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=13411&amp;type=atom" />
	<updated>2018-01-27T01:08:33Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=13411</id>
		<entry>
			<title type="html"><![CDATA[Re: [AHK - GTA SA:MP] Помогите с кодом.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=123423#p123423" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>password := &quot;ПАРОЛЬ&quot;
chat := A_MyDocuments &quot;/GTA San Andreas User Files/SAMP/chatlog.txt&quot;
SetTimer, Chat, 50
SetTimer, PayDay, 1000
return

Chat:
FileRead, chatlog, % chat
FileDelete, % chat

if (RegExMatch(chatlog, &quot;\[\d+:\d+:\d+\]\s+БАНКОВСКИЙ ЧЕК&quot;))
{
	Send, {ESC down}
	sleep, 50
	Send, {ESC up}
}
if (RegExMatch(chatlog, &quot;\[\d+:\d+:\d+\]\s+Добро пожаловать на Advance RolePlay!&quot;))
{
	while(!isDialogOpen())
		Continue

	Send, % password &quot;{ENTER}&quot;
}
if (RegExMatch(chatlog, &quot;\[\d+:\d+:\d+\]\s+Server closed the connection&quot;) || RegExMatch(chatlog, &quot;\[\d+:\d+:\d+\]\s+Сервер возобновит работу в течение минуты&quot;))
{
	SendInput, {f6}/recon 15{Enter}
}
return

PayDay:
if (A_Min == 59 &amp;&amp; A_Sec == 01)
{
	Send, {ESC down}
	sleep, 50
	Send, {ESC up}

	sleep, 300

	Send, {vk57 down}
	sleep, 1000
	Send, {vk57 up}
}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2018-01-27T01:08:33Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=123423#p123423</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[AHK - GTA SA:MP] Помогите с кодом.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=123389#p123389" />
			<content type="html"><![CDATA[<p>В общем суть такова, скрипт не работает должным образом. <br /></p><div class="codebox"><pre><code>while (true)
{
	Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	loop
	{
	label:
	Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
		{
			IfInString, A_LoopReadLine, БАНКОВСКИЙ ЧЕК
			{
			goto, label1
			}
			else IfInString, A_LoopReadLine, Server closed the connection
			{
			goto, label2
			}
			else IfInString, A_LoopReadLine, Добро пожаловать на Advance RolePlay
			{
			goto, label3
			}
			else IfInString, A_LoopReadLine, Сервер возобновит работу в течение минуты
			{
			goto, label4
			}
		}
		
	SetTimer, CheckPayDay1, 1000 
	return 

	CheckPayDay1: 
	if (A_Min == 59 &amp;&amp; A_Sec == 30 || A_Min == 29 &amp;&amp; A_Sec == 30 || A_Min == 30 &amp;&amp; A_Sec == 30)
	{ 
		Send {vk57 down}
		sleep 500
		Send {vk57 up}
		Sendinput {Esc down}
		sleep 50
		Sendinput {Esc up}
		Send {vk57 down}
		sleep 500
		Send {vk57 up}
	}

	goto, label
	label1:
	Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
		{
		Send {vk57 down}
		sleep 500
		Send {vk57 up}
		Sendinput {Esc down}
		sleep 50
		Sendinput {Esc up}		
		}
	
	goto, label
	label2:
	Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
		{
			SendInput, {f6}/recon 15{Enter}
		}
	
	goto, label
	label3:
	Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Loop, Read, file.txt
		{
			Sendinput %A_LoopReadLine%{Enter}
			sleep 3000
			Send {vk57 down}
			sleep 500
			Send {vk57 up}
			Sendinput {Esc down}
			sleep 50
			Sendinput {Esc up}
		}
	
	goto, label
	label4:
	Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
	Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
		{
			SendInput {F6}/recon 180{Enter}
		}
	}
}</code></pre></div><p>Скрипт выше предназначен для того, чтобы после PayDay (часа игры) уходить в АФК (жмет на паузу). А в 59 минут 30 секунд выходить из АФК (Выходить с паузы). Так же скрипт сам релогается когда вылетает сообщение &quot;Server closed the connection&quot;. После слов &quot;Добро пожаловать на Advance RolePlay&quot; через 3 секунды скрипт вписывает пароль, после входа в игру уходит в АФК (жмет на паузу). Все паузы сопровождаются движением в перед.</p><p>И так вопрос. Почему после часа - двух часов срипт перестает работать ???</p>]]></content>
			<author>
				<name><![CDATA[bsmolz]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39003</uri>
			</author>
			<updated>2018-01-26T13:44:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=123389#p123389</id>
		</entry>
</feed>
