3xM3NT4Lx4 Posted March 30, 2009 Share Posted March 30, 2009 (edited) Okay so, I have been using AutoIt to bot in this online game for about a couple weeks now.Recently, they have implemented a new security system to block botters, which is by adding a simple, random arithmetic question during gameplay which occurs randomly every 15 minutes or so.Example: 15 + 20 = ?*The numbers are limited from 0-100 if that is any help.**Only Addition problems!If you fail to respond to the question or get a correct answer by the time the question dissapears, you get kicked from the game. (Time lapse of the question = 30 seconds.)I know with infinite knowledge of AutoIt, I can edit myself a script to solve the arithmetic question that pop up, so that I can resume my botting.Problem is.. I am a noob at it, but I am learning.I would be very grateful to anyone that can help me with my script.Thanks to anyone that reads this in advance & I will be very grateful to anyone that can help me!Here is a screenshot of what it looks like. Edited March 31, 2009 by 3xM3NT4Lx4 Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 30, 2009 Author Share Posted March 30, 2009 Maybe this is too much to ask? Link to comment Share on other sites More sharing options...
Chapi Posted March 31, 2009 Share Posted March 31, 2009 How is implemented the question? I mean, the question apears in game or is a popup launched by some type of game loader? Post a screan plese. Link to comment Share on other sites More sharing options...
Authenticity Posted March 31, 2009 Share Posted March 31, 2009 Dim $sEquation = "10 / 5 - 9 * 2 / 20 + 6 = ?" MsgBox(0x40, 'Title', $sEquation & @LF & Execute(StringLeft($sEquation, StringInStr($sEquation, '=')-2))) Maybe using Adlib or timer function with ~30 seconds interval that tracing popup windows, getting this equation and passing the left side of it to Execute? Link to comment Share on other sites More sharing options...
TerarinK Posted March 31, 2009 Share Posted March 31, 2009 I could tell you I would quit the same if I ever got a question asked every 30 minutes. Remember, these games are to attract us players not to repel us which this here is saying. How many users actually quit because of them implementing it? 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 (edited) The placement of the Math-Check Box is always the same. The questions are always different. Questions are ONLY addition. Numbers range from 0~100. If you answer the question incorrectly, a new question keeps coming until the 30 seconds are gone, then you get kicked. Edited March 31, 2009 by 3xM3NT4Lx4 Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 (edited) People have not quit, because there are only a FEW botters, and from those few only a few are professional botters with knowledge of programming. (It's a Korean Game, but the english community is very high.) And the pro botters have continued to bot after they added the math check. So I know it is possible to bypass it through AutoIt. Edited March 31, 2009 by 3xM3NT4Lx4 Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 Added a screenshot. Link to comment Share on other sites More sharing options...
Authenticity Posted March 31, 2009 Share Posted March 31, 2009 Is the equation remain the same if the answer is wrong? Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 (edited) No, the equation is different if you answer wrong. Edited March 31, 2009 by 3xM3NT4Lx4 Link to comment Share on other sites More sharing options...
Authenticity Posted March 31, 2009 Share Posted March 31, 2009 Well, I guess that if you're not able to recognize if this window exist by reading some memory addresses then it's useless to go this way or to use generic While with random numbers in the range 0 to 200... Maybe using OCR? Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 I am a noob.. ; what is OCR? Link to comment Share on other sites More sharing options...
Authenticity Posted March 31, 2009 Share Posted March 31, 2009 OCR UDF by seangriffinhttp://en.wikipedia.org/wiki/Optical_character_recognitionBasically, if you go this way then it's by taking rectangular area of the window # amount upper and lefter of the entire window's right-bottom (x, y) position. You'll need to read a few words. ;] Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 I am still clueless, but I will try to read everything about OCR. Thanks Authenticity, you have been a great help. Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 (edited) I am still stuck on what to actually write in the script. I downloaded Tesseract & the 2 example scripts, control_find / control_capture. Can anyone guide me on what to do next? Edited March 31, 2009 by 3xM3NT4Lx4 Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 _TesseractScreenCapture($get_last_capture = 0, $delimiter = "", $cleanup = 1, $scale = 2, $left_indent = 0, $top_indent = 0, $right_indent = 0, $bottom_indent = 0, $show_capture = 0) Okay, so that is the part I need. I have no clue what to do next. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2009 Developers Share Posted March 31, 2009 (edited) I have no clue what to do next.Polish your shoes? Edited March 31, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 K, got this so far. What can I do with this, to make it so I can bypass the math questions that pop up? #include-once #Include <Array.au3> #Include <File.au3> #include <GDIPlus.au3> #include <ScreenCapture.au3> #include <WinAPI.au3> #include <ScrollBarConstants.au3> #include <WindowsConstants.au3> #Include <GuiComboBox.au3> #Include <GuiListBox.au3> func _TesseractScreenCapture($get_last_capture = 0, $delimiter = "", $cleanup = 1, $scale = 2, $left_indent = 0, $top_indent = 0, $right_indent = 0, $bottom_indent = 0, $show_capture = 0) While True Local $tInfo dim $aArray, $final_ocr[1], $xyPos_old = -1, $capture_scale = 3 Local $tSCROLLINFO = DllStructCreate($tagSCROLLINFO) DllStructSetData($tSCROLLINFO, "cbSize", DllStructGetSize($tSCROLLINFO)) DllStructSetData($tSCROLLINFO, "fMask", $SIF_ALL) if $last_capture = "" Then $last_capture = ObjCreate("Scripting.Dictionary") EndIf ; if last capture is requested, and one exists. if $get_last_capture = 1 and $last_capture.item(0) <> "" Then return $last_capture.item(0) EndIf $capture_filename = _TempFile($tesseract_temp_path, "~", ".tif") $ocr_filename = StringLeft($capture_filename, StringLen($capture_filename) - 4) $ocr_filename_and_ext = $ocr_filename & ".txt" CaptureToTIFF("", "", "", $capture_filename, $scale, $left_indent, $top_indent, $right_indent, $bottom_indent) ShellExecuteWait(@ProgramFilesDir & "\tesseract\tesseract.exe", $capture_filename & " " & $ocr_filename) ; If no delimter specified, then return a string if StringCompare($delimiter, "") = 0 Then $final_ocr = FileRead($ocr_filename_and_ext) Else _FileReadToArray($ocr_filename_and_ext, $aArray) _ArrayDelete($aArray, 0) ; Append the recognised text to a final array _ArrayConcatenate($final_ocr, $aArray) EndIf ; If the captures are to be displayed if $show_capture = 1 Then GUICreate("Tesseract Screen Capture. Note: image displayed is not to scale", 640, 480, 0, 0, $WS_SIZEBOX + $WS_SYSMENU) ; will create a dialog box that when displayed is centered GUISetBkColor(0xE0FFFF) $Obj1 = ObjCreate("Preview.Preview.1") $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 640, 480) $Obj1.ShowFile ($capture_filename, 1) GUISetState() if IsArray($final_ocr) Then _ArrayDisplay($aArray, "Tesseract Text Capture") Else MsgBox(0, "Tesseract Text Capture", $final_ocr) EndIf GUIDelete() EndIf FileDelete($ocr_filename & ".*") ; Cleanup if IsArray($final_ocr) And $cleanup = 1 Then ; Cleanup the items for $final_ocr_num = 1 to (UBound($final_ocr)-1) ; Remove erroneous characters $final_ocr[$final_ocr_num] = StringReplace($final_ocr[$final_ocr_num], ".", "") $final_ocr[$final_ocr_num] = StringReplace($final_ocr[$final_ocr_num], "'", "") $final_ocr[$final_ocr_num] = StringReplace($final_ocr[$final_ocr_num], ",", "") $final_ocr[$final_ocr_num] = StringStripWS($final_ocr[$final_ocr_num], 3) Next ; Remove duplicate and blank items for $each in $final_ocr $found_item = _ArrayFindAll($final_ocr, $each) ; Remove blank items if IsArray($found_item) Then if StringCompare($final_ocr[$found_item[0]], "") = 0 Then _ArrayDelete($final_ocr, $found_item[0]) EndIf EndIf ; Remove duplicate items for $found_item_num = 2 to UBound($found_item) _ArrayDelete($final_ocr, $found_item[$found_item_num-1]) Next Next EndIf ; Store a copy of the capture if $last_capture.item(0) = "" Then $last_capture.item(0) = $final_ocr EndIf Return $final_ocr Wend EndFunc Someone told me this script does nothing. I added a loop to it, but I still need a function? And how do I correct this to do something? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2009 Developers Share Posted March 31, 2009 (edited) No need to repost and remove the original one to bump your thread. You seem to be a little impatient to say the least. Now what about if you have a good look at your script and find the portion that starts the _TesseractScreenCapture() UDF? Jos Edited March 31, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
3xM3NT4Lx4 Posted March 31, 2009 Author Share Posted March 31, 2009 No need to repost and remove the original one to bump your thread.You seem to be a little impatient to say the least.Now what about if you have a good look at your script and find the portion that starts the _TesseractScreenCapture() UDF?JosSorry, I am a little desperate.But, this is my only line that includes _TessaractScreenCapture()func _TesseractScreenCapture($get_last_capture = 0, $delimiter = "", $cleanup = 1, $scale = 2, $left_indent = 0, $top_indent = 0, $right_indent = 0, $bottom_indent = 0, $show_capture = 0)What is UDF?Undefined? Link to comment Share on other sites More sharing options...
Recommended Posts