Aces Posted June 21, 2007 Share Posted June 21, 2007 (edited) CODE;; Diablo II LOD Starter Script Start ;; Set AutoIt Options AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("PixelCoordMode", 0) AutoItSetOption("WinWaitDelay", 500) AutoItSetOption("WinTextMatchMode", 1) AutoItSetOption("WinDetectHiddenText", 1) AutoItSetOption("MouseClickDelay", 200) ;; Window Config $title = "UberAces v1.0" ;; PixelSearch $accountcoord = PixelSearch(428,398,593,421, 0x000400) $accountchecksum = PixelChecksum(428,398,593,421) ;; Diablo II Config $d2mem = MemGetStats() $d2path = IniRead("config.ini", "D2", "d2path", "") $d2exe = IniRead("config.ini", "D2", "d2exe", "") $d2param = IniRead("config.ini", "D2", "d2param", "") $d2account = IniRead("config.ini", "Login", "d2account", "") $d2pass = IniRead("config.ini", "Login", "d2pass", "") $d2charslot = IniRead("config.ini", "Login", "d2charslot", "") ;; Start Start() While $accountchecksum = PixelChecksum(428,398,593,421) PixelSearch(428,398,593,421, 0x000400) ToAccount() WEnd ;; Erase Erase() ;; To Password InputBox ToPass() ;; Login Login() ;; Character Selection Character() ;; Set Functions Func Erase() $i = 0 Do Send("{BS}") $i = $i + 1 Until $i = 20 EndFunc Func Start() If @error Then MsgBox(0, "AutoLogin - UberAces v1.0", "Check your 'config.ini'. Make sure d2path= and d2exe= are correct") Else ShellExecute($d2exe, $d2param, $d2path) WinWaitActive($title) WinMove($title, "", 0, 0) Sleep(5000) EndIf EndFunc Func ToAccount() If @error Then MsgBox(0, "AutoLogin - UberAces v1.0", "Make sure your desktop resolution is '1024x768'. and your Diablo II resolution is '800x600'") Else MouseMove("left", 434, 336) MouseClick("left", 434, 336, 2, 1) EndIf EndFunc Func ToPass() If @error Then MsgBox(0, "AutoLogin - UberAces v1.0", "Make sure your desktop resolution is '1024x768'. and your Diablo II resolution is '800x600'") Else Send($d2account) Sleep(500) MouseClick("left", 425, 390, 1, 1) Send($d2pass) Sleep(500) EndIf EndFunc Func Login() If @error Then MsgBox(0, "AutoLogin - UberAces v1.0", "You need to change your account and password to the correct ones in 'config.ini'") Else MouseMove(400, 470, 1) MouseClick("left", 400, 470, 1, 1) Sleep(5000) EndIf EndFunc Func Character() If @error Then MsgBox(0, "AutoLogin - UberAces v1.0", "Open 'config.ini'. Change your charslot= to the correct slot your main character is in") Else If ($d2charslot == 1) Then MouseClick("left", 175, 130, 2, 1) EndIf If ($d2charslot == 2) Then MouseClick("left", 450, 130, 2, 1) EndIf If ($d2charslot == 3) Then MouseClick("left", 175, 230, 2, 1) EndIf If ($d2charslot == 4) Then MouseClick("left", 450, 230, 2, 1) EndIf If ($d2charslot == 5) Then MouseClick("left", 175, 330, 2, 1) EndIf If ($d2charslot == 6) Then MouseClick("left", 450, 330, 2, 1) EndIf If ($d2charslot == 7) Then MouseClick("left", 175, 430, 2, 1) EndIf If ($d2charslot == 8) Then MouseMove(450, 430) MouseClick("left", 450, 430, 1, 1) MouseClick("left", 450, 430, 1, 1) EndIf EndIf EndFunc i'm trying to set every MouseClick() action to click inside a certain pixel area $accountcoord = PixelSearch(428,398,593,421, 0x000400) $accountchecksum = PixelChecksum(428,398,593,421) anyone help? Edited June 21, 2007 by Aces ~~ AutoIt v3 Minion ~~Name: Kevin "Aces-X" MorrisOrganization: A C DevelopmentE-Mail: AcesX91@acecoding.netOS: XP Professional; Vista package~~ Released Software ~~CPU-Mach: Topic at acecoding.net ForumsProxyzBuddy: Beta testing at the moment, private onlyWHSTool: Not released to the public Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now