Created
May 22, 2015 19:35
-
-
Save mgoerlich-dev/818096350e6ec04aea45 to your computer and use it in GitHub Desktop.
Cystasy's Pfandbot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="./script.js"></script> | |
| <div id="state"><b>State:</b> Idle</div> | |
| <!-- Login Formular !--> | |
| <form id="login_form" action="http://koeln.pennergame.de/login/check/" method="POST" target="request_window"> | |
| ID: <input type="text" name="username" id="username" value=""> | |
| PW: <input type="password" name="password" id="password" value=""> | |
| <input type="button" value="Login" onClick="login()"> | |
| <input type="button" value="Logout" onClick="javascript:logout()"><br \><br \> | |
| <input type="button" value="Pfandsammeln Start" onClick="javascript:pfandsammeln()"> | |
| <input type="button" value="Pfandsammeln Stop" onClick="javascript:pfandsammeln_cancel()"> | |
| <input type="button" value="Pfandflaschen Bot Starten" onClick="javascript:pfandbot()"> | |
| <input type="button" value="Pfandflaschen Bot Stoppen" onClick="javascript:pfandbot_cancel()"> | |
| </form> | |
| <!---------------------------------------------------------------------------------------!--> | |
| <!-- Logout Formular !--> | |
| <form id="logout_form" action="http://koeln.pennergame.de/logout/" method="POST" target="request_window"> | |
| </form> | |
| <!---------------------------------------------------------------------------------------!--> | |
| <h2>Dev Settings</h2> | |
| <!-- Pfandsammeln Starten Formular !--> | |
| <form id="pfandsammel_form" action="http://koeln.pennergame.de/activities/bottle/" method="POST" target="request_window"> | |
| <b>Pfandsammeln Begin</b><br \> Zeit: <input type="text" name="sammeln" id="sammeln" value="10"> | |
| Konzentrieren: <input type="text" name="konzentrieren" id="konzentrieren" value="1"> | |
| </form> | |
| <!---------------------------------------------------------------------------------------!--> | |
| <!-- Pfandsammeln Stoppen Formular !--> | |
| <form id="pfandsammel_cancel_form" action="http://koeln.pennergame.de/activities/bottle/" method="POST" target="request_window"> | |
| <b>Pfandsammeln Cancel</b><br \> | |
| Type: <input type="text" name="type" id="type" value="1"> | |
| Time: <input type="text" name="time" id="time" value="10"> | |
| Cancel: <input type="text" name="cancel" id="cancel" value="1"> | |
| Submit2: <input type="text" name="Submit2" id="Submit2" value="Abbrechen"> | |
| </form> | |
| <!---------------------------------------------------------------------------------------!--> | |
| <!-- Einkaufswagen leeren Formular !--> | |
| <form id="clearpfand_form" action="http://koeln.pennergame.de/activities/bottle/" method="POST" target="request_window"> | |
| <b>Einkaufwagen leeren</b><br \> | |
| Type: <input type="text" name="type" id="type" value="1"> | |
| Time: <input type="text" name="time" id="time" value=""> | |
| Bottlecollect_pending: <input type="text" name="bottlecollect_pending" id="bottlecollect_pending" value="True"> | |
| Submit2: <input type="text" name="Submit2" id="Submit2" value="Einkaufswagen+ausleeren"> | |
| </form> | |
| <!---------------------------------------------------------------------------------------!--> | |
| <br \> | |
| <br \> | |
| <iframe src="" name="request_window" width="1" height="1" frameBorder="0" onClick="javascript:login()"></iframe><br \> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var interval_bot; | |
| function login() | |
| { | |
| document.getElementById('state').innerHTML="<b>State:</b> Logged in."; | |
| document.getElementById('login_form').submit(); | |
| } | |
| function logout() | |
| { | |
| document.getElementById('state').innerHTML="<b>State:</b> Logged out."; | |
| document.getElementById('logout_form').submit(); | |
| } | |
| function pfandsammeln() | |
| { | |
| document.getElementById('state').innerHTML="<b>State:</b> Sammle für "+document.getElementById('sammeln').value+" Minuten Pfandflaschen.."; | |
| document.getElementById('pfandsammel_form').submit(); | |
| } | |
| function pfandsammeln_cancel() | |
| { | |
| document.getElementById('state').innerHTML="<b>State:</b> Pfandsammeln gestoppt.."; | |
| document.getElementById('pfandsammel_cancel_form').submit(); | |
| } | |
| function pfandbot() | |
| { | |
| setTimeout(clearwagen,200); | |
| setTimeout(pfandsammeln,2000); | |
| document.getElementById('sammeln').value="10"; | |
| interval_bot = setInterval(pfandsammeln,610000); //Every 10 Minutes | |
| setTimeout(pfandbot,610000); | |
| document.getElementById('state').innerHTML="<b>State:</b> Pfandbot gestartet.."; | |
| } | |
| function pfandbot_cancel() | |
| { | |
| document.getElementById('state').innerHTML="<b>State:</b> Pfandbot gestoppt.."; | |
| clearInterval(interval_bot); | |
| } | |
| function clearwagen() | |
| { | |
| document.getElementById('clearpfand_form').submit(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment