Hi,
ich hab hier mal ein für mich etwas größeres projekt angefangen...
ich möchte für das Spiel Diablo II einen Spammbot machen der immer in verschiedene Game-Sessions reingeht und einen Text absendet.
1. Wie kann ich $FormAdd schließen ohne gleich das ganze srcipt zu schließen
2. Wie kann ich machen, dass bei $listview ein neues Item angelegt wird das den Namen hat von $input1add hat.
3. Wie funktioniert das mit dem Global?(In dem script werden z.B:
if GUICtrlRead($radio1) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 203, 148)
sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 203, 148)
nicht ausgeführt)
4. Hat wer verbesserung Vorschläge?
ich hab hier mal ein für mich etwas größeres projekt angefangen...
ich möchte für das Spiel Diablo II einen Spammbot machen der immer in verschiedene Game-Sessions reingeht und einen Text absendet.
PHP Code:
if _Singleton("Diaspambot.exe",1) = 0 Then ;aktuell halten
msgbox(16, "Runtime Error", "Die exe wird bereits ausgeführt!")
exit
endif
if ProcessExists("Game.exe") Then
Msgbox(0,"Warnung","Der Process 'Game.exe' existiert bereits und muss beendet werden!" & @CRLF & _
"" & @CRLF & _
"Diablo II wird automatisch beendet!")
winclose("Diablo II")
if not @error Then
winWaitClose("Diablo II")
endif
EndIf
global $Input1Add, $Input2Add, $Input3Add, $listview, $radio1, $radio2, $radio3, $radio4, $radio5, $radio6, $radio7, $radio8
#RequireAdmin
#include <misc.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\ludder.luca\desktop\diaform.kxf
$Form1 = GUICreate("DBot by Ludder", 581, 428, -1, -1)
$Button1 = GUICtrlCreateButton("Run", 176, 192, 59, 25)
$Tab1 = GUICtrlCreateTab(8, 248, 561, 129)
$TabSheet1 = GUICtrlCreateTabItem("Common Log")
GUICtrlCreateTabItem("")
$Button2 = GUICtrlCreateButton("Stop", 240, 192, 59, 25)
$Button3 = GUICtrlCreateButton("Add", 304, 192, 59, 25)
$Button4 = GUICtrlCreateButton("Edit", 368, 192, 59, 25)
$Button5 = GUICtrlCreateButton("Remove", 432, 192, 59, 25)
$Button6 = GUICtrlCreateButton("Save", 496, 192, 59, 25)
$Group1 = GUICtrlCreateGroup("Profile", 16, 16, 553, 217)
$listview = GUICtrlCreateListView("Profile Names| Runs | Restarts | Status", 24, 40, 529, 136)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button7 = GUICtrlCreateButton("Exit", 496, 384, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $button2
winclose("Diablo II" ,"")
case $Button3
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\ludder.luca\desktop\formadd.kxf
$FormAdd = GUICreate("Profile Settings", 494, 349, -1, -1)
$Label1Add = GUICtrlCreateLabel("Profile Name:", 12, 12, 67, 17)
GUICtrlSetFont(-1, 9, 400, 0, "MS Sans Serif")
$Input1Add = GUICtrlCreateInput("", 88, 8, 193, 21)
$Group1 = GUICtrlCreateGroup("Loader Settings", 16, 40, 465, 113)
$Label1Add = GUICtrlCreateLabel("Path:", 40, 85, 26, 17)
$Input2Add = GUICtrlCreateInput("", 72, 80, 265, 21)
$Button1Add = GUICtrlCreateButton("...", 344, 80, 51, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Game Settings", 16, 168, 465, 121)
$Label1Add = GUICtrlCreateLabel("Account Name:", 24, 195, 75, 17)
GUICtrlSetFont(-1, 9, 400, 0, "MS Sans Serif")
$Input3Add = GUICtrlCreateInput("", 112, 192, 121, 21)
$Label1 = GUICtrlCreateLabel("Position", 248, 192, 41, 17)
$Radio1 = GUICtrlCreateRadio("1", 304, 192, 25, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("2", 336, 192, 25, 17)
$Radio3 = GUICtrlCreateRadio("3", 304, 216, 25, 17)
$Radio4 = GUICtrlCreateRadio("4", 336, 216, 25, 17)
$Radio5 = GUICtrlCreateRadio("5", 304, 240, 25, 17)
$Radio6 = GUICtrlCreateRadio("6", 336, 240, 25, 17)
$Radio7 = GUICtrlCreateRadio("7", 304, 264, 25, 17)
$Radio8 = GUICtrlCreateRadio("8", 336, 264, 25, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$OKAdd = GUICtrlCreateButton("OK", 400, 304, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
exit
case $OKAdd
GUISetState($FormAdd, @sw_hide)
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Path", guictrlread($Input2Add))
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Acc", guictrlread($Input3Add))
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Profil", guictrlread($Input1Add))
if GUICtrlRead($radio1) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio1))
ElseIf GUICtrlRead($radio2) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio2))
ElseIf GUICtrlRead($radio3) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio3))
ElseIf GUICtrlRead($radio4) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio4))
ElseIf GUICtrlRead($radio5) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio5))
ElseIf GUICtrlRead($radio6) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio6))
ElseIf GUICtrlRead($radio7) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio7))
ElseIf GUICtrlRead($radio8) = $GUI_CHECKED then
IniWrite(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Pos", guictrlread($Radio8))
$item1 = GUICtrlCreateListViewItem(guictrlread($input1add)&"|"&"||", $listview)
endif
EndSwitch
WEnd
case $button1
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form22 = GUICreate("Password Dialog", 251, 93, -1, -1)
$PasswordEdit = GUICtrlCreateInput("", 8, 32, 233, 21)
$ButtonOk = GUICtrlCreateButton("OK", 86, 64, 75, 25, $BS_NOTIFY)
$ButtonCancel = GUICtrlCreateButton("Cancel", 167, 64, 75, 25, $BS_NOTIFY)
$EnterPassLabel = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $ButtonOK
GUISetState(@sw_hide, "Password Dialog")
GUISetState(@SW_MINIMIZE, "DBot by Ludder")
Opt("SendKeyDelay", 20)
Run(guictrlread($input2add))
WinSetState("Diablo II", "", @sw_lock)
WinWaitActive("Diablo II")
sleep(5000)
ControlClick("Diablo II", "", "", "Left", 1, 479, 335)
sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 479, 335)
sleep(500)
ControlSend("Diablo II", "", "", Iniread(@WindowsDir&"\DBot.ini", guictrlread($input1add), "Path", guictrlread($Input2Add)))
sleep(500)
ControlClick("Diablo II", "", "", "Left", 1, 483, 394)
sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 483, 394)
sleep(500)
ControlSend("Diablo II", "", "", guictrlread($passwordEdit))
sleep(300)
ControlClick("Diablo II", "", "", "Left", 1, 401, 466)
sleep(3500)
if GUICtrlRead($radio1) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 203, 148) ;checken
sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 203, 148) ;checken
ElseIf GUICtrlRead($radio2) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 484, 139) ;checken
Sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 484, 139);checken
ElseIf gUICtrlRead($radio3) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 218, 243);checken
Sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 218, 243);checken
ElseIf gUICtrlRead($radio4) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 515, 239);checken
Sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 515, 239);checken
;ElseIf gUICtrlRead($radio5) = $GUI_CHECKED then
;ControlClick("Diablo II", "", "", "Left", 1, 515, 239)
;Sleep(100)
;ControlClick("Diablo II", "", "", "Left", 1, 515, 239);
;ElseIf gUICtrlRead($radio6) = $GUI_CHECKED then
;ControlClick("Diablo II", "", "", "Left", 1, 515, 239)
;Sleep(100)
;ControlClick("Diablo II", "", "", "Left", 1, 515, 239);
endif
case $buttoncancel
exit
EndSwitch
WEnd
EndSwitch
WEnd
func _exit()
exit
endfunc
2. Wie kann ich machen, dass bei $listview ein neues Item angelegt wird das den Namen hat von $input1add hat.
3. Wie funktioniert das mit dem Global?(In dem script werden z.B:
if GUICtrlRead($radio1) = $GUI_CHECKED then
ControlClick("Diablo II", "", "", "Left", 1, 203, 148)
sleep(100)
ControlClick("Diablo II", "", "", "Left", 1, 203, 148)
nicht ausgeführt)
4. Hat wer verbesserung Vorschläge?