Sign in to follow this  
Followers 0
djtweaked

D2 Autoit Scripts

7 posts in this topic

AutoBonewall Script

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.2.1.14 (beta)
Author: R. Gray

Script Function:

    Automate Bone wall casting over the whole screen. Bonewall must be set as your right click skill.


    Set the values for $y and $x to the minimum and maximum range you want to cast at

    Use the tool AutoIt Window Info that comes with Autoit to find the x and y coordinates to use

    1. Create a new autoit script by rightclicking on your desktop and selecting autoit script 

    2. Run Diablo 2 in windowed mode

    3. Rune Autoit Window Info

    4. Move your mouse to the upper left corner of your Diablo 2 window, then upper right corner, then lower left corner of the map, finally to the lower right corner of the map. Read and set the $x and $y values to what you will use.

    5. Example change $y = Random( 160, 700, 1) to $y = Random (100, 650, 1) if your minimum value of y is 100 and your maximum value of y is 650. Do the same for $x.

    6. To pause this script hit the pause key and to end this script hit the end key or rightclick the autoit icon that will be in            your task tray.

   
#ce ----------------------------------------------------------------------------



Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{END}", "Terminate")



Do
    $i = 1
    $y = Random( 160, 700, 1)
    $x = Random( 200, 980, 1)
    MouseMove( $x, $y, 2)
    MouseDown("right")
    MouseUp("right")
    Sleep(100)
    MouseDown("Right")
    MouseUp("right")
    Sleep(100)
    $i = $i + 1
    
Until $i = 500000   

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        R. Gray
;
; Script Function:
;   Casts Meteor for ~1 minute then casts poison nova ~5 seconds. Then repeats until you shut it off,
;      Change MouseMove( 600, 425) to where you want to have it cast. Use the Autoit Window Info Tool to find the x,y coordinates you want to;use. 
; ----------------------------------------------------------------------------

; Script Start - Add your code below here

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{END}", "Terminate")


Do
    $i = 1
    MouseMove( 600, 425)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    MouseDown("right")
    MouseUp("right")
    Sleep(200)
    Send("{F2}")
    MouseDown("right")
    MouseUp("right")
    Sleep(500)
    MouseDown("right")
    MouseUp("right")
    Sleep(500)
    MouseDown("right")
    MouseUp("right")
    Sleep(500)
    MouseDown("right")
    MouseUp("right")
    Sleep(500)
    MouseDown("right")
    MouseUp("right")
    Sleep(500)
    Send("{F1}")
    Sleep(200)
    $i = $i + 1
    
Until $i = 500000

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Edited by djtweaked

Share this post


Link to post
Share on other sites

wow thats a long post.... if these are fully functioning scripts, you might want to post them over in the "example scripts" forum. If your having a problem or anything with them and want help, let us know what the problem is... And what game is this for?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Welcome to the forum. :) Are you having a problem with these scripts? I appreciate you trying to be helpful but my guess is you want the example scripts forum.

Also, in your second script, with all the

MouseDown("right")

MouseUp("right")

Sleep(200)

you can place those in a loop to make the script a lot cleaner

If you tried to post in the example scripts but couldn't, I believe you need 10 posts before you can post there.

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Welcome to the forum. :) Are you having a problem with these scripts? I appreciate you trying to be helpful but my guess is you want the example scripts forum.

Also, in your second script, with all the

MouseDown("right")

MouseUp("right")

Sleep(200)

you can place those in a loop to make the script a lot cleaner

I wanted to do that but I wasnt sure how to exactly. I don't know how to put a loop within a loop and still have it run for a long time.

and its for Diablo 2 it automates part of an item duping process.

Edited by djtweaked

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

This is how a loop would look like that does what you need... I had to change it a little to make a decent example.

For $i = 1 to 10 Step 1
    MouseMove( 600, 425)
    MouseMove( 300, 325)
    Sleep(200)
Next

That will do 2 mouse movements 10 times. The sleep command acts as the 'waiting' period. Look up For...Next in the helpfile

EDIT: Also wanted to add the forum has a lot of examples of bots for games, many of them are very advanced and have hard concepts especially for people new to autoit, but its good to have as a reference for how it can be done.

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

and its for Diablo 2 it automates part of an item duping process.

And before you Diablo players get all excited, it's only one of the MANY lag dupe methods that have a one in a zillion chance of working.

A little reading goes a long way. Post count means nothing.

Share this post


Link to post
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
Sign in to follow this  
Followers 0