Sign in to follow this  
Followers 0
Sebix

Bot S4League

3 posts in this topic

#1 ·  Posted (edited)

Hi folks, I'm new to the forum.

I am creating a "FarmBot", which has a GUI, where you can select the map and playtime.

This is my first file created by AutoIt, so it is not very complex, this theory would.

Open button, select playtime, select map, give Start.

Pressing Start opens the game window, F5 is pushed (key that starts the game), is

generates Sleep 20 seconds to load the game, it opens another program which serves to teleport in the game. The bot it will also do is place the coordinates of the positions within the game to teleport to certain beneficial points.

After that will generate Sleep 21 minutes, and then will start again from 0, omitting the step of opening the program teleportation.

This is the code:

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <GuiComboBoxEx.au3>
GuiCreate("Farmbot S4 League por XxSsebasSxX",245,200)
GuiSetState(@SW_SHOW)
GuiCtrlCreateGroup("Tiempo", 20, 15, 90, 100)
$Tiempo = GuiCtrlCreateCombo("0", 30, 40, 70, 200, $CBS_DROPDOWNLIST)
GuiCtrlSetData(-1, "6|11|16|21|31")
GUICtrlCreateInput("", 30, 75, 70, 25, $ES_NUMBER)
GuiCtrlCreateGroup("Mapa", 125, 15, 100, 100)
$Skyline = GUICtrlCreateRadio("Skyline", 135, 40)
$Station2 = GUICtrlCreateRadio("Station2", 135, 60)
$Start = GuiCtrlCreateButton("Start", 80, 130, 70, 25)






While 1
   Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
   Exit
Case $Start
  _Delay()
EndSwitch
WEnd

$Tiempo = $Tiempo * 60000
Func _Delay()
Sleep(GUICtrlRead($Tiempo))
EndFunc

I tried in many ways, with if, using Select, using loops, but none seemed to work.

At this time the bot just want to prove that, by pressing START, Sleep is generated from the number of minutes

that is in the Combobox. So the multiplication "$ Time * 60000", because if the user selects 6, if this number is placed in the function, then the amount of sleep time would be 0.01. By doing 6 * 60000 = 360000 = 6 minutes.

Anyway, I hope to explain to me how I can solve and how failure.

I await your reply, thanks in advance.

Edited by Sebix

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I am creating a "FarmBot", which has a GUI, where you can select the map and playtime.

I beleive you have missed the rules. Edited by Venix

Share this post


Link to post
Share on other sites

Sebix,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. :naughty:

See you soon with a legitimate question I hope. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0