Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie] Pierwszy Bot


Rekomendowane odpowiedzi

Opublikowano

moze zrob checkboxa na timera?

 

while 1
$x=guictrlread($checkbox)=1 then timer()
wend


func timer()
twoj timer
endfunc 

 

i bedzie dzialac tylko jesli bedzie zaznaczony:)

Do
$wiek+=1
Until ŻycieGetMsg() = -3

zbieram +

Opublikowano

Niestety mi nie działa. Daję kod. Nie wiem co robię źle.

 

#include <FF.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
Local $Checkbox[30]
Local $c[30]
$Form1 = GUICreate("Autologowanie", 177, 98, 380, 250)
$Label1 = GUICtrlCreateLabel("Login", 7, 12, 30, 17)
$Label2 = GUICtrlCreateLabel("Hasło", 6, 38, 33, 17)
$login_input = GUICtrlCreateInput("", 50, 9, 121, 21)
$haslo_input = GUICtrlCreateInput("", 50, 33, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$loguj = GUICtrlCreateButton("Zaloguj się", 56, 64, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW, $Form1)
$Form2 = GUICreate("Ustawienia - Uliczne-Wyscigi.pl", 512, 215, 192, 124)
$Label3 = GUICtrlCreateLabel("Wybierz stawkę", 16, 24, 79, 17)
$Label4 = GUICtrlCreateLabel("Wybierz ślimaka", 16, 56, 80, 17)
$Combo1 = GUICtrlCreateCombo("", 112, 24, 145, 25)
GUICtrlSetData(-1, "1000|2000|5000|10000|50000|100000|200000|500000|1000000|5000000", "1000")
$Combo2 = GUICtrlCreateCombo("1", 112, 56, 145, 25)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8")
$Label5 = GUICtrlCreateLabel("Lotek", 16, 104, 31, 17)
$Checkbox[0] = GUICtrlCreateCheckbox("1", 112, 104, 25, 17)
$Checkbox[1] = GUICtrlCreateCheckbox("2", 152, 104, 25, 17)
$Checkbox[2] = GUICtrlCreateCheckbox("3", 192, 104, 25, 17)
$Checkbox[3] = GUICtrlCreateCheckbox("4", 232, 104, 25, 17)
$Checkbox[4] = GUICtrlCreateCheckbox("5", 272, 104, 25, 17)
$Checkbox[5] = GUICtrlCreateCheckbox("6", 312, 104, 25, 17)
$Checkbox[6] = GUICtrlCreateCheckbox("7", 352, 104, 25, 17)
$Checkbox[7] = GUICtrlCreateCheckbox("8", 392, 104, 25, 17)
$Checkbox[8] = GUICtrlCreateCheckbox("9", 432, 104, 25, 17)
$Checkbox[9] = GUICtrlCreateCheckbox("10", 472, 104, 33, 17)
$Checkbox[10] = GUICtrlCreateCheckbox("11", 112, 128, 33, 17)
$Checkbox[11] = GUICtrlCreateCheckbox("12", 152, 128, 33, 17)
$Checkbox[12] = GUICtrlCreateCheckbox("13", 192, 128, 33, 17)
$Checkbox[13] = GUICtrlCreateCheckbox("14", 232, 128, 33, 17)
$Checkbox[14] = GUICtrlCreateCheckbox("15", 272, 128, 33, 17)
$Checkbox[15] = GUICtrlCreateCheckbox("16", 312, 128, 33, 17)
$Checkbox[16] = GUICtrlCreateCheckbox("17", 352, 128, 33, 17)
$Checkbox[17] = GUICtrlCreateCheckbox("18", 392, 128, 33, 17)
$Checkbox[18] = GUICtrlCreateCheckbox("19", 432, 128, 33, 17)
$Checkbox[19] = GUICtrlCreateCheckbox("20", 472, 128, 33, 17)
$Checkbox[20] = GUICtrlCreateCheckbox("21", 112, 152, 33, 17)
$Checkbox[21] = GUICtrlCreateCheckbox("22", 152, 152, 33, 17)
$Checkbox[22] = GUICtrlCreateCheckbox("23", 192, 152, 33, 17)
$Checkbox[23] = GUICtrlCreateCheckbox("24", 232, 152, 33, 17)
$Checkbox[24] = GUICtrlCreateCheckbox("25", 272, 152, 33, 17)
$Checkbox[25] = GUICtrlCreateCheckbox("26", 312, 152, 33, 17)
$Checkbox[26] = GUICtrlCreateCheckbox("27", 352, 152, 33, 17)
$Checkbox[27] = GUICtrlCreateCheckbox("28", 392, 152, 33, 17)
$Checkbox[28] = GUICtrlCreateCheckbox("29", 432, 152, 33, 17)
$Checkbox[29] = GUICtrlCreateCheckbox("30", 472, 152, 33, 17)
$legenda = GUICtrlCreateButton("Info o stawkach", 288, 40, 91, 25, $WS_GROUP)
$uruchom = GUICtrlCreateButton("Uruchom", 175, 176, 75, 25, $WS_GROUP)
$wyloguj = GUICtrlCreateButton("Wyloguj się", 261, 176, 75, 25, $WS_GROUP)
;$uruchom = GUICtrlCreateButton("Uruchom", 129, 176, 75, 25, $WS_GROUP)
;$wyloguj = GUICtrlCreateButton("Wyloguj się", 215, 176, 75, 25, $WS_GROUP)
;$stopbot = GUICtrlCreateButton("Przerwij pracę", 306, 176, 75, 25, $WS_GROUP)

$Form3 = GUICreate("Legenda", 154, 181, 204, 186)
$Label11 = GUICtrlCreateLabel("Ślimak 8", 16, 128, 44, 17)
$Label12 = GUICtrlCreateLabel("Ślimak 4", 16, 64, 41, 17)
$Label13 = GUICtrlCreateLabel("Ślimak 2", 16, 32, 44, 17)
$Label14 = GUICtrlCreateLabel("Stawka: 1:1,5", 80, 16, 70, 17)
$Label15 = GUICtrlCreateLabel("Ślimak 5", 16, 80, 44, 17)
$Label16 = GUICtrlCreateLabel("Ślimak 7", 16, 112, 44, 17)
$Label17 = GUICtrlCreateLabel("Ślimak 6", 16, 96, 44, 17)
$Label18 = GUICtrlCreateLabel("Stawka: 1:1,8", 80, 32, 70, 17)
$Label19 = GUICtrlCreateLabel("Stawka: 1:3,5", 80, 80, 70, 17)
$Label10 = GUICtrlCreateLabel("Stawka: 1:4", 80, 96, 61, 17)
$Label111 = GUICtrlCreateLabel("Stawka: 1:8", 80, 128, 61, 17)
$Label112 = GUICtrlCreateLabel("Stawka: 1:6", 80, 112, 61, 17)
$Label113 = GUICtrlCreateLabel("Ślimak 1", 16, 16, 44, 17)
$Label114 = GUICtrlCreateLabel("Stawka: 1:2,3", 80, 48, 70, 17)
$Label115 = GUICtrlCreateLabel("Ślimak 3", 16, 48, 44, 17)
$Label116 = GUICtrlCreateLabel("Stawka: 1:3", 80, 64, 61, 17)
$zamknij = GUICtrlCreateButton("Zamknij", 39, 152, 75, 25, $WS_GROUP)

$Form4 = GUICreate("Bot Uliczne-Wyscigi.pl", 232, 45, 331, 224)
$stop = GUICtrlCreateCheckbox("Gdy zaznaczone, bot działa", 39, 14, 153, 17)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case $loguj
		login()
		GUISetState(@SW_HIDE, $Form1)
		GUISetState(@SW_SHOW, $Form2)
	Case $legenda
		GUISetState(@SW_SHOW, $Form3)
	Case $zamknij
		GUISetState(@SW_HIDE, $Form3)
	Case $wyloguj
		_FFOpenUrl("http://uliczne-wyscigi.pl/wyloguj.php")
		_FFDisConnect()
		Exit
	Case $uruchom
		GUISetState(@SW_HIDE, $Form2)
		GUISetState(@SW_SHOW, $Form4)
		$stop = 1
		$f = 0
		While 1
		If $stop = 1 Then
			While 1
				sleep(1000)
				$f = $f + 1
				For $u = 0 To 3600 Step 300
					If $f=$u Then
					;MsgBox(0, "slimak", "slimak")
					slimak()
				EndIf
			Next
			If $f = 3600 Then
			lotto()
			;MsgBox(0, "lotto", "lotto")
			$f = 0
			EndIF
		WEnd
	Else
		GUISetState(@SW_HIDE, $Form4)
		GUISetState(@SW_SHOW, $Form2)
	EndIf
WEnd
EndSwitch
WEnd
Func login()
If _FFConnect() Then
	_FFTabAdd("http://uliczne-wyscigi.pl")
	$login = GUICtrlRead($login_input)
	$password = GuiCtrlRead($haslo_input)
	$username = _FFObjGet("login", "name")
	_FFObj($username, "value", $login)
	$pass = _FFObjget("pass", "name")
	_FFObj($pass, "value", $password)
	_FFFormSubmit("logowanie", "name")
Else
	_FFStart("http://uliczne-wyscigi.pl")
EndIf
EndFunc
Func lotto()
_FFOpenUrl("http://uliczne-wyscigi.pl/lotek.php")
For $h = 0 To 29
	$c[$h] = $h
	If $c[$h] = $h Then
	$c[$h] = GUICtrlRead($Checkbox[$h])
EndIf
Next
For $i = 0 To 29
	$z = $i + 1
If $c[$i] = 1 Then
	_FFFormCheckBox($z, True, 0, "value", "lotekk", "name")
EndIf
Next
_FFFormSubmit("lotekk", "name")
EndFunc
Func slimak()
$stawka = GUICtrlRead($Combo1)
$nr = GUICtrlRead($Combo2)
;MsgBox(0, "bum", $stawka & $nr)
_FFOpenUrl("http://uliczne-wyscigi.pl/slimak.php")
_FFFormOptionSelect("siano", "name", $stawka, "text", "start", "name")
_FFFormOptionSelect("nrslimaka", "name", $nr, "text", "start", "name")
_FFFormSubmit("start", "name")
EndFunc

 

b_560_95_1.png

b_560x95.png

Opublikowano

to moze drob button po nacisnieciu ktorego $f=np10 i jak f=10 to spi?:P

Do
$wiek+=1
Until ŻycieGetMsg() = -3

zbieram +

Opublikowano

Niestety nic z tego. Nie działa.

 

#include <FF.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
Local $Checkbox[30]
Local $c[30]
$Form1 = GUICreate("Autologowanie", 177, 98, 380, 250)
$Label1 = GUICtrlCreateLabel("Login", 7, 12, 30, 17)
$Label2 = GUICtrlCreateLabel("Hasło", 6, 38, 33, 17)
$login_input = GUICtrlCreateInput("", 50, 9, 121, 21)
$haslo_input = GUICtrlCreateInput("", 50, 33, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$loguj = GUICtrlCreateButton("Zaloguj się", 56, 64, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW, $Form1)
$Form2 = GUICreate("Ustawienia - Uliczne-Wyscigi.pl", 512, 215, 192, 124)
$Label3 = GUICtrlCreateLabel("Wybierz stawkę", 16, 24, 79, 17)
$Label4 = GUICtrlCreateLabel("Wybierz ślimaka", 16, 56, 80, 17)
$Combo1 = GUICtrlCreateCombo("", 112, 24, 145, 25)
GUICtrlSetData(-1, "1000|2000|5000|10000|50000|100000|200000|500000|1000000|5000000", "1000")
$Combo2 = GUICtrlCreateCombo("1", 112, 56, 145, 25)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8")
$Label5 = GUICtrlCreateLabel("Lotek", 16, 104, 31, 17)
$Checkbox[0] = GUICtrlCreateCheckbox("1", 112, 104, 25, 17)
$Checkbox[1] = GUICtrlCreateCheckbox("2", 152, 104, 25, 17)
$Checkbox[2] = GUICtrlCreateCheckbox("3", 192, 104, 25, 17)
$Checkbox[3] = GUICtrlCreateCheckbox("4", 232, 104, 25, 17)
$Checkbox[4] = GUICtrlCreateCheckbox("5", 272, 104, 25, 17)
$Checkbox[5] = GUICtrlCreateCheckbox("6", 312, 104, 25, 17)
$Checkbox[6] = GUICtrlCreateCheckbox("7", 352, 104, 25, 17)
$Checkbox[7] = GUICtrlCreateCheckbox("8", 392, 104, 25, 17)
$Checkbox[8] = GUICtrlCreateCheckbox("9", 432, 104, 25, 17)
$Checkbox[9] = GUICtrlCreateCheckbox("10", 472, 104, 33, 17)
$Checkbox[10] = GUICtrlCreateCheckbox("11", 112, 128, 33, 17)
$Checkbox[11] = GUICtrlCreateCheckbox("12", 152, 128, 33, 17)
$Checkbox[12] = GUICtrlCreateCheckbox("13", 192, 128, 33, 17)
$Checkbox[13] = GUICtrlCreateCheckbox("14", 232, 128, 33, 17)
$Checkbox[14] = GUICtrlCreateCheckbox("15", 272, 128, 33, 17)
$Checkbox[15] = GUICtrlCreateCheckbox("16", 312, 128, 33, 17)
$Checkbox[16] = GUICtrlCreateCheckbox("17", 352, 128, 33, 17)
$Checkbox[17] = GUICtrlCreateCheckbox("18", 392, 128, 33, 17)
$Checkbox[18] = GUICtrlCreateCheckbox("19", 432, 128, 33, 17)
$Checkbox[19] = GUICtrlCreateCheckbox("20", 472, 128, 33, 17)
$Checkbox[20] = GUICtrlCreateCheckbox("21", 112, 152, 33, 17)
$Checkbox[21] = GUICtrlCreateCheckbox("22", 152, 152, 33, 17)
$Checkbox[22] = GUICtrlCreateCheckbox("23", 192, 152, 33, 17)
$Checkbox[23] = GUICtrlCreateCheckbox("24", 232, 152, 33, 17)
$Checkbox[24] = GUICtrlCreateCheckbox("25", 272, 152, 33, 17)
$Checkbox[25] = GUICtrlCreateCheckbox("26", 312, 152, 33, 17)
$Checkbox[26] = GUICtrlCreateCheckbox("27", 352, 152, 33, 17)
$Checkbox[27] = GUICtrlCreateCheckbox("28", 392, 152, 33, 17)
$Checkbox[28] = GUICtrlCreateCheckbox("29", 432, 152, 33, 17)
$Checkbox[29] = GUICtrlCreateCheckbox("30", 472, 152, 33, 17)
$legenda = GUICtrlCreateButton("Info o stawkach", 288, 40, 91, 25, $WS_GROUP)
$uruchom = GUICtrlCreateButton("Uruchom", 175, 176, 75, 25, $WS_GROUP)
$wyloguj = GUICtrlCreateButton("Wyloguj się", 261, 176, 75, 25, $WS_GROUP)
;$uruchom = GUICtrlCreateButton("Uruchom", 129, 176, 75, 25, $WS_GROUP)
;$wyloguj = GUICtrlCreateButton("Wyloguj się", 215, 176, 75, 25, $WS_GROUP)
;$stopbot = GUICtrlCreateButton("Przerwij pracę", 306, 176, 75, 25, $WS_GROUP)

$Form3 = GUICreate("Legenda", 154, 181, 204, 186)
$Label11 = GUICtrlCreateLabel("Ślimak 8", 16, 128, 44, 17)
$Label12 = GUICtrlCreateLabel("Ślimak 4", 16, 64, 41, 17)
$Label13 = GUICtrlCreateLabel("Ślimak 2", 16, 32, 44, 17)
$Label14 = GUICtrlCreateLabel("Stawka: 1:1,5", 80, 16, 70, 17)
$Label15 = GUICtrlCreateLabel("Ślimak 5", 16, 80, 44, 17)
$Label16 = GUICtrlCreateLabel("Ślimak 7", 16, 112, 44, 17)
$Label17 = GUICtrlCreateLabel("Ślimak 6", 16, 96, 44, 17)
$Label18 = GUICtrlCreateLabel("Stawka: 1:1,8", 80, 32, 70, 17)
$Label19 = GUICtrlCreateLabel("Stawka: 1:3,5", 80, 80, 70, 17)
$Label10 = GUICtrlCreateLabel("Stawka: 1:4", 80, 96, 61, 17)
$Label111 = GUICtrlCreateLabel("Stawka: 1:8", 80, 128, 61, 17)
$Label112 = GUICtrlCreateLabel("Stawka: 1:6", 80, 112, 61, 17)
$Label113 = GUICtrlCreateLabel("Ślimak 1", 16, 16, 44, 17)
$Label114 = GUICtrlCreateLabel("Stawka: 1:2,3", 80, 48, 70, 17)
$Label115 = GUICtrlCreateLabel("Ślimak 3", 16, 48, 44, 17)
$Label116 = GUICtrlCreateLabel("Stawka: 1:3", 80, 64, 61, 17)
$zamknij = GUICtrlCreateButton("Zamknij", 39, 152, 75, 25, $WS_GROUP)

$Form4 = GUICreate("Bot Uliczne-Wyscigi.pl", 232, 45, 331, 224)
$stop = GUICtrlCreateButton("Przerwij pracę", 39, 14, 153, 17)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case $loguj
		login()
		GUISetState(@SW_HIDE, $Form1)
		GUISetState(@SW_SHOW, $Form2)
	Case $legenda
		GUISetState(@SW_SHOW, $Form3)
	Case $zamknij
		GUISetState(@SW_HIDE, $Form3)
	Case $wyloguj
		_FFOpenUrl("http://uliczne-wyscigi.pl/wyloguj.php")
		_FFDisConnect()
		Exit
	Case $uruchom
		GUISetState(@SW_HIDE, $Form2)
		GUISetState(@SW_SHOW, $Form4)
		$f = 0
		While 1
			If $stop Then
				ExitLoop
				GUISetState(@SW_HIDE, $Form4)
				GUISetState(@SW_SHOW, $Form2)
			Else
				sleep(1000)
				$f = $f + 1
				For $u = 0 To 3600 Step 300
					If $f=$u Then
						;MsgBox(0, "slimak", "slimak")
						slimak()
					EndIf
				Next
				If $f = 3600 Then
					lotto()
					;MsgBox(0, "lotto", "lotto")
					$f = 0
				EndIF
			EndIf
		WEnd
EndSwitch
WEnd
Func login()
If _FFConnect() Then
	_FFTabAdd("http://uliczne-wyscigi.pl")
	$login = GUICtrlRead($login_input)
	$password = GuiCtrlRead($haslo_input)
	$username = _FFObjGet("login", "name")
	_FFObj($username, "value", $login)
	$pass = _FFObjget("pass", "name")
	_FFObj($pass, "value", $password)
	_FFFormSubmit("logowanie", "name")
Else
	_FFStart("http://uliczne-wyscigi.pl")
EndIf
EndFunc
Func lotto()
_FFOpenUrl("http://uliczne-wyscigi.pl/lotek.php")
For $h = 0 To 29
	$c[$h] = $h
	If $c[$h] = $h Then
	$c[$h] = GUICtrlRead($Checkbox[$h])
EndIf
Next
For $i = 0 To 29
	$z = $i + 1
If $c[$i] = 1 Then
	_FFFormCheckBox($z, True, 0, "value", "lotekk", "name")
EndIf
Next
_FFFormSubmit("lotekk", "name")
EndFunc
Func slimak()
$stawka = GUICtrlRead($Combo1)
$nr = GUICtrlRead($Combo2)
;MsgBox(0, "bum", $stawka & $nr)
_FFOpenUrl("http://uliczne-wyscigi.pl/slimak.php")
_FFFormOptionSelect("siano", "name", $stawka, "text", "start", "name")
_FFFormOptionSelect("nrslimaka", "name", $nr, "text", "start", "name")
_FFFormSubmit("start", "name")
EndFunc

 

b_560_95_1.png

b_560x95.png

Opublikowano

da tylko całkowicie trzeba przebudować strukture i niektóre funkcje w kodzie

If you = stupid then

insert(foot.in.your.ass)

end if

licznik-54-96732-stat.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...