Jump to content

[REQUEST] Arithmetic Solving Script.


Recommended Posts

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.

Posted Image

Edited by 3xM3NT4Lx4
Link to post
Share on other sites

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 post
Share on other sites

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 by 3xM3NT4Lx4
Link to post
Share on other sites

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 by 3xM3NT4Lx4
Link to post
Share on other sites

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 post
Share on other sites
  • Developers

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 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 post
Share on other sites

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

Sorry, 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 post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...