Уже давно пытаюсь создать бот для него и вот что получилось:
1-Очень большой код-хочу чтобы вы мне помогли убрать лишнее из него.
2-Программа медленная - ущу решение
Хочу реализовать в этом боте
1- Умное хождение за сигами (Не соберает если их нет , и соберает имитируя человека - Заход , если нет - не соберает)
2- Сохранение настроек...
Ну так как в коде есть ошибки с начало их исправим а потом за реализацую новых параметров бота
Вот сам код
Вот еще выложил исходники) буду рад помощи
1-Очень большой код-хочу чтобы вы мне помогли убрать лишнее из него.
2-Программа медленная - ущу решение
Хочу реализовать в этом боте
1- Умное хождение за сигами (Не соберает если их нет , и соберает имитируя человека - Заход , если нет - не соберает)
2- Сохранение настроек...
Ну так как в коде есть ошибки с начало их исправим а потом за реализацую новых параметров бота
Вот сам код
Код:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <TreeViewConstants.au3>
#include <ButtonConstants.au3>
Opt('MustDeclareVars', 1)
Opt('TrayIconDebug', 1)
_Main()
Func _Main()
Local $dvor, $proxod, $podogrev,$money,$sigaret,$prib1,$prib2,$prib3
Local $msg,$rating,$energy,$diamond
Global $Host,$File,$URL,$PostData,$oHTTP,$Response,$sUser,$Auth
Global $hGUI, $Input, $Button, $nMsg, $sMoney
Global $b1,$b2,$b3,$b4,$b5,$b6,$b7
Global $k1,$k2,$k3,$k4,$k5,$k6,$k7
Global $v1,$v2,$v3,$v4,$v5,$v6,$v7
GUICreate("Бот для Тюряги", 400, 379)
GUICtrlCreatePic(@ScriptDir &"\extra\logo.jpg", 0, 0, 201, 379,$SS_BITMAP )
GuiCtrlSetState(-1,$GUI_DISABLE)
$dvor = GUICtrlCreateButton("Собрать папиросы во Дворе", 210, 290, 170, 20)
$proxod = GUICtrlCreateButton("Cобрать все в Проходной", 10, 286, 145, 32, $BS_BITMAP)
GUICtrlSetImage(-1,@ScriptDir &"\extra\prib.bmp",0)
GUICtrlSetTip($money,"Показывает инфу о Сигаретах,Энергии и т.д.")
GUICtrlSetCursor(-1, 0)
$podogrev = GUICtrlCreateButton("Coбрать все Подогревы", 210, 340, 170, 20)
$sigaret = GUICtrlCreateInput('', 10, 194, 80, 15, BitOR($ES_READONLY, $ES_CENTER))
$energy = GUICtrlCreateInput('', 10, 218, 80, 15, BitOR($ES_READONLY, $ES_CENTER))
$rating = GUICtrlCreateInput('', 10, 243, 80, 15, BitOR($ES_READONLY, $ES_CENTER))
$diamond = GUICtrlCreateInput('', 10, 267, 80, 15, BitOR($ES_READONLY, $ES_CENTER))
$prib1 = GUICtrlCreateInput('', 10, 355, 33, 15, BitOR($ES_READONLY, $ES_CENTER))
$prib2 = GUICtrlCreateInput('', 67, 355, 33, 15, BitOR($ES_READONLY, $ES_CENTER))
$prib3 = GUICtrlCreateInput('', 123, 355, 33, 15, BitOR($ES_READONLY, $ES_CENTER))
$money = GUICtrlCreateButton('Получить', 50, 165, 100, 25, $BS_BITMAP)
GUICtrlSetImage(-1,@ScriptDir &"\extra\pol.bmp",0)
GUICtrlSetTip($money,"Показывает инфу о Сигаретах,Энергии и т.д.")
GUICtrlSetCursor(-1, 0)
$sUser = InputBox('ID пользователя', 'Введите ID пользователя', '572929**', '', 360, 120)
$Auth = InputBox('Auth пользователя', 'Введите Auth пользователя', 'f91bca177f94e848e4d763332fbfd***', '', 360, 120)
GuiCtrlCreateTab(200, 0, 200, 260)
GuiCtrlCreateTabItem("Бутырка")
GUICtrlCreatePic(@ScriptDir &"\extra\logo1.gif", 200, 21, 200, 360,$SS_BITMAP )
GuiCtrlSetState(-0,$GUI_DISABLE)
$b1 = GuiCtrlCreateButton("Задание №1", 210, 50)
$b2 = GuiCtrlCreateButton("Задание №2", 210, 80)
$b3 = GuiCtrlCreateButton("Задание №3", 210, 110)
$b4 = GuiCtrlCreateButton("Задание №4", 210, 140)
$b5 = GuiCtrlCreateButton("Задание №5", 210, 170)
$b6 = GuiCtrlCreateButton("Задание №6", 210, 200)
$b7 = GuiCtrlCreateButton("Задание №7", 210, 230)
GuiCtrlCreateTabItem("Кресты")
GUICtrlCreatePic(@ScriptDir &"\extra\logo2.gif", 200, 21, 200, 360,$SS_BITMAP )
GuiCtrlSetState(-1,$GUI_DISABLE)
$k1 = GuiCtrlCreateButton("Задание №1", 210, 50)
$k2 = GuiCtrlCreateButton("Задание №2", 210, 80)
$k3 = GuiCtrlCreateButton("Задание №3", 210, 110)
$k4 = GuiCtrlCreateButton("Задание №4", 210, 140)
$k5 = GuiCtrlCreateButton("Задание №5", 210, 170)
$k6 = GuiCtrlCreateButton("Задание №6", 210, 200)
$k7 = GuiCtrlCreateButton("Задание №7", 210, 230)
GuiCtrlCreateTabItem("В.Централ")
GUICtrlCreatePic(@ScriptDir &"\extra\logo1.gif", 200, 21, 200, 360,$SS_BITMAP )
GuiCtrlSetState(-1,$GUI_DISABLE)
$v1 = GuiCtrlCreateButton("Задание №1", 210, 50)
$v2 = GuiCtrlCreateButton("Задание №2", 210, 80)
$v3 = GuiCtrlCreateButton("Задание №3", 210, 110)
$v4 = GuiCtrlCreateButton("Задание №4", 210, 140)
$v5 = GuiCtrlCreateButton("Задание №5", 210, 170)
$v6 = GuiCtrlCreateButton("Задание №6", 210, 200)
GuiCtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetTip($v6,"Скоро...")
$v7 = GuiCtrlCreateButton("Задание №7", 210, 230)
GuiCtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetTip($v7,"Скоро...")
GuiCtrlCreateTabItem("")
GUISetState(@SW_SHOW)
TCPStartup()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $money
GUISetState(@SW_DISABLE)
GUICtrlSetData($sigaret & $rating & $diamond & $energy, '')
$sMoney = _My_Func()
If $sMoney <> -1 Then
GUICtrlSetData($sigaret, $sMoney)
Else
GUICtrlSetData($sigaret, 'Ошибка')
EndIf
$sMoney = _My_Func1()
If $sMoney <> -1 Then
GUICtrlSetData($rating, $sMoney)
Else
GUICtrlSetData($rating, 'Ошибка')
EndIf
GUISetState(@SW_ENABLE)
$sMoney = _My_Func2()
If $sMoney <> -1 Then
GUICtrlSetData($diamond, $sMoney)
Else
GUICtrlSetData($diamond, 'Ошибка')
EndIf
$sMoney = _My_Func3()
If $sMoney <> -1 Then
GUICtrlSetData($energy, $sMoney)
Else
GUICtrlSetData($energy, 'Ошибка')
EndIf
$sMoney = _My_Func4()
If $sMoney <> -1 Then
GUICtrlSetData($prib1, $sMoney)
Else
GUICtrlSetData($prib1, 'Ошибка')
EndIf
$sMoney = _My_Func5()
If $sMoney <> -1 Then
GUICtrlSetData($prib2, $sMoney)
Else
GUICtrlSetData($prib2, 'Ошибка')
EndIf
$sMoney = _My_Func6()
If $sMoney <> -1 Then
GUICtrlSetData($prib3, $sMoney)
Else
GUICtrlSetData($prib3, 'Ошибка')
EndIf
GUISetState(@SW_ENABLE)
GUISetState(@SW_ENABLE)
Case $msg = $b1
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&key="& $Auth &"&action%5Ftype=3&method=doCityAction&sig=838d1b18e8010910aee8df39131206b1&user="&$sUser&"&action%5Fid=1"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b2
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "user="&$sUser&"&city=1&sig=5cdf461b8f5c359b4ca715cde7cb3275&action%5Fid=2&key="& $Auth &"&action%5Ftype=3&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b3
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&action%5Fid=3&sig=84b2a05fc1de3218cd6d83e0d2464bca&method=doCityAction&key="& $Auth &"&user="&$sUser&"&action%5Ftype=3"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b4
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&action%5Fid=4&sig=8d465274186e26236d5254a61c59e090&method=doCityAction&key="& $Auth &"&user="&$sUser&"&action%5Ftype=3"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b5
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&sig=66da86540fd2fb4c67a68a52c9a56c39&key="& $Auth &"&action%5Ftype=3&action%5Fid=5&user="&$sUser&"&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b6
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "user="&$sUser&"&city=1&action%5Fid=6&key="& $Auth &"&sig=8822eb384d135df7e93cd2eadbe5d4cc&action%5Ftype=3&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $b7
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&action%5Fid=7&action%5Ftype=3&sig=f645a1f80cd76fe8d5cc2c86745af5a4&key="& $Auth &"&user="&$sUser&"&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k1
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "action%5Ftype=3&method=doCityAction&action%5Fid=1&key="& $Auth &"&sig=5c66cf52daeaec0dc4644c7928e54a4f&city=2&user="&$sUser&""
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k2
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "action%5Ftype=3&method=doCityAction&action%5Fid=2&key="& $Auth &"&sig=94a6c5da1659020a1b9980e8e3929785&city=2&user="&$sUser&""
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k3
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "action%5Ftype=3&method=doCityAction&action%5Fid=3&key="& $Auth &"&sig=e73c45ea0ea474a384da6c6d1b4041a4&city=2&user="&$sUser&""
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k4
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "action%5Ftype=3&method=doCityAction&action%5Fid=4&key="& $Auth &"&sig=13e1599c8adf4c0737442ade663747ec&city=2&user="&$sUser&""
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k5
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=2&user="&$sUser&"&action%5Fid=5&action%5Ftype=3&key="& $Auth &"&sig=ca7b8ce0708b87b98aac59b65d7be77f&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k6
$Host = "109.234.156.250"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=2&user="&$sUser&"&action%5Ftype=3&key="& $Auth &"&action%5Fid=6&sig=6b8864635b1462d3d7ea19db4db75927&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $k7
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "city=1&action%5Fid=7&action%5Ftype=3&sig=f645a1f80cd76fe8d5cc2c86745af5a4&key="& $Auth &"&user="&$sUser&"&method=doCityAction"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v1
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=1069ec0e304758b43442620abc1358d3&action%5Fid=1"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v2
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=7f269e62e22efa131854208f42ef44e1&action%5Fid=2"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v3
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=c777fdc264d9b23d0c2ea9be1bc68fe5&action%5Fid=3"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v4
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=7e7897d923dee2a9102de232382b3d49&action%5Fid=4"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v5
$Host = "109.234.155.196"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=537f770dac1c6f055e64a527e12bf8c2&action%5Fid=5"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v6
$Host = "109.234.156.250"
$File = "/prison/universal.php?doCityAction"
$URL = "http://" & $Host & $File
$PostData = "method=doCityAction&user="&$sUser&"&key="& $Auth &"&city=3&action%5Ftype=3&sig=c777fdc264d9b23d0c2ea9be1bc68fe5&action%5Fid=3"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Задание выполнено")
Case $msg = $v7
Case $msg = $dvor
$Host = "109.234.155.196"
$File = "/prison/universal.php?office"
$URL = "http://" & $Host & $File
$PostData = "sig=a2c4397152d04569f6cd2d1002db7648&key="& $Auth &"&getidea=1&user="&$sUser&"&method=office"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Бот", "Сигареты собранны")
Case $msg = $podogrev
$Host = "109.234.155.196"
$File = "/prison/universal.php?useAllPresents"
$URL = "http://" & $Host & $File
$PostData = "user="&$sUser&"&key="& $Auth &"&sig=3d61df9647e743e02dd8ddc847b00f1f&method=useAllPresents"
$oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", $URL)
$oHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Подогрывы собраны")
Case $msg = $proxod
$oHTTP.Send($PostData)
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
MsgBox(0, "Готово", "Подогрывы собраны")
EndSelect
WEnd
GUIDelete()
Exit
EndFunc ;==>_Main
;~ Иинформация о сигаретах
Func _My_Func()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=5064ea55b0c410563fe3bd4dd23cd5c8&key="& $Auth &"&user="&$sUser&"&method=getInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<money>(\d+)</money>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о энергии
Func _My_Func1()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=5064ea55b0c410563fe3bd4dd23cd5c8&key="& $Auth &"&user="&$sUser&"&method=getInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<energy>(\d+)</energy>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о рублях
Func _My_Func2()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=5064ea55b0c410563fe3bd4dd23cd5c8&key="& $Auth &"&user="&$sUser&"&method=getInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<diamond>(\d+)</diamond>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о рейтинга
Func _My_Func3()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=5064ea55b0c410563fe3bd4dd23cd5c8&key="& $Auth &"&user="&$sUser&"&method=getInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<rating>(\d+)</rating>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о сборе сигарет в проходной
Func _My_Func4()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getAllBuildingsRewardsInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=f6b93aab695ecb7332184064e3058760&user="&$sUser&"&key="& $Auth &"&method=getAllBuildingsRewardsInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<money>(\d+)</money>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о сборе рейтинга в проходной
Func _My_Func5()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getAllBuildingsRewardsInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=f6b93aab695ecb7332184064e3058760&user="&$sUser&"&key="& $Auth &"&method=getAllBuildingsRewardsInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<rating>(\d+)</rating>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
;~ Иинформация о сборе Уважение в проходной
Func _My_Func6()
Local $Response, $sMessage
Local $Host = '109.234.155.196'
If Not Ping($Host) Then Return -1
Local $File = '/prison/universal.php?getAllBuildingsRewardsInfo'
Local $URL = 'http://' & $Host & $File
Local $PostData = "sig=f6b93aab695ecb7332184064e3058760&user="&$sUser&"&key="& $Auth &"&method=getAllBuildingsRewardsInfo"
Local $oHTTP = ObjCreate('WinHttp.WinHttpRequest.5.1')
$oHTTP.Open('POST', $URL)
$oHTTP.setTimeouts(5000, 5000, 10000, 10000)
$oHTTP.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
Execute('$oHTTP.Send($PostData)')
If (@error) Or ($oHTTP.Status <> 200) Then
Return -1
Else
$oHTTP.WaitForResponse
$Response = $oHTTP.ResponseText
If Not $Response Then Return -1
EndIf
$sMessage = StringRegExpReplace($Response, '(?s).*?<love>(\d+)</love>?.*', '\1')
If Not $sMessage Then Return -1
Return $sMessage
EndFunc ;==>_My_Func
Вот еще выложил исходники) буду рад помощи