Halli Hallo, alle AutoIt Scripter
Ein Freund und Ich haben für ein bevorstehendes "Tournament", für das ComputerSpiel Star Wars Battlefront1,
Ein sogenanntes AntiCheat Programm, programmiert.
Es ist nichts besonderes, aber es reicht aus, um den allgemein beliebten Mini-Map-Hack (Gegner auf der Minikarte sehen) Etc. zu verhindern.
Das Programm schiesst mittels der Ingame Funktion "P" einen Screenshot.
Ich habe das ganze jetzt noch ein wenig 'benutzerfreundlicher' gestaltet.
Hier einmal das Script, darunter steht dann meine Frage:
[autoit]OPT("TrayMenuMode", 3)Opt("TrayOnEventMode", 1)MsgBox(0, "Battlefront Anti-Cheat [BETA]", "Let this program running until the match is finished." & @LF & "" & @LF & "!IMPORTANT! Make sure your hotkey for screenshot in battlefront is set to p" & @LF & "" & @LF & "Close BAC after your match by pressing ctrl+1 (only on desktop, NOT INGAME!).")HotKeySet("^1", "EXIT1")$ABOUTITEM = TrayCreateItem("About")TrayItemSetOnEvent(-1, "About1")$ABOUTITEM = TrayCreateItem("How to use")TrayItemSetOnEvent(-1, "HowToUse1")$EXITITEM = TrayCreateItem("Exit")TrayItemSetOnEvent(-1, "Exit1");----------------------------------Func ABOUT1() MsgBox(0, "Battlefront Anti-Cheat [BETA] - About", "designed for Battlefront eSports" & @LF & "" & @LF & "centuryclan.eu/battlefront-eSports.htm" & @LF & "" & @LF & "scripted by DEAGLE" & @LF & "" & @LF & "This is only a beta version!")EndFunc;-----------------------------------------------Func HOWTOUSE1() MsgBox(0, "Battlefront Anti-Cheat [BETA] - How to use", "!IMPORTANT! Make sure your hotkey for screenshot in battlefront is set to p" & @LF & "" & @LF & "How to use:" & @LF & "1. start Battlefront, connect to server" & @LF & "2. When the match is about to begin, start this program" & @LF & "3. When the match is finished, close the program by pressing ctrl+1 (or use the Exit button) !NOTE! you can not close the program via ctrl+1 if you're ingame! Close the game first!" & @LF & "" & @LF & "You only need to do the following steps if u won the match!" & @LF & "" & @LF & "4. Go into your game directory: Star Wars Battlefront\GameData\ScreenShots" & @LF & "5. zip all screenshots from the match using winzip, winrar or 7zip" & @LF & "6. Upload the zip file to >>webspace coming soon<<" & @LF & "7. Post the link to your uploaded file at the matchpage")EndFunc;-----------------------------------------------If ProcessExists("Battlefront.exe") ThenWhile 1 Sleep(30000) Send("p") Sleep(90000) Send("p") Sleep(120000) Send("p") Sleep(90000) Send("p") Sleep(60000) Send("p") Sleep(90000) Send("p") Sleep(120000) Send("p") Sleep(60000) Send("p") Sleep(90000) Send("p") Sleep(120000) Send("p") Sleep(90000) Send("p") Sleep(60000) Send("p") Sleep(30000) Send("p") Sleep(60000) Send("p") Sleep(90000) Send("p") Sleep(120000) Send("p") Sleep(90000) Send("p") Sleep(60000) Send("p") Sleep(30000) Send("p") Sleep(60000) Send("p") Sleep(90000) Send("p") Sleep(120000) Send("p") Sleep(90000) Send("p") Sleep(60000) Send("p") Sleep(30000) Send("p")WEndElse ;Hier fängt das ganze an ----------------------------------------------------------- $notingame=MsgBox(3, "Bf_eSports AntiCheat [Beta]", "You are not Ingame (anymore), should the program go on?")EndIf If $notingame = 7 Then ExitEndIfIf $notingame = 6 Then MsgBox(1, "Bf_eSports AntiCheat [Beta]", "Battlefront will start now") Run("Battlefront.exe") EndIf;-------------------Bis hier---------------------------------Func EXIT1() ExitEndFunc
[/autoit]Okay. Als erstes, es tut mir EXTREM! leid, das das so unübersichtlich ist. Aber das sind ja nur die texte, die dann in den MessageBoxen stehen.
So, (im Quelltext markiert.)
Bei der einen Funktion, habe ich ein Problem,
Alles Funktioniert einwandfrei, ausser das da unten:
[autoit]Else ;Hier fängt das ganze an ----------------------------------------------------------- $notingame=MsgBox(3, "Bf_eSports AntiCheat [Beta]", "You are not Ingame (anymore), should the program go on?")EndIf If $notingame = 7 Then ExitEndIfIf $notingame = 6 Then MsgBox(1, "Bf_eSports AntiCheat [Beta]", "Battlefront will start now") Run("Battlefront.exe") EndIf;-------------------Bis hier---------------------------------
[/autoit]Hier, soll gesagt werden, das der Prozess NICHT exestiert. Das geht ja auch. Allerdings möchte ich dann, das er fragt, ob dann Battlefront noch gestartet werden soll...
Das Problem ist jetzt, dass er, wenn ich bei der letzten MessageBox vo er sagt: "Battlefront will start now" , auf 'JA' klicke, das er zwar das Game startet, aber dann das AntiCheat programm einfach beendet.
Hier dann die Frage wie kann ich es scripten, dass wenn das Programm Battlefront gestartet hat, dass dann quasi das Script von "vorne" beginnt. Also das er alles ab dem Teil:
[autoit]If ProcessExists("Battlefront.exe") ThenWhile 1 Sleep(30000) Send("p")
[/autoit].........................
Weitermacht???!?!!
Vielen Dank schonmal, und ich hoffe, dass ihr alle mein Problem verstanden habt
Ach, Entschuldigung, ich sehe grade, dass das total komisch angezeigt wird, ich packe das nochmal in Spoiler:
Spoiler anzeigen
OPT("TrayMenuMode", 3)
Opt("TrayOnEventMode", 1)
MsgBox(0, "Battlefront Anti-Cheat [BETA]", "Let this program running until the match is finished." & @LF & "" & @LF & "!IMPORTANT! Make sure your hotkey for screenshot in battlefront is set to p" & @LF & "" & @LF & "Close BAC after your match by pressing ctrl+1 (only on desktop, NOT INGAME!).")
HotKeySet("^1", "EXIT1")
$ABOUTITEM = TrayCreateItem("About")
TrayItemSetOnEvent(-1, "About1")
$ABOUTITEM = TrayCreateItem("How to use")
TrayItemSetOnEvent(-1, "HowToUse1")
$EXITITEM = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1, "Exit1")
;----------------------------------
Func ABOUT1()
MsgBox(0, "Battlefront Anti-Cheat [BETA] - About", "designed for Battlefront eSports" & @LF & "" & @LF & "centuryclan.eu/battlefront-eSports.htm" & @LF & "" & @LF & "scripted by DEAGLE" & @LF & "" & @LF & "This is only a beta version!")
EndFunc
;-----------------------------------------------
Func HOWTOUSE1()
MsgBox(0, "Battlefront Anti-Cheat [BETA] - How to use", "!IMPORTANT! Make sure your hotkey for screenshot in battlefront is set to p" & @LF & "" & @LF & "How to use:" & @LF & "1. start Battlefront, connect to server" & @LF & "2. When the match is about to begin, start this program" & @LF & "3. When the match is finished, close the program by pressing ctrl+1 (or use the Exit button) !NOTE! you can not close the program via ctrl+1 if you're ingame! Close the game first!" & @LF & "" & @LF & "You only need to do the following steps if u won the match!" & @LF & "" & @LF & "4. Go into your game directory: Star Wars Battlefront\GameData\ScreenShots" & @LF & "5. zip all screenshots from the match using winzip, winrar or 7zip" & @LF & "6. Upload the zip file to >>webspace coming soon<<" & @LF & "7. Post the link to your uploaded file at the matchpage")
EndFunc
;-----------------------------------------------
If ProcessExists("Battlefront.exe") Then
While 1
Sleep(30000)
Send("p")
Sleep(90000)
Send("p")
Sleep(120000)
Send("p")
Sleep(90000)
Send("p")
Sleep(60000)
Send("p")
Sleep(90000)
Send("p")
Sleep(120000)
Send("p")
Sleep(60000)
Send("p")
Sleep(90000)
Send("p")
Sleep(120000)
Send("p")
Sleep(90000)
Send("p")
Sleep(60000)
Send("p")
Sleep(30000)
Send("p")
Sleep(60000)
Send("p")
Sleep(90000)
Send("p")
Sleep(120000)
Send("p")
Sleep(90000)
Send("p")
Sleep(60000)
Send("p")
Sleep(30000)
Send("p")
Sleep(60000)
Send("p")
Sleep(90000)
Send("p")
Sleep(120000)
Send("p")
Sleep(90000)
Send("p")
Sleep(60000)
Send("p")
Sleep(30000)
Send("p")
WEnd
Else
$notingame=MsgBox(3, "Bf_eSports AntiCheat [Beta]", "You are not Ingame (anymore), should the program go on?")
EndIf
If $notingame = 7 Then
Exit
EndIf
If $notingame = 6 Then
MsgBox(1, "Bf_eSports AntiCheat [Beta]", "Battlefront will start now")
Run("Battlefront.exe")
EndIf
;------------------------------------------------------------------------------------
Func EXIT1()
Exit
EndFunc
Hier dann das nächste:
Spoiler anzeigen
Else
$notingame=MsgBox(3, "Bf_eSports AntiCheat [Beta]", "You are not Ingame (anymore), should the program go on?")
EndIf
If $notingame = 7 Then
Exit
EndIf
If $notingame = 6 Then
MsgBox(1, "Bf_eSports AntiCheat [Beta]", "Battlefront will start now")
Run("Battlefront.exe")
EndIf
Spoiler anzeigen
If ProcessExists("Battlefront.exe") Then
While 1
Sleep(30000)
Send("p")
............