# Record a route in-game

## Recommended Posts

Alright so I'm trying to think of ways to make my bot follow a path that the user puts in... I have came up with 2 options... ( The paths cannot deal with MouseClicks, but they have to deal with my in-game coords which I have the memory address for in my script below):::::

1. Is there anyways (I heard it has be done) to make a program in AutoIt that records my bots clicks on the coords IN MY GAME (not mouseclicks). Or simpler yet, could it be done easier if the bot searched each coordinate the user hits a button at when he stops... Example : I jump to 200,200 on my bot, I press F2 to save this position, then I want my bot to turn in a circle and I go to 200, 100 and press F2 to save that position.... I'm sure that part probably can be done with some expertise, but my main problem is: How can I get it to replay back to FIND that x, y coord in the game? I would have to do a continuous search to see where I'm at but what should I do to tell it to increase 10 x coords and -10 y coords... Example: I'm at 200, 200 (My first point) and I want it to Ctrl+Click (This is jumping in my game, much faster travel than running [No Ctrl]) and get WITHIN 10 coordinates around 200, 100.... This is my #1 priority atm, if this can't be done then I might ahve to revert to #2.

2. Make a certain boundary with 4-6 points to make a closed-in shape. Then have the bot STAY IN THIS AREA but jumping in a circular pattern... I don't want it to be random because normal human beings don't jump 2 jumps left, then 1 jump back, and 5 jumps up, and 3 down right, and etc... They follow a set path and repeat that path over and over... So if #1 would be too hard to make, would this option be easier? All you would have to do is detect if your within the boundary and make some formula to jump in a circular motion repeatedly...

3. (FORGOT THIS ONE) Easiest option of them all, I started this in my script below... I have 11 input boxes... The user travels to 11 points that he/she wants the bot to move to in a pattern... Then the bot just goes to what I wanted in #1... Only difference is this is limited to a certain amount of input boxes and is more of a hassle to the user.

My code:

P.S.- Some variables aren't needed, I just put them in there because I was gonna use them later until I got stuck at this point

Also: Most of this script was given help from dbzfanatic... I'm posting here because he is having real life issues and I don't want to be a bother to him constantly.

Also, he mentioned to me about using 'instance' to get which client to run the bot on... Well is there an easier way to do this such as just opening the bot with the window you want it to bot on? Only problem I saw here is every window for the game is the same, so Idk if the bot could detect which window to actually use the bot on.

```#include <NomadMemory.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("GUICloseOnEsc",1)

HotKeySet("{F5}", "Pause")

Dim \$x[11],\$y[11],\$cur_x,\$cur_y, \$Paused = True

\$PID = ProcessExists("Conquer.exe")

\$Mem_Handle = _MemoryOpen(\$PID)

\$x_val = "0x0057F9B8"
\$y_val = "0x0057F9BC"

#Region ### START Koda GUI section ### Form=c:\documents and settings\all\desktop\autoit\form1.kxf

\$Form1 = GUICreate("Form1", 435, 447, 193, 125)
\$Input1 = GUICtrlCreateInput("Input1", 32, 32, 57, 21)
\$Input2 = GUICtrlCreateInput("Input1", 32, 64, 57, 21)
\$Input3 = GUICtrlCreateInput("Input1", 32, 96, 57, 21)
\$Input4 = GUICtrlCreateInput("Input1", 32, 128, 57, 21)
\$Input5 = GUICtrlCreateInput("Input1", 32, 160, 57, 21)
\$Input6 = GUICtrlCreateInput("Input1", 32, 192, 57, 21)
\$Input7 = GUICtrlCreateInput("Input1", 32, 256, 57, 21)
\$Input8 = GUICtrlCreateInput("Input1", 32, 224, 57, 21)
\$Input9 = GUICtrlCreateInput("Input1", 32, 288, 57, 21)
\$Input10 = GUICtrlCreateInput("Input1", 32, 320, 57, 21)
\$Input11 = GUICtrlCreateInput("Input1", 32, 352, 57, 21)
\$Label1 = GUICtrlCreateLabel("X Coordinate", 24, 392, 65, 17)
\$Input12 = GUICtrlCreateInput("Input1", 128, 352, 57, 21)
\$Input13 = GUICtrlCreateInput("Input1", 128, 320, 57, 21)
\$Input14 = GUICtrlCreateInput("Input1", 128, 288, 57, 21)
\$Input15 = GUICtrlCreateInput("Input1", 128, 256, 57, 21)
\$Input16 = GUICtrlCreateInput("Input1", 128, 224, 57, 21)
\$Input17 = GUICtrlCreateInput("Input1", 128, 192, 57, 21)
\$Input18 = GUICtrlCreateInput("Input1", 128, 160, 57, 21)
\$Input19 = GUICtrlCreateInput("Input1", 128, 128, 57, 21)
\$Input20 = GUICtrlCreateInput("Input1", 128, 96, 57, 21)
\$Input21 = GUICtrlCreateInput("Input1", 128, 64, 57, 21)
\$Input22 = GUICtrlCreateInput("Input1", 128, 32, 57, 21)
\$Label2 = GUICtrlCreateLabel("Y Coordinate", 128, 392, 65, 17)
\$Checkbox1 = GUICtrlCreateCheckbox("Pick-Up Meteor", 208, 120, 193, 33)
\$Label1 = GUICtrlCreateLabel("Do not check this if you plan to run the bot in", 192, 176, 216, 17)
\$Label2 = GUICtrlCreateLabel("Background view... it will not work in background.", 192, 200, 239, 17)
\$Label3 = GUICtrlCreateLabel("IMPORTANT NOTE: Minimum X / Y Coord", 208, 16, 207, 17)
\$Label4 = GUICtrlCreateLabel("go from top to bottom", 208, 40, 104, 17)
\$Input69= GUICtrlCreateInput("AInput1", 216, 248, 201, 21)
\$Label5 = GUICtrlCreateLabel("Whatever the client you will be running the bot", 200, 280, 223, 17)
\$Label6 = GUICtrlCreateLabel("on, put the number that it is opened from...", 200, 304, 203, 17)
\$Label7 = GUICtrlCreateLabel("Ex: If Conquer is the 3rd client you open up you", 200, 328, 227, 17)
\$Label8 = GUICtrlCreateLabel("put 3 in the box", 200, 352, 77, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

For \$i = 1 To 11
\$x[\$i - 1] = GuiCtrlRead(Eval(\$Input & \$i))
Next

For \$i = 12 To 22
\$y[\$i - 12] = GuiCtrlRead(Eval(\$Input & \$i))
Next

Pause()
While 1

\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
\$ans = MsgBox(33,"Close","Do you really wish to close?")
If \$ans = 1 Then
Exit
EndIf

EndSwitch
WEnd

Func Pause()
\$Paused = Not \$Paused
While Not \$Paused
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
\$ans = MsgBox(33,"Close","Do you really wish to close?")
If \$ans = 1 Then
Exit
EndIf

EndSwitch
WEnd
EndFunc```

##### Share on other sites

I took all that time to explain my problem AND also giving my script... And no one even posts a reply...

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

×

• Wiki

• Back

• Git

## Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.