Jump to content

Help a Noob


dysweb
 Share

Recommended Posts

I have made my first program. I'm still a noob programmer and I don't do so well learning by reading guides. They more just confuse me. I have looked through several guides, but would rather have a person just answer my questions. It would speed things up for me a lot, instead of spending several hours/days/weeks/months looking over guides.

This is a mouse click macro, in which screen coordinates need to be placed, along with game coordinates.

So what I'm looking for my Gui to allow me to replace the screen coordinates and other gaming info, instead of it to be coded directly into the program.

I'll just give you my code and see responses and answer questions.

;TinyTown
MouseClick("left", 780, 371, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Rally
MouseClick("left" , 637, 285, 1, 5)

$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks March
MouseClick("left", 310, 260, 1, 5)

$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Ballista Click/Entry
MouseClick("left", 341, 362, 1, 5)
Send("35")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Transport Click/Entry
MouseClick("left", 175, 362, 1, 5)
Send("40")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd


;Barb1
;Clicks X coorids Deletes and Enters New
;Must place mouse out far enough so it will delete all  3 when there is 3.
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("461")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("511")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Down to select Attack
MouseClick("left", 646, 180, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Attack
MouseClick("left", 544, 240, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB1

;START OF BARB2
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("462")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("512")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB2

;START OF BARB3
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("461")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("513")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB3

;START OF BARB4
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("462")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("511")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB4

;START OF BARB5
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("461")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("510")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB5

;START OF BARB6
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("459")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("512")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB6

;START OF BARB7
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("463")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("511")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB7

;START OF BARB8
MouseClick("left", 509, 153, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("463")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Y coorids, Deletes and Enters New
MouseClick("left", 563, 154, 1, 5)
Send("{BS}")
Send("{BS}")
Send("{BS}")
;New X Coorids
Send("513")
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks Hero Down
MouseClick("left", 645, 211, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks hero
MouseClick("left", 550, 243, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 628, 486, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;Clicks ok
MouseClick("left", 381, 337, 1, 5)
$begin = TimerInit ()
        While 1
            $dif = TimerDiff ($begin)
            if $dif > 2000 then exitloop
            WEnd

;END OF BARB8
;End TinyTown

That's 1 complete city, 1 complete round, I need it for 10 cities, and lots more rounds.

I would also like suggestions on my code, along with instead of the while loops waiting set amount of seconds, to randomize them, instead of 2 seconds, 2 - 10 seconds. so the wait is never the same, but over so much time.

Edited by dysweb
Link to comment
Share on other sites

You better read that again. You are not allowed to talk about it, period.

http://www.autoitscript.com/forum/forum-2/announcement-12-game-bots-and-automation

Oic... Last time I was here was like a year ago, and the rule was a tad different I believe, I guess time to delete post. If I only knew how... (don't think I can).

Sorry :graduated: That stinks! :(

If anyone would, PM me about this (making the GUI).

Edited by dysweb
Link to comment
Share on other sites

Deleted Post for Rule violation I wasn't aware of.

Simply need help making a GUI, PM me and we'll get specific elsewhere.

well... went to edit and deleted all and clicked reply, replied and didn't edit.. now can't edit it.

Todays just not my day :graduated:

Edited by dysweb
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...