Jump to content

Help With My Pindle Bot


Snipz
 Share

Recommended Posts

I just started this its my first script can you fix it it up for me. Its got some errors i cant figure out

any 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 get

it 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 $YPos

Dim $YPos2 , $XPos2

Dim $primary

Dim $secondary

Dim $DelayX

Dim $TimeDelay

Dim $Resume

Dim $TimeOut = 0

Dim $file

Dim $x

Dim $y

Dim $CharLocation, $size, $psearch

Dim $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 = 0

Dim $LoopCount2 = 0, $LoopDelay2 = 0, $FullScreen2 = 0

Dim $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"

endif

Func 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)

EndFunc

Func 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)

EndSelect

Sleep(50)

MouseClick("left")

Wait(555, 461, $chatCheck, $charSelectMin, $charSelectMax)

EndFunc

Func 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)

EndFunc

Func GoToPortal()

MyRMouseClick("left", 197, 533, 2, 2, $mouseSpeed) ;runs across wp

RunningWait($runningMin, $runningMax)

MyRMouseClick("left", 202, 536, 2, 2, $mouseSpeed) ;runs to tree

RunningWait($runningMin, $runningMax)

MyRMouseClick("left", 47, 301, 2, 2, $mouseSpeed) ;runs past tree to portal

RunningWait($runningMin, $runningMax)

EndFunc

Func EnterPortal()

Precast($precast1) ;precast before entering portal

RunWait("d2stats.exe")

MyRMouseClick("left", $portalX, $portalY, 2, 2, $portalMouseSpeed) ;enter portal

RunningWait($enterPortalMin, $runningMax)

Precast($precast2) ;precast after entering portal

EndFunc()

Func GoToPindle()

$teleTemp = StringSplit(StringTrimRight($teleport, 1), ",")

;$teleTemp[1]is the teleport hotkey, $teleTemp[2] is the delay

SendHotKey($teleTemp[1]) ;teleporting to pindleskin

MySleep($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 = 1

EndFunc

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

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 B)

If you have somethingl ice a _Functions.au3 file, please post it too

Felix N. (tdlrali)

Link to comment
Share on other sites

  • Moderators

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

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 $YPos

Dim $YPos2 , $XPos2

Dim $primary

Dim $secondary

Dim $DelayX

Dim $TimeDelay

Dim $Resume

Dim $TimeOut = 0

Dim $file

Dim $x

Dim $y

Dim $CharLocation, $size, $psearch

Dim $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 = 0

Dim $LoopCount2 = 0, $LoopDelay2 = 0, $FullScreen2 = 0

Dim $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"

endif

Func 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)

EndFunc

Func 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)

EndSelect

Sleep(50)

MouseClick("left")

Wait(555, 461, $chatCheck, $charSelectMin, $charSelectMax)

EndFunc

Func 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)

EndFunc

Func GoToPortal()

MyRMouseClick("left", 197, 533, 2, 2, $mouseSpeed) ;runs across wp

RunningWait($runningMin, $runningMax)

MyRMouseClick("left", 202, 536, 2, 2, $mouseSpeed) ;runs to tree

RunningWait($runningMin, $runningMax)

MyRMouseClick("left", 47, 301, 2, 2, $mouseSpeed) ;runs past tree to portal

RunningWait($runningMin, $runningMax)

EndFunc

Func EnterPortal()

Precast($precast1) ;precast before entering portal

MyRMouseClick("left", $portalX, $portalY, 2, 2, $portalMouseSpeed) ;enter portal

RunningWait($enterPortalMin, $runningMax)

Precast($precast2) ;precast after entering portal

EndFunc()

Func GoToPindle()

MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)

MyRMouseClick("right", 747, 21, 2, 2, $mouseSpeed)

MyRMouseClick("right")

EndFunc

and heres the ini

[Options]

StartGame = 1

AccountLogin = 1

RestoreD2 = 1

[D2Path]

D2Path = c:\Diablo II

D2EXE = Diablo II.exe

D2Parameters= -title "Diablo II" -skiptobnet -w -ns -lq -res800 -nonotify

D2WinTitle=Diablo II

[Login]

Account=snipz3

Password=123

[slot1]

CharPosition=1

Difficulty=

Precast1=

Precast2=

[Game]

GameName = Pindle

GamePassword = Lets Go

; 1 5

; 2 6

; 3 7

; 4 8

[Delays]

LoginMin=1200

LoginMax=6000

CharSelectMin=400

CharSelectMax=8000

RunningMin=400

RunningMax=3000

EnterPortalMin=1200

[Misc]

MouseSpeed=1

[sleep]

LoopDelay = 300000

LoopCount = 24

ErrorDelay = 700000

[Detect]

Color1=2368548

Color2=5526612

Color3=7105644

Color4=263172

Color5=5528672

Color6=2894892

Color7=5528672

[ColorChecks]

Login=4739160

CharSelect=6579300

Chat=4739160

InGame=4753584

Edited 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

  • Moderators

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

o I fixed them

and i get all the stuff u are saying and fixed it

now im having trouble starting up the game

Func ActivateD2()

WinActivate($d2WinTitle, "") ;activating window

WinWaitActive($d2WinTitle, "", 5)

If ($moveWindow = 1) Then

WinMove($d2WinTitle, "", 0, 0)

EndIf

EndFunc

Func StartD2()

Run($d2path & "\" & $d2exe & " " & $d2parameters & ' -title "' & $d2WinTitle & '"', $d2path)

WinWait($d2WinTitle, "", 20)

ActivateD2()

WinSize()

EndFunc

Func 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)

EndIf

EndFunc

[D2Path]D2Path = c:\Diablo II

D2EXE = Diablo II.exe

D2Parameters= -title "Diablo II" -skiptobnet -w -ns -lq -res800 -nonotify

D2WinTitle=Diablo II

Edited 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

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

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

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

ill just drop you a hint that I made

pickit in autoit

Shhhhhh!!!!!!!!!

dont tell anyone

Edited 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

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

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