Jump to content

Script stops running


Recommended Posts

ok here is my script. .. it runns for about 10 seconds then closes .. and i cant find the problem

can someone help

#include <Inet.au3>


$section = 0
$reply = 0
$Acoord = 0
$deathcheck = 0
$deadreloadcheck = 0
$level = 1
$Accountname = 0
$Accountpass = 0
$selectedserver = 0
$replyspeach = 0
$PublicIP = _GetIP()
$IpResult = 0
$GameDir = 0
$GameReadyPixCheck = 0
$PublicIP = _GetIP()
$IpResult = 0
    HotKeySet("{HOME}", "GameRun")
    HotKeySet("{END}", "Terminate")


;*****************************
;********starts script********
;*****************************
InetGet("http:**URL**/IP.ini",@ScriptDir & "\What.ini")
$IpResult = IniRead(@Scriptdir & "\What.ini", "IP", $PublicIP, "0")
if $IpResult = 1 then
    if  IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 0 Then
        setup()
    ElseIf IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 1 Then
        Varload1()
    EndIf
EndIf

Func Setup()
    
InetGet("**URL**/IP.ini",@ScriptDir & "\IP.ini")
$IpResult = IniRead(@Scriptdir & "\IP.ini", "IP", $PublicIP, "0")
IniWrite("config.ini", "Account", "IPallow", $IpResult)

    $Reply = InputBox("SETUP", "Imput the root of your alefclient.exe for archlord. the standard place for this is, C:\Program Files\*****.exe, or D:\Program Files\*****.exe", "", "", "600", "200")
    IniWrite("config.ini", "Account", "client", $Reply)
    $usernm = InputBox("SETUP", "Enter your Username.", "", "")
    IniWrite("config.ini", "Account", "user", $usernm)
    $passwd = InputBox("SETUP", "Enter your password.", "", "*")
    IniWrite("config.ini", "Account", "pass", $passwd)
    $Reply = InputBox("SETUP", "Enter your first wished reply.", "", "")
    IniWrite("config.ini", "Reply", "1", $Reply)
    $Reply = InputBox("SETUP", "Enter your second wished reply.", "", "")
    IniWrite("config.ini", "Reply", "2", $Reply)
    $Reply = InputBox("SETUP", "Enter your third wished reply.", "", "")
    IniWrite("config.ini", "Reply", "3", $Reply)
    $Reply = InputBox("SETUP", "Enter your forth wished reply.", "", "")
    IniWrite("config.ini", "Reply", "4", $Reply)
    $Reply = InputBox("SETUP", "Enter the position of the server you wish to run 1 being at top of the list 4 being the bottom", "", "", "520", "200")
    IniWrite("config.ini", "server", "server", $Reply)
    $Reply = InputBox("SETUP", "Enter your wished character name.", "", "")
    IniWrite("config.ini", "Character", "Name", $Reply)
    $Reply = InputBox("SETUP", "Enter your class (put in the coresponding number). 1.knight, 2.archer, 3.mage, 4.bezerker, 5.hunter, 6.sorcerer, 7.elemental, 8.ranger", "", "", "400", "200")
    IniWrite("config.ini", "Character", "class", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your first attack(slot 3).", "", "")
    IniWrite("config.ini", "Attack", "1", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your second attack(slot 4).", "", "")
    IniWrite("config.ini", "Attack", "2", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your third attack(slot 5).", "", "")
    IniWrite("config.ini", "Attack", "3", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your forth attack(slot 6).", "", "")
    IniWrite("config.ini", "Attack", "4", $Reply)

    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for first buff (slot 7)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "1", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for second buff (slot 8)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "2", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for third buff (slot 9)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "3", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for fourth buff (slot 0)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "4", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for fith buff (slot -)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "5", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for sixth buff (slot +)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "6", $Reply)
    MsgBox(0, "NOTICE", "IN ORDER FOR THIS BOT TO RUN CORRECT YOU NEE THE SETTINGS OR ****** TO BE 1024/768  AND *NOT* WINDOWED. MAKE THE CHANGES WHEN THE BOT IS PAUSED. thankyou")
    IniWrite("config.ini", "Account", "setup", "1")
    Varload1()
    
EndFunc

func Varload1()
        $Accountname = IniRead("config.ini", "Account", "user", "Notfound")
        $AccountPass = IniRead("config.ini", "Account", "pass", "Notfound")
        $selectedserver = IniRead("config.ini", "server", "server", "Notfound")
        $GameDir = IniRead("config.ini", "Account", "client", "Notfound")
        startsleep()
    EndFunc
    
Func startsleep()
    sleep(1000)
    ToolTip("paused, hit home to start. WARNING DO NOT RUN THE GAME IN THIS TIME. LEAVE THE DESKTOP BLANK", 0, 0)
    startsleep()
EndFunc

Func GameRun()
    run($GameDir)
    WinWait("****")
    WinActivate("****")
    Do
        sleep(1000)
        $GameReadyPixCheck = PixelGetColor(520, 580)
    until $GameReadyPixCheck = "8A6047"
    Login()
endFunc

func Login()
    send($Accountname)
    sleep(1000)
    send("{tab}")
    sleep(100)
    send($Accountpass)
    sleep(1000)
    send("{enter}")
    sleep(100)
    Serverselect()
endfunc

Func Serverselect()
;SET SERVER SELECTION
    exit
EndFunc

tnks

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Link to comment
Share on other sites

ok here is my script. .. it runns for about 10 seconds then closes .. and i cant find the problem

can someone help

#include <Inet.au3>


$section = 0
$reply = 0
$Acoord = 0
$deathcheck = 0
$deadreloadcheck = 0
$level = 1
$Accountname = 0
$Accountpass = 0
$selectedserver = 0
$replyspeach = 0
$PublicIP = _GetIP()
$IpResult = 0
$GameDir = 0
$GameReadyPixCheck = 0
$PublicIP = _GetIP()
$IpResult = 0
    HotKeySet("{HOME}", "GameRun")
    HotKeySet("{END}", "Terminate")


;*****************************
;********starts script********
;*****************************
InetGet("http:**URL**/IP.ini",@ScriptDir & "\What.ini")
$IpResult = IniRead(@Scriptdir & "\What.ini", "IP", $PublicIP, "0")
if $IpResult = 1 then
    if  IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 0 Then
        setup()
    ElseIf IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 1 Then
        Varload1()
    EndIf
EndIf

Func Setup()
    
InetGet("**URL**/IP.ini",@ScriptDir & "\IP.ini")
$IpResult = IniRead(@Scriptdir & "\IP.ini", "IP", $PublicIP, "0")
IniWrite("config.ini", "Account", "IPallow", $IpResult)

    $Reply = InputBox("SETUP", "Imput the root of your alefclient.exe for archlord. the standard place for this is, C:\Program Files\*****.exe, or D:\Program Files\*****.exe", "", "", "600", "200")
    IniWrite("config.ini", "Account", "client", $Reply)
    $usernm = InputBox("SETUP", "Enter your Username.", "", "")
    IniWrite("config.ini", "Account", "user", $usernm)
    $passwd = InputBox("SETUP", "Enter your password.", "", "*")
    IniWrite("config.ini", "Account", "pass", $passwd)
    $Reply = InputBox("SETUP", "Enter your first wished reply.", "", "")
    IniWrite("config.ini", "Reply", "1", $Reply)
    $Reply = InputBox("SETUP", "Enter your second wished reply.", "", "")
    IniWrite("config.ini", "Reply", "2", $Reply)
    $Reply = InputBox("SETUP", "Enter your third wished reply.", "", "")
    IniWrite("config.ini", "Reply", "3", $Reply)
    $Reply = InputBox("SETUP", "Enter your forth wished reply.", "", "")
    IniWrite("config.ini", "Reply", "4", $Reply)
    $Reply = InputBox("SETUP", "Enter the position of the server you wish to run 1 being at top of the list 4 being the bottom", "", "", "520", "200")
    IniWrite("config.ini", "server", "server", $Reply)
    $Reply = InputBox("SETUP", "Enter your wished character name.", "", "")
    IniWrite("config.ini", "Character", "Name", $Reply)
    $Reply = InputBox("SETUP", "Enter your class (put in the coresponding number). 1.knight, 2.archer, 3.mage, 4.bezerker, 5.hunter, 6.sorcerer, 7.elemental, 8.ranger", "", "", "400", "200")
    IniWrite("config.ini", "Character", "class", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your first attack(slot 3).", "", "")
    IniWrite("config.ini", "Attack", "1", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your second attack(slot 4).", "", "")
    IniWrite("config.ini", "Attack", "2", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your third attack(slot 5).", "", "")
    IniWrite("config.ini", "Attack", "3", $Reply)
    $Reply = InputBox("SETUP", "This Bot only operates 4 attacks please enter in miliseconds. (1 second = 1000ms) your forth attack(slot 6).", "", "")
    IniWrite("config.ini", "Attack", "4", $Reply)

    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for first buff (slot 7)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "1", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for second buff (slot 8)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "2", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for third buff (slot 9)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "3", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for fourth buff (slot 0)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "4", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for fith buff (slot -)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "5", $Reply)
    $Reply = InputBox("SETUP", "This Bot currently ony operates 6 buffs please enter in milliseconds how long the buff takes to cast. 1 second = 1000ms for sixth buff (slot +)", "", "", "400", "200")
    IniWrite("config.ini", "Buff", "6", $Reply)
    MsgBox(0, "NOTICE", "IN ORDER FOR THIS BOT TO RUN CORRECT YOU NEE THE SETTINGS OR ****** TO BE 1024/768  AND *NOT* WINDOWED. MAKE THE CHANGES WHEN THE BOT IS PAUSED. thankyou")
    IniWrite("config.ini", "Account", "setup", "1")
    Varload1()
    
EndFunc

func Varload1()
        $Accountname = IniRead("config.ini", "Account", "user", "Notfound")
        $AccountPass = IniRead("config.ini", "Account", "pass", "Notfound")
        $selectedserver = IniRead("config.ini", "server", "server", "Notfound")
        $GameDir = IniRead("config.ini", "Account", "client", "Notfound")
        startsleep()
    EndFunc
    
Func startsleep()
    sleep(1000)
    ToolTip("paused, hit home to start. WARNING DO NOT RUN THE GAME IN THIS TIME. LEAVE THE DESKTOP BLANK", 0, 0)
    startsleep()
EndFunc

Func GameRun()
    run($GameDir)
    WinWait("****")
    WinActivate("****")
    Do
        sleep(1000)
        $GameReadyPixCheck = PixelGetColor(520, 580)
    until $GameReadyPixCheck = "8A6047"
    Login()
endFunc

func Login()
    send($Accountname)
    sleep(1000)
    send("{tab}")
    sleep(100)
    send($Accountpass)
    sleep(1000)
    send("{enter}")
    sleep(100)
    Serverselect()
endfunc

Func Serverselect()
;SET SERVER SELECTION
    exit
EndFunc

tnks

I don't see any loops in your code... Try Do/Until or For/Next or While/Wend

Link to comment
Share on other sites

I don't see any loops in your code... Try Do/Until or For/Next or While/Wend

loops arnt needed in this bit of the code .. it doesnt seem to reach this point "Func Setup()"

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Link to comment
Share on other sites

  • Developers

Have you checked which If fails in tis piece of code?

InetGet("http:**URL**/IP.ini",@ScriptDir & "\What.ini")
$IpResult = IniRead(@Scriptdir & "\What.ini", "IP", $PublicIP, "0")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $IpResult = ' & $IpResult & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
if $IpResult = 1 then
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = ' & IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = ' & IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
    if IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 0 Then
        setup()
    ElseIf IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 1 Then
        Varload1()
    EndIf
EndIf

EDIT: and there is an error in the posted script:

: ERROR: Terminate(): undefined function.
    HotKeySet("{END}", "Terminate")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Have you checked which If fails in tis piece of code?

InetGet("http:**URL**/IP.ini",@ScriptDir & "\What.ini")
$IpResult = IniRead(@Scriptdir & "\What.ini", "IP", $PublicIP, "0")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $IpResult = ' & $IpResult & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
if $IpResult = 1 then
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = ' & IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = ' & IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
    if IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 0 Then
        setup()
    ElseIf IniRead("config.ini", "Account", "setup", "ERROR WITH CONFIG") = 1 Then
        Varload1()
    EndIf
EndIf

EDIT: and there is an error in the posted script:

: ERROR: Terminate(): undefined function.
    HotKeySet("{END}", "Terminate")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
tnks ^_^ il give it a shot... and the "terminate" function is at the bottom of the complete script

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Link to comment
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
 Share

  • Recently Browsing   0 members

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