Sign in to follow this  
Followers 0
cxzzD

Could you a helping hand. (Newbie question)

5 posts in this topic

So yea.. uhm. Started playing around with AutoIt a couple of hours ago and viewed some german tutorials on youtube (Couldn't understand much.. but anyways..). So I figured I was ready to create an auto login script for a game called League of Legends.

Everything goes well until I want it to get out of an "while" loop i did. I tried with the Wend command but didn't seem to help at all (Loop just continued..), so I tried with a "ExitLoop" function and that didn't quite work out either.

So now im turning to you in hope of a helping hand!

Here is the code, It's probably really messy since I have no experience at all with AutoIt, but don't flame to hard on me :x

Constructive criticism is really appreciated tho!

Code:

HotKeySet("{F6}","Terexit")

WinWaitActive("League of Legends Launcher - 1, 0, 0, 31 - [user]") ;Start your lol.exe, this code will log you in.

$Start = 1

if $start = 1 Then

Sleep(2000)

Send("{TAB 11}")

Sleep(3500)

Send("{Enter}")

Sleep(12000)

Send("InsertPasswordHere")

Sleep(200)

Send("{Enter}")

$start += 1

endif

WinWaitActive("PVP.net Client") ; This is right before bot starts the game. ***** !!!This is the loop that won't stop!!! *****

$startMenu = 1

while $startMenu = 1

$startFind = PixelSearch(321, 142,1597, 937,0x900000)

if IsArray($startFind) = True Then

MouseMove($startFind[0],$startFind[1],5)

sleep(9000)

MouseClick("left")

EndIf

ExitLoop

WEnd

Sleep(2000)

MouseMove(763,453,5)

Sleep(1200)

MouseClick("left")

MsgBox(0,"Howdieehoe","Funka jue")

Func terexit()

exit 0

EndFunc

Thanks in advance :P

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Ooooh! of to a bad start.

Best if you read the announcement at the top of the forum.

also there are english language tuts on youtube as well as tuts in the wiki here.

I just want a simple Login script (Need to practice AutoIt on something now don't I?!)

Can't you just give me a answer and I swear to god I will delete the script as soon as I get it working..?

Hell, I'll even record doing so if that pleases you :x

Edited by xCynic

Share this post


Link to post
Share on other sites

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

And your problem is not failure to exit the loop, but the script is pausing waiting for a function. Learn autoit another way and people here will offer help. Once you have a clue what you're doing then you can go rogue. People are touchie about game automation here from any aspect (logging in, cheating, etc)

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