Sign in to follow this  
Followers 0
dre111

Game item dropper

1 post in this topic

#1 ·  Posted (edited)

im not exactly sure whats wrong with this, but here is what im trying to make it do, im trying to have a gui that picks the number of columns of the inventory that the script will pick up and drop the contents of. ive never really used gui, and im not too familiar with using autoit3 but i do program in java so its not that different.

it says i dont have an endif or something like that, but i dont really understand the concept of endif because java really doesnt have 1. Any help and/or criticism would be cool

CODE
HotKeySet("{DEL}", "Terminate")

HotKeySet("{INS}", "Start")

#include <GuiConstants.au3>

GuiCreate("MyGUI", 300, 150,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$col = GUICtrlRead($Combo)

$Label_2 = GuiCtrlCreateLabel("Please Select Number of Columns to Clear.", 10, 80, 210, 20)

$Pic_1 = GuiCtrlCreatePic("logo.jpg", 0, 0, 300, 70)

$Combo = GuiCtrlCreateCombo("1", 10, 110, 70, 21)

GUICtrlSetData($Combo,"2|3|4|5")

$colcleared = 0

$homex = 200

$homey = 340

$startx = 435

$starty = 360

$sleep = 20

While 1

Sleep(1)

WEnd

Func Start()

AutoItSetOption("MouseCoordMode", 0)

Send("i")

Sleep($sleep)

MouseClick("left", $startx,$starty,1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx, $starty + 30, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx, $starty + 60, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx, $starty + 90, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

$colcleared = 1

If $colcleared = $col Then

Exit 1

Else

Sleep($sleep)

MouseClick("left", $startx +30, $starty, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +30, $starty + 30, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +30, $starty + 60, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +30, $starty + 90, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

$colcleared = 2

If $colcleared = $col Then

Exit 1

Else

Sleep($sleep)

MouseClick("left", $startx +60, $starty, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +60, $starty + 30, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +60, $starty + 60, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +60, $starty + 90, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

$colcleared = 3

If $colcleared = $col Then

Exit 1

Else

Sleep($sleep)

MouseClick("left", $startx +90, $starty, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +90, $starty + 30, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +90, $starty + 60, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +90, $starty + 90, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

$colcleared = 4

If $colcleared = $col Then

Exit 1

Else

Sleep($sleep)

MouseClick("left", $startx +120, $starty, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +120, $starty+30, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +120, $starty+60, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

Sleep($sleep)

MouseClick("left", $startx +120, $starty+90, 1)

Sleep($sleep)

MouseClick("left", $homex, $homey)

$colcleared = 5

EndIf

EndFunc

Func Terminate()

Exit 1

EndFunc

thanks

EDIT: sec, i think i figured it out, im going to test it for a few then let you know how it went.

Edited by dre111

Share this post


Link to post
Share on other sites



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

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0