Sign in to follow this  
Followers 0
lolp1

More complex?

2 posts in this topic

#1 ·  Posted (edited)

I've written a small program a while back, that I just sort've lost track of. I found one of the old versions sources, and would like ideas to make it more accurate, efficent, faster, and user friendly, anyy suggestions woule be greatly apperciated. (or even new feature suggestions)

Here is the 'code' i got so far:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
;                                            Diablo II multi Hack
;                                            Credits: Lolp, ISL
;                                             
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;
$settings = @ScriptDir  & "\Hotkey.ini" 
AutoItSetOption("WinTitleMatchMode", 4)
$BOHotKey = "{" & IniRead ( $settings, "Hotkeys", "BO", "") & "}"
$BCHotKey = "{" & IniRead ( $settings, "Hotkeys", "BC", "") & "}"
$HSHotKey = "{" & IniRead ( $settings, "Hotkeys", "HS", "") & "}"
$ESHotKey = "{" & IniRead ( $settings, "Hotkeys", "ES", "") & "}"
$SAHotKey = "{" & IniRead ( $settings, "Hotkeys", "SA", "") & "}"
$TPHotKey = "{" & IniRead ( $settings, "Hotkeys", "TP", "") & "}"
$MSHotKey = "{" & IniRead ( $settings, "Hotkeys", "MS", "") & "}"

Global $Paused
HotKeySet("{END}", "Terminate")
Hotkeyset("6", "precastpaladin")
Hotkeyset("7", "precastsorc")
Hotkeyset("8", "precast")
HotKeyset("9", "tppk")
Hotkeyset("5", "autoparty")
Hotkeyset("0", "chicken")

While 1
Sleep (500)
WEnd

Func Terminate()
    Exit
EndFunc

Func precastpaladin()
TrayTip ( "Paladin Pre-Casts", "Starting Paladin Pre-Casts", 10 , 1 )
Sleep(300);               Battle Orders
Send("w")
Sleep(500)
Send($BOHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(500);               Battle Command
Send($BCHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Send("w")
Sleep(400)
Send("w")
Sleep(500);               Holy Shield
Send($HSHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(400)
Return 
EndFunc

Func precastsorc()
TrayTip ( "Sorc Pre-Casts", "Starting Sorc Pre-Casts", 10 , 1 )
Sleep(300);               Battle Orders
Send("w")
Sleep(500)
Send($BOHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(500);               Battle Command
Send($BCHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(400)
Send("w")
Sleep(500);               Shiver Armor
Send($SAHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(500);               Energy Shield
Send($ESHotKey)
Sleep(300)
Mouseclick("Right")
Mouseclick("Right")
Sleep(400)
Send("w")
Return 
EndFunc

Func precast()
TrayTip ( "Pre-Casts", "Starting Pre-Casts", 10 , 1 )
Sleep(200);               Battle Orders
Send("w")
Sleep(500)
Send($BOHotKey)
Mouseclick("Right")
Mouseclick("Right")
Sleep(500);               Battle Command
Send($BCHotKey)
Mouseclick("Right")
Mouseclick("Right")
Sleep(500)
Send("w")
Return 
Endfunc


Func autoparty()
TrayTip ( "Auto-Party", "Starting Auto-Party", 10 , 1 )
Send("p")
movemouse ( 300, 170 )
movemouse ( 300, 205 )
movemouse ( 300, 245 )
movemouse ( 300, 285 )
movemouse ( 300, 325 )
movemouse ( 300, 360 )
movemouse ( 300, 395 )
Send("p")
Return 
Endfunc



Func tppk()
Send($TPHotKey); Send TP
Sleep(100)
Mouseclick("Right")
Send($MSHotKey); Send missles
Sleep(100)
Mousedown("Right")
Sleep(2200)
Mouseup("Right")
Sleep(100)
$coord = PixelSearch( 0, 0, 800, 600, 2697339, 4, 3 )
If Not @error Then
    Sleep(100)
     MouseClick("Left", $coord[0],  $coord[1], 1, 3 )
EndIf
If @error Then
    TrayTip ( "error", "Sorry guys, there was an error scanning for the TP. Now closing", 15 , 3 )
    EndIf
Sleep(650)
Send("p")
movemouse ( 106, 178)
movemouse ( 106, 216)
movemouse ( 106, 255)
movemouse ( 106, 291)
movemouse ( 106, 331)
movemouse ( 106, 368)
movemouse ( 106, 407)
Send("p")
Return 
EndFunc

Func chicken()
TrayTip ( "Fast TP", "Starting Fast TP", 10 , 1 )
Send($TPHotKey); Send tp
Sleep(100)
Mouseclick("Right")
Sleep(1100)
$coord = PixelSearch( 0, 0, 800, 600, 2697339, 5, 5 )
If Not @error Then
    Sleep(100)
    MouseClick("Left", $coord[0],  $coord[1], 1, 3 )
EndIf
If @error Then
    TrayTip ( "error", "Sorry guys, there was an error scanning for the TP. Now closing", 15 , 3 )
EndIf
Return 
Endfunc

Func movemouse ( $x, $y )
    $name = WinGetTitle ( "Classname=Diablo II", "")
    $pos = WinGetPos ( $name, "")
    $x = $x + $pos[0]
    $y = $y + $pos[1]
    MouseClick ( "left", $x, $y, 1, 0)
EndFunc
Edited by lolp1

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