Snipz Posted October 22, 2005 Share Posted October 22, 2005 I just started this its my first script can you fix it it up for me. Its got some errors i cant figure outany comments would be great, but keep it in a noob way(since im new)its not even close to done just wanted to see how far it would getit wont let me compile it$Start = MsgBox(36,"Snipz Pindle Bot" , "Load Pindle Bot?")If $Start = 7 Then Exit$RestoreD2 = IniRead("pindle.ini", "Options", "RestoreD2", "1")$CloseD2 = IniRead("pindle.ini", "Options", "CloseD2", "1")$ShowCount = IniRead("pindle.ini", "Options", "ShowCount", "0")$D2Path = IniRead("pindle.ini", "D2Path", "D2path", "NotFound")$D2EXE = IniRead("pindle.ini", "D2Path", "D2EXE", "NotFound")$D2Parameters = IniRead("pindle.ini", "D2Path", "D2Parameters", "NotFound")$D2WinTitle = IniRead("pindle.ini", "D2Path", "D2WinTitle", "Diablo II")$Account = IniRead("pindle.ini", "Login", "Account", "NotFound")$Password = IniRead("pindle.ini", "Login", "Password", "NotFound")$GameName = IniRead("pindle.ini", "Game", "GameName", "Game_")$GamePassword = IniRead("mule.ini", "Game", "GamePassword", "")$Char1 = IniRead("pindle.ini", "Chars", "Char1", "0")$Char2 = IniRead("pindle.ini", "Chars", "Char2", "0")$Char3 = IniRead("pindle.ini", "Chars", "Char3", "0")$Char4 = IniRead("pindle.ini", "Chars", "Char4", "0")$Char5 = IniRead("pindle.ini", "Chars", "Char5", "0")$Char6 = IniRead("pindle.ini", "Chars", "Char6", "0")$Char7 = IniRead("pindle.ini", "Chars", "Char7", "0")$Char8 = IniRead("c.ini", "Chars", "Char8", "0")$MouseSpeed = MyIniRead("pindle.ini", "Game", "MouseSpeed", "1")$LoopDelay = IniRead("mule.ini", "Sleep", "LoopDelay", "NotFound")$LoopCount = IniRead("pindle.ini", "Sleep", "LoopCount", "NotFound")$ErrorDelay = IniRead("pindle.ini", "Sleep", "ErrorDelay", "60000")$Color01 = IniRead("pindle.ini", "Detect", "Color0", "6316128")$Color1 = IniRead("pindle.ini", "Detect", "Color1", "2368548")$Color2 = IniRead("pindle.ini", "Detect", "Color2", "5526612")$Color3 = IniRead("pindle.ini", "Detect", "Color3", "7105644")$Color4 = IniRead("pindle.ini", "Detect", "Color4", "263172")$Color5 = IniRead("pindle.ini", "Detect", "Color5", "5528672")$Color6 = IniRead("pindle.ini", "Detect", "Color6", "2894892")$Color7 = IniRead("pindle.ini", "Detect", "Color7", "5528672")$bnetConnectMin = MyIniRead("pindle.ini", "Delays", "BNetConnectMin", "800")$bnetConnectMax = MyIniRead("pindle.ini", "Delays", "BNetConnectMax", "5000")$loginMin = MyIniRead("pindle.ini", "Delays", "LoginMin", "1200")$loginMax = MyIniRead("pindle.ini", "Delays", "LoginMax", "6000")$charSelectMin = MyIniRead("pindle.ini", "Delays", "CharSelectMin", "400")$charSelectMax = MyIniRead("pindle.ini", "Delays", "CharSelectMax", "8000")$createGameMin = MyIniRead("pindle.ini", "Delays", "CreateGameMin", "600")$createGameMax = MyIniRead("pindle.ini", "Delays", "CreateGameMax", "10000")$runningMin = MyIniRead("pindle.ini", "Delays", "RunningMin", "400")$runningMax = MyIniRead("pindle.ini", "Delays", "RunningMax", "3000")$enterPortalMin = MyIniRead("pindle.ini", "Delays", "EnterPortalMin", "1200")$exitGameMin = MyIniRead("pindle.ini", "Delays", "ExitGameMin", "1200")$exitGameMax = MyIniRead("pindle.ini", "Delays", "ExitGameMax", "6000")Dim $YPosDim $YPos2 , $XPos2Dim $primaryDim $secondaryDim $DelayXDim $TimeDelayDim $ResumeDim $TimeOut = 0Dim $fileDim $xDim $yDim $CharLocation, $size, $psearchDim $Error_01 = 0, $Error_1 = 0, $Error_2 = 0, $Error_3 = 0, $Error_4 = 0, $Error_5 = 0, $Error_6 = 0, $Error_7 = 0, $Error_X = 0Dim $LoopCount2 = 0, $LoopDelay2 = 0, $FullScreen2 = 0Dim $TColor, $Color, $TErr = ""$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")If $k = 1 Then$primary = "right"$secondary = "left"Else$primary = "left"$secondary = "right"endifFunc Login()MyRMouseClick("left", 414, 334, 50, 5, $mouseSpeed)Send("^a")Send("{DEL}")Send($account, 1)MySleep(100)Send("{TAB}")MySleep(100)Send($password, 1)MySleep($dMouseClick)MyRMouseClick("left", 401, 469, 105, 9, $mouseSpeed)Wait(557, 486, $charSelectCheck, $loginMin, $loginMax)EndFuncFunc CharacterSelect()Select Case $Char1 MyRMouseClick("left", 172, 134, 129, 39, $mouseSpeed) Case $Char2 MyRMouseClick("left", 444, 134, 129, 39, $mouseSpeed) Case $Char3 MyRMouseClick("left", 172, 227, 129, 39, $mouseSpeed) Case $Char4 MyRMouseClick("left", 444, 227, 129, 39, $mouseSpeed) Case $Char5 MyRMouseClick("left", 172, 320, 129, 39, $mouseSpeed) Case $Char6 MyRMouseClick("left", 444, 320, 129, 39, $mouseSpeed) Case $Char7 MyRMouseClick("left", 172, 413, 129, 39, $mouseSpeed) Case $Char8 MyRMouseClick("left", 444, 413, 129, 39, $mouseSpeed)EndSelectSleep(50)MouseClick("left")Wait(555, 461, $chatCheck, $charSelectMin, $charSelectMax)EndFuncFunc GoToA5()MyRMouseClick("left", 707, 51, 50, 20, $mouseSpeed)RunningWait($runningMin, $runningMax)MyRMouseClick("left", 364, 78, 25, 9, $mouseSpeed)MySleep(1000)MyRMouseClick("left", 112, 136, 10, 10, $mouseSpeed)MySleep(3500)EndFuncFunc GoToPortal()MyRMouseClick("left", 197, 533, 2, 2, $mouseSpeed) ;runs across wpRunningWait($runningMin, $runningMax)MyRMouseClick("left", 202, 536, 2, 2, $mouseSpeed) ;runs to treeRunningWait($runningMin, $runningMax)MyRMouseClick("left", 47, 301, 2, 2, $mouseSpeed) ;runs past tree to portalRunningWait($runningMin, $runningMax)EndFuncFunc EnterPortal()Precast($precast1) ;precast before entering portalRunWait("d2stats.exe")MyRMouseClick("left", $portalX, $portalY, 2, 2, $portalMouseSpeed) ;enter portalRunningWait($enterPortalMin, $runningMax)Precast($precast2) ;precast after entering portalEndFunc()Func GoToPindle()$teleTemp = StringSplit(StringTrimRight($teleport, 1), ",");$teleTemp[1]is the teleport hotkey, $teleTemp[2] is the delaySendHotKey($teleTemp[1]) ;teleporting to pindleskinMySleep($dMouseClick)MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)MySleep($teleTemp[2])MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)MySleep($teleTemp[2])MyRMouseClick("right", $lastTeleX, $lastTeleY, 2, 2, $mouseSpeed)MySleep($teleTemp[2])$inTemple = 1EndFunc Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go? Link to comment Share on other sites More sharing options...
markusss Posted October 22, 2005 Share Posted October 22, 2005 That can't be all of the script, is it? I don't think so since there are so many undeclared variables and functions.... If its all of the script i think you need to go over it again and add your UDFs and declare variables If you have somethingl ice a _Functions.au3 file, please post it too Felix N. (tdlrali) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2005 Moderators Share Posted October 22, 2005 Well, I just took a quick glance... MySleep() ... I don't see a function for this ... so it should probably be just Sleep() for all of your sleeps. MyRMouseClick() = MouseClick() ... Same thing $teleTemp[1] and $teleTemp[2] isn't set as an array or a variable for that matter. You just don't have enough information posted to see what's up. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Snipz Posted October 22, 2005 Author Share Posted October 22, 2005 (edited) heres new update (I know theres not a make game yet, I havne thad time to do that yet)oh yeh and i compiled it =P but i still get errors =($Start = MsgBox(36,"Snipz Pindle Bot" , "Load Pindle Bot?")If $Start = 7 Then Exit$RestoreD2 = IniRead("pindle.ini", "Options", "RestoreD2", "1")$CloseD2 = IniRead("pindle.ini", "Options", "CloseD2", "1")$ShowCount = IniRead("pindle.ini", "Options", "ShowCount", "0")$D2Path = IniRead("pindle.ini", "D2Path", "D2path", "NotFound")$D2EXE = IniRead("pindle.ini", "D2Path", "D2EXE", "NotFound")$D2Parameters = IniRead("pindle.ini", "D2Path", "D2Parameters", "NotFound")$D2WinTitle = IniRead("pindle.ini", "D2Path", "D2WinTitle", "Diablo II")$Account = IniRead("pindle.ini", "Login", "Account", "NotFound")$Password = IniRead("pindle.ini", "Login", "Password", "NotFound")$GameName = IniRead("pindle.ini", "Game", "GameName", "Game_")$GamePassword = IniRead("mule.ini", "Game", "GamePassword", "")$CharacterSelect = IniRead("pindle.ini", "Chars", ""CharacterSelect, "0")$MouseSpeed = MyIniRead("pindle.ini", "Game", "MouseSpeed", "1")$LoopDelay = IniRead("mule.ini", "Sleep", "LoopDelay", "NotFound")$LoopCount = IniRead("pindle.ini", "Sleep", "LoopCount", "NotFound")$ErrorDelay = IniRead("pindle.ini", "Sleep", "ErrorDelay", "60000")$Color01 = IniRead("pindle.ini", "Detect", "Color0", "6316128")$Color1 = IniRead("pindle.ini", "Detect", "Color1", "2368548")$Color2 = IniRead("pindle.ini", "Detect", "Color2", "5526612")$Color3 = IniRead("pindle.ini", "Detect", "Color3", "7105644")$Color4 = IniRead("pindle.ini", "Detect", "Color4", "263172")$Color5 = IniRead("pindle.ini", "Detect", "Color5", "5528672")$Color6 = IniRead("pindle.ini", "Detect", "Color6", "2894892")$Color7 = IniRead("pindle.ini", "Detect", "Color7", "5528672")$bnetConnectMin = MyIniRead("pindle.ini", "Delays", "BNetConnectMin", "800")$bnetConnectMax = MyIniRead("pindle.ini", "Delays", "BNetConnectMax", "5000")$loginMin = MyIniRead("pindle.ini", "Delays", "LoginMin", "1200")$loginMax = MyIniRead("pindle.ini", "Delays", "LoginMax", "6000")$charSelectMin = MyIniRead("pindle.ini", "Delays", "CharSelectMin", "400")$charSelectMax = MyIniRead("pindle.ini", "Delays", "CharSelectMax", "8000")$createGameMin = MyIniRead("pindle.ini", "Delays", "CreateGameMin", "600")$createGameMax = MyIniRead("pindle.ini", "Delays", "CreateGameMax", "10000")$runningMin = MyIniRead("pindle.ini", "Delays", "RunningMin", "400")$runningMax = MyIniRead("pindle.ini", "Delays", "RunningMax", "3000")$enterPortalMin = MyIniRead("pindle.ini", "Delays", "EnterPortalMin", "1200")$exitGameMin = MyIniRead("pindle.ini", "Delays", "ExitGameMin", "1200")$exitGameMax = MyIniRead("pindle.ini", "Delays", "ExitGameMax", "6000")$precast1 = MyIniRead("pindle.ini", $slotToUse, "Precast1", "")$precast2 = MyIniRead("pindle.ini", $slotToUse, "Precast2", "")$loginCheck = MyIniRead("pindle.ini", "ColorChecks", "Login", "4739160")$charSelectCheck = MyIniRead("pindle.ini", "ColorChecks", "CharSelect", "6579300")$chatCheck = MyIniRead("pindle.ini", "ColorChecks", "Chat", "4739160")$inGameCheck = MyIniRead("pindle.ini", "ColorChecks", "InGame", "4753584")$runningMin = MyIniRead("pindle.ini", "Delays", "RunningMin", "400")$runningMax = MyIniRead("pindle.ini", "Delays", "RunningMax", "3000")$enterPortalMin = MyIniRead("pindle.ini", "Delays", "EnterPortalMin", "1200")Dim $YPosDim $YPos2 , $XPos2Dim $primaryDim $secondaryDim $DelayXDim $TimeDelayDim $ResumeDim $TimeOut = 0Dim $fileDim $xDim $yDim $CharLocation, $size, $psearchDim $Error_01 = 0, $Error_1 = 0, $Error_2 = 0, $Error_3 = 0, $Error_4 = 0, $Error_5 = 0, $Error_6 = 0, $Error_7 = 0, $Error_X = 0Dim $LoopCount2 = 0, $LoopDelay2 = 0, $FullScreen2 = 0Dim $TColor, $Color, $TErr = ""$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")If $k = 1 Then$primary = "right"$secondary = "left"Else$primary = "left"$secondary = "right"endifFunc Login()MyRMouseClick("left", 414, 334, 50, 5, $mouseSpeed)Send("^a")Send("{DEL}")Send($account, 1)MySleep(100)Send("{TAB}")MySleep(100)Send($password, 1)MySleep($dMouseClick)MyRMouseClick("left", 401, 469, 105, 9, $mouseSpeed)Wait(557, 486, $charSelectCheck, $loginMin, $loginMax)EndFuncFunc CharacterSelect()Select Case $Char1 MyRMouseClick("left", 172, 134, 129, 39, $mouseSpeed) Case $Char2 MyRMouseClick("left", 444, 134, 129, 39, $mouseSpeed) Case $Char3 MyRMouseClick("left", 172, 227, 129, 39, $mouseSpeed) Case $Char4 MyRMouseClick("left", 444, 227, 129, 39, $mouseSpeed) Case $Char5 MyRMouseClick("left", 172, 320, 129, 39, $mouseSpeed) Case $Char6 MyRMouseClick("left", 444, 320, 129, 39, $mouseSpeed) Case $Char7 MyRMouseClick("left", 172, 413, 129, 39, $mouseSpeed) Case $Char8 MyRMouseClick("left", 444, 413, 129, 39, $mouseSpeed)EndSelectSleep(50)MouseClick("left")Wait(555, 461, $chatCheck, $charSelectMin, $charSelectMax)EndFuncFunc GoToA5()MyRMouseClick("left", 707, 51, 50, 20, $mouseSpeed)RunningWait($runningMin, $runningMax)MyRMouseClick("left", 364, 78, 25, 9, $mouseSpeed)MySleep(1000)MyRMouseClick("left", 112, 136, 10, 10, $mouseSpeed)MySleep(3500)EndFuncFunc GoToPortal()MyRMouseClick("left", 197, 533, 2, 2, $mouseSpeed) ;runs across wpRunningWait($runningMin, $runningMax)MyRMouseClick("left", 202, 536, 2, 2, $mouseSpeed) ;runs to treeRunningWait($runningMin, $runningMax)MyRMouseClick("left", 47, 301, 2, 2, $mouseSpeed) ;runs past tree to portalRunningWait($runningMin, $runningMax)EndFuncFunc EnterPortal()Precast($precast1) ;precast before entering portalMyRMouseClick("left", $portalX, $portalY, 2, 2, $portalMouseSpeed) ;enter portalRunningWait($enterPortalMin, $runningMax)Precast($precast2) ;precast after entering portalEndFunc()Func GoToPindle()MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)MyRMouseClick("right")EndFuncand heres the ini[Options]StartGame = 1AccountLogin = 1RestoreD2 = 1[D2Path]D2Path = c:\Diablo IID2EXE = Diablo II.exeD2Parameters= -title "Diablo II" -skiptobnet -w -ns -lq -res800 -nonotifyD2WinTitle=Diablo II[Login]Account=snipz3Password=123[slot1]CharPosition=1Difficulty=Precast1=Precast2=[Game]GameName = PindleGamePassword = Lets Go; 1 5 ; 2 6 ; 3 7 ; 4 8 [Delays]LoginMin=1200LoginMax=6000CharSelectMin=400CharSelectMax=8000RunningMin=400RunningMax=3000EnterPortalMin=1200[Misc]MouseSpeed=1[sleep]LoopDelay = 300000LoopCount = 24ErrorDelay = 700000[Detect]Color1=2368548Color2=5526612Color3=7105644Color4=263172Color5=5528672Color6=2894892Color7=5528672[ColorChecks]Login=4739160CharSelect=6579300Chat=4739160InGame=4753584 Edited October 22, 2005 by Snipz Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 22, 2005 Moderators Share Posted October 22, 2005 Of course you do...MySleep()MyMouseClick()What are those? You have them defined as functions but no functions for them.You need to download SciTE Editor and use that, it will show you what I'm talking about.SciTE Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Snipz Posted October 22, 2005 Author Share Posted October 22, 2005 (edited) o I fixed themand i get all the stuff u are saying and fixed itnow im having trouble starting up the gameFunc ActivateD2()WinActivate($d2WinTitle, "") ;activating windowWinWaitActive($d2WinTitle, "", 5)If ($moveWindow = 1) Then WinMove($d2WinTitle, "", 0, 0)EndIfEndFuncFunc StartD2()Run($d2path & "\" & $d2exe & " " & $d2parameters & ' -title "' & $d2WinTitle & '"', $d2path)WinWait($d2WinTitle, "", 20)ActivateD2()WinSize()EndFuncFunc WinSize()If WinActive($d2WinTitle, "") Then $winSize = WinGetPos($d2WinTitle, "") $borderWidth = ($winSize[2]- 800) / 2 $titleHeight = $winSize[3] - 600 - (2 * $borderWidth)Else MsgBox(48, "Snipz Pindlebot" & $version, 'Could not locate Diablo II window. Setting offsets to default, or previous values if valid.', 5)EndIfEndFunc[D2Path]D2Path = c:\Diablo IID2EXE = Diablo II.exeD2Parameters= -title "Diablo II" -skiptobnet -w -ns -lq -res800 -nonotifyD2WinTitle=Diablo II Edited October 22, 2005 by Snipz Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go? Link to comment Share on other sites More sharing options...
Snipz Posted October 23, 2005 Author Share Posted October 23, 2005 you there? Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go? Link to comment Share on other sites More sharing options...
viking Posted October 27, 2005 Share Posted October 27, 2005 Hi, i read your code and it looks nice, i didnt care to look for errors=p. Im just here to ask you something, i mean - making it go to pindle and kill him with the skills u set up is very easy (i made that script in <30 minutes) but the hard thing is picking up items right? How are u gonna solve that? Regards, Viking Link to comment Share on other sites More sharing options...
Snipz Posted October 27, 2005 Author Share Posted October 27, 2005 (edited) Hi, i read your code and it looks nice, i didnt care to look for errors=p.Im just here to ask you something, i mean - making it go to pindle and kill him with the skills u set up is very easy (i made that script in <30 minutes) but the hard thing is picking up items right?How are u gonna solve that?Regards,Vikingill just drop you a hint that I madepickit in autoitShhhhhh!!!!!!!!!dont tell anyone Edited October 27, 2005 by Snipz Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go? Link to comment Share on other sites More sharing options...
Shinies Posted October 28, 2005 Share Posted October 28, 2005 Ok, i see one problem with ur starting up process. You have: WinWaitActive but that Function doesnt work well with the Diablo window, and it just waits forver because it never registers as Active. Another thing, if you have sucessfully made a pickit with AutoIt please tell me or give me some hints on how you did this as i have been trying for ages now. Link to comment Share on other sites More sharing options...
viking Posted October 28, 2005 Share Posted October 28, 2005 Hm, could u share your AutoIt pickit? Have you changed the colors and stuff like mm.bot? If so.. share it with me anyway ^^ Cheers 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