Jump to content

Illegal text at the end of statement


 Share

Recommended Posts

Hi all, this is an old account but today I decided i'll try out AutoIt, I'm currently playing a game called Eden Eternal and decided to make an Auto Login bot this is my source so far:

$USERNAME = InputBox("Username - Auto Login", "Please enter your Username.")
$PASSWORD = InputBox("Password  - Auto Login", "Please enter your Password.")
$SERVER = InputBox("Server - Auto Login", "Please select Server. (1-3)")
$CHANNEL = InputBox("Channel - Auto Login", "Please select channel. (1-6)")
$CHAR = InputBox("Character - Auto Login", "Please enter desired character. (1-3)")
$ProcessName = "_Launcher.exe"

Check()
Func Check()
   If ProcessExists($ProcessName) Then
   Login()
Else
MsgBox(0,"Not Running", "Eden isn't running, run that first.")
Exit(0)
EndIf
   EndFunc
Func Login()
WinActivate("[CLASS:Eden]", "")
MouseClick("left", 441, 599, 1)
Send($USERNAME)
sleep(200)
MouseClick("left", 468, 642, 4)
Send($PASSWORD)
sleep(200)
MouseClick("left", 513, 688, 1)
If $SERVER = 1 Then
   Mouseclick("left", 479, 316, 1)
elseif $SERVER = 2 Then
   MouseClick("left", 502, 331, 1)
ElseIf $SERVER = 3 Then
   MouseClick("left", 483, 346, 1)
sleep(5000)
If $CHANNEL = 1 Then
MouseCLick("left", 650, 316, 1)
else if $CHANNEL = 2 Then
MouseCLick("left", 650, 333, 1)
else if $CHANNEL = 3 Then
MouseCLick("left", 650, 348, 1)
else if $CHANNEL = 4 Then
MouseCLick("left", 650, 362, 1)
else if $CHANNEL = 5 Then
MouseCLick("left", 650, 378, 1)
else if $CHANNEL = 6 Then
MouseCLick("left", 650, 394, 1)
sleep(5000)
  MouseClick("left", 661, 541, 1) ;Confirm
If $CHAR = 1 Then
MouseCLick("left", 827, 80, 1)
else if $CHAR = 2 Then
MouseCLick("left", 827, 162, 1)
else if $CHAR = 3 Then
MouseCLick("left", 827, 230, 1)
EndIf
EndIf
EndIf
sleep(5000)
  MouseClick("left", 420, 733) ;Confirm
   EndFunc

But when ever I try to test the script I get this message:Posted Image

It worked up untill i added this part of the script:

If $CHANNEL = 1 Then
MouseCLick("left", 650, 316, 1)
else if $CHANNEL = 2 Then
MouseCLick("left", 650, 333, 1)
else if $CHANNEL = 3 Then
MouseCLick("left", 650, 348, 1)
else if $CHANNEL = 4 Then
MouseCLick("left", 650, 362, 1)
else if $CHANNEL = 5 Then
MouseCLick("left", 650, 378, 1)
else if $CHANNEL = 6 Then
MouseCLick("left", 650, 394, 1)
EndIf
sleep(5000)
  MouseClick("left", 661, 541, 1) ;Confirm
If $CHAR = 1 Then
MouseCLick("left", 827, 80, 1)
else if $CHAR = 2 Then
MouseCLick("left", 827, 162, 1)
else if $CHAR = 3 Then
MouseCLick("left", 827, 230, 1)
EndIf
sleep(5000)
  MouseClick("left", 420, 733) ;Confirm

Thank you for your time c:

It's midnight here currently and i'm sure i'm missing something so simple, any help would be so useful!

Link to comment
Share on other sites

True, you are missing something simple: The forum rules. They talk about game automation and site auto-login methods. Please re-read them carefully!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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...