[Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

View previous topic View next topic Go down

[Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by Niiky on Thu Jan 29, 2015 7:47 am

Hello!

Well, first excuse me if my english is quite bad but is understandable..

I don't know if there are an applications to do those things but I made this script to help me in my playing, and I decided to release it to the forums of the mod I'm playing! I hope you people to enjoy this script Smile let's start..

Features

  • Reveal the map of your current Diablo II instance with one key
  • Reveal the map of ALL of your Diablo II instances with hold down the same key
  • Launch another Diablo II instance with one key
  • Make your current Diablo II instance windowed or fullscreen with one key
  • Auto-Gambling amulets/rings/belts (I know this is a feature of d2clicker, but afaik auto-gambling doesn't work for multiplayer) Also this feature will be for more uses than for gambling, it's up to the user to discover new options for this feature
  • Launch Diablo 2 Clicker on the background (hide) with one click
  • Launch Diablo 2 Stats Reader with one click


Requeriments

  • AutoHotkey a powerful application for make macros and automated things, also you will need to turn the script into an .exe
  • D2SE ModManager (Only if you want multiple instances and windowed feature in one key)
  • D2MR Maphack
  • D2Clicker
  • D2StatsReader


NOTE: I did the script on Windows 7 SP1 x64 on a 1920x1080 resolution, the mouse coordinates probably works well for everyone, if not I gonna show you how to change it.

The Script!

Installation

You need glide for windowed options&window extras ..

Install AutoHotkey for change hotkeys to your preference.
Download the script: http://www48.zippyshare.com/v/8ekZPgtC/file.html
Virus-Scan:
https://www.virustotal.com/en/file/7566a6aeb60cd064152587f52f52605a4e977d00fdf0446368d52044a4af1c06/analysis/1422512863/
SHA256: 7566a6aeb60cd064152587f52f52605a4e977d00fdf0446368d52044a4af1c06

Ok now open the .zip file. You will see 5 files

Launcher.ahk == The main script, this script will launch everything, D2SE, D2 MapHack..etc
Clicker.ahk == This is the auto-gamble script. AKA clicker because maybe you can find more uses than for gamble
Windowed.txt == File for put your D2 into a window mode
Fullscreen.txt == File for put your D2 into a fullscreen mode
Wextras.txt == File for disable the glide option: window extras (Go configuration to see what is this)

>>>Put the above files into diablo 2 folder<<<

How to use

When you have your prefered hotkeys, right click on the .ahk and click compile. You can start it using the .ahk if you dont want the .exe but is no sense ^^ .exe is fastest and less cpu usage. (Some antivirus can detect a false-positive on the .exe when you compile it, because it's an "automation application"

COMPILE IT! Or you will must replace where it says Launcher.exe to Launcher.ahk and Clicker.exe to Clicker.ahk

Now, easy, just launch it and D2SE.exe will launch, d2mr.exe aswell in hide, and don't worry, every application you open, like d2clicker, autogambling etc.. will close automatically if your close your game.

The Default Hotkeys

Pause= Reveals the map of your current diablo 2 instance. (Without need of change to desktop)
Hold down Pause (2second or so) = Reveals the map of all your diablo 2 instances.
ScrollLock = Launch another Diablo 2
PageUp = Window your current Diablo 2 Instantly if you are playing in a game (If you are in menus you can't see the changes until you enter a game)
PageDown = Fullscreen your current Diablo 2 (If you are in menus you can't see the changes until you enter a game)
Home = Remove the window extras (The white border, you need it for resize your window and move it)
End = Start the Auto-Gambling Script (Clicker.exe)
Insert =Start Diablo 2 Stats Reader
Delete = Start Diablo 2 Clicker
Hold down Delete (2second or so) = Close Diablo 2 Clicker

Auto-Gambling Hotkeys

F1= Record
F2= Play
F3= Stop
F4= Delete all recorded data
F5= Save into a file
F6= Open a file

If you want to change the default hotkey and you are a newbie in autohotkey, then keep reading.

Configuration

Edit the Launcher.ahk file with any text editor like notepad, for change hotkeys etc..

Path's

D2SE.exe, d2mr.exe, Clicker.exe, d2clicker.exe, D2Stats_30_08_2013.exe .. every application that this script will run, must be in the Diablo 2 Folder

For who don't use D2SE
If you dont have D2SE and don't want to use the multiple instances feature & windowed, you can remove those lines if you want: 12 to 16, 56 to 71

Changing Hotkeys

Configure the hotkeys you want, I choose Pause, ScrollLock, PageUp and PageDown because works well for me, but choose whatever you want, this is a list of keys and this

Hotkeys are on line 42, 56, 60, 66, 72, 78, 82, 86 .. ALL HOTKEYS are those lines that end with "::" For example line 42 is the hotkey for the MapHack ... Pause:: means the button pause is my hotkey, you can use everything you want, for F1 will be F1:: for B key will be b:: for ctrl+b will be ^b:: easy right??

Modifiers for control, shift etc.. : ! = Alt ^ = Control + = Shift

For use custom keys, like gaming keybords, simply.. launch the script, (yourscript.ahk) alt+tab when D2 popup and go back to desktop, go taskbar and double-click the green "H" icon, on the menus, click on view > key history and script info
Now press the key you want, and press F5 to reload, there is a column called SC and every key has 3 digits, like 039 for SPACE, remember those 3 digits of your special key. The hotkey on the script will be SC039::

Changing Mouse Cordinates

This is only in case the default coordinates didn't work for your computer/resolution.

Go AutoHotkey folder (C:\Program Files\AutoHotkey) and open AU3_Spy.exe
Edit the Launcher.ahk with notepad in line 8, remove the ,, Hide at the end, save it and launch.
Diablo 2 will open now, alt+tab to desktop and you will see the D2MapHack in the upper left corner, don't move it!

Now move your mouse to the D2MR, click on it, just to make it an active window. Move your mouse to where your Diablo 2 Registry appears See the image if you want multiple instances to be revealed be sure your mouse is like mine, in the middle of the "D", and watch the AU3_Spy.exe, you will see: On Screen: XXX, YYY
Of course, XXX and YYY will be your coords, copy those coords to line 52. For example if your coords are 73, 90 Your 52 line will be like this: ControlClick, x73 y90, ahk_class D2MR.. Do the same for the reveal button and put the coords in the line 53.

You have your coords ready! If you press your hotkey for reveal the map once, it will reveal your active diablo 2, if you hold down your hotkey, all instances of diablo 2 will be revealed, you can add more instances for reveal in the script.

The coords must be inside the if bracket.
This will reveal 2 instances of Diablo 2, actual and other, if you hold down the pause key, and only the actual instance if you don't hold down it, just press once.
Code:
Pause::
KeyWait,% a_thishotkey, T1
if(ErrorLevel)
{
   ControlClick, x60 y87, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
   ControlClick, x60 y104, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
}
else
   ControlClick, x60 y87, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
Return

To add more instances, copy the last 2 lines, paste them again inside the if bracket, you dont need to do the AU3_Spy again if you take the coords as I said above, just add +16 to the Y Example: y87 and y104 will be an actual diablo 2 and other instance, then sum 16 to 104 = 120.
Code:
Pause::
KeyWait,% a_thishotkey, T1
if(ErrorLevel)
{
   ControlClick, x60 y87, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
   ControlClick, x60 y104, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
}
else
   ControlClick, x60 y87, ahk_class D2MR
   ControlClick, x43 y337, ahk_class D2MR
Return

About Windowed..

With a single click you can put your actual diablo 2 into a window, and undo it with a single key too.
This only works with D2SE and Glide
Also, the windowed mode, don't have the minimize, maximize and close buttons, also is unamovible, that's the why you will se a white border in your diablo 2, that's the "windows extras" option from Glide.
You can resize the window clicking that white border, also for move it, click the white top border and move it where you want.

To work it well you need to setup first in your D2SE to run with fullscreen, then ingame click the hotkey to put it windowed. If you accostume to play windowed, and you want to show fullscreen it won't work very well, you must re-enter a game too see the changes, but It render it instantly for fullscreen to windowed mode.

And why is that? That's because D2SE don't use command line to execute your options, keeps the information for himself, so it's impossible to change unless you change the registry (We doing this)

I'll put everything you need in the .zip you downloaded before but I show you how to do it from the scratch if you prefer.

Create two text files, windowed.txt and fullscreen.txt

windowed.txt content
Code:

HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
"windowed"=REG_DWORD 00000001
"windowextras"=REG_DWORD 00000001
HKEY_CURRENT_USER\Software\GLIDE3toOpenGL [2]

fullscreen.txt content
Code:

HKEY_CURRENT_USER\Software\GLIDE3toOpenGL [1]
HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
"windowed"=REG_DWORD 00000000
"windowextras"=REG_DWORD 00000000

Now you just need to click the hotkey!

OPTIONAL SHOW/HIDE THE WHITE BORDER

After you resize your window and move it to wherever you want and don't wanna see the white shit, just create a new text file called wextras.txt (included in the .zip too)

THIS IS ALREADY IN THE SCRIPT, YOU DONT NEED TO DO IT

wextras.txt content
Code:
HKEY_CURRENT_USER\Software\GLIDE3toOpenGL [1]
HKEY_CURRENT_USER\Software\GLIDE3toOpenGL
"windowextras"=REG_DWORD 00000000
HKEY_CURRENT_USER\Software\GLIDE3toOpenGL [2]

Edit Launcher.ahk and add after the fullscreen instruction at the line 70
Code:
Home::
Run, regini.exe wextras.txt,,Hide
WinMinimize, ahk_class Diablo II
WinRestore, ahk_class Diablo II
return

Only works if the first mode selected is fullscreen, as I said above.

D2Clicker & D2Stats

Hotkey for D2Stats = On line 82
Hotkey for D2Clicker = On line 86

I used Insert for D2Stats and Delete for D2Clicker.

Care For me at least.. d2clicker is dangerous, sometimes my explorer.exe goes crazy, another times I need to restart.. so I did the following
A single key press = Launch d2clicker.exe on the background, desktop won't popup if you are playing.
Press it for 1second or more = Close d2clicker.exe and show a message box that tells you d2clicker was successfuly closed. (PLEASE DON'T REMOVE THE MSGBOX FROM THE CODE! for your own safety...)

Auto-Gambling // Auto-Clicker

Ok auto-gambling // auto-clicker is on the Clicker.ahk, don't try to join the files.

The hotkey to open the gambling script is End, but you can change it on Line 78 of the Launcher.ahk

Edit clicker.ahk with some edit program such as notepad.

HOTKEYS

F1 = Record -- Line 13
F2 = Play SPACE = Stop the play -- Line 18 for start it || Line 23 to stop it
F3 = Stop -- Line 15
F4 = Remove all recorded-- Line 15
F5 = Save into a file -- Line 16
F6 = Open -- Line 17

How it works? Same as d2clicker but with another hotkeys, for don't mess it.

Press F1 to record when you are near to Gheed (same as on d2clicker video)
Click on it, click on gamble, right-click in to the amulet/ring/belt, close it.

Fast, after close the gambling panel, click to F2 to start the auto-gambling, press Space for stop it (NOTE: Sometimes you need to hold down the key for like 0.5 seconds)

OMG! Doesn't work, you scammer! Edit clicker.ahk and go line 135, you will se: sleep 15 change this value to high value, if your character runs instead of gamble.
15 Works for me in GS1 with 98ms, but I can't sure it if it gonna work for you.

Save feature is useless for gambling, but maybe you want to keep the lines in the code if you discover any other use, like crafting or something like that.

Disclaimer

I did this script with noob experience with AutoHotkey, I'm not a pro. The Gambling script I take it from somewhere in the network as mouse macro recorder, so don't request me a roflcustomization. You can request pro help in those forums: Official Forums - Unofficial Forums

I think that's it.. if I'm forgetting something let me know Smile

Enjoy! or not Cookie monster

Niiky
Fallen One

Posts : 2
Country : United Kingdom

View user profile

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by taem on Thu Jan 29, 2015 9:21 am

Interesting. I never thought of making a script with AHK for a game like this. I thought of using AHK for cookie clicker and clicker heroes, but not d2, lol. I can see how screen resolution would mess up your settings since you're using scripting. On a related note, I wonder how d2clicker works... does it grab the screen ID or does it read the packet ID's? Regardless of how d2clicker works, I'm willing to bet you could devise AHK to run script to sniff out the packets and not even have to worry about screen res. Just a thought. But this assumes packets are sent even in sp... now I really want to know how d2clicker works, lol Laughing !

taem
Dark Nephalem

Posts : 2946
Country : United States

View user profile https://sites.google.com/site/monkeymeatsauce/

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by Niiky on Thu Jan 29, 2015 6:05 pm

I use AHK for all my games Razz I don't understand what you mean with resolution mess up?

I don't understand d2clicker.. my programation skills are 0. But I think needs polish the core and something, because it makes a lot of desktop crashes.

Niiky
Fallen One

Posts : 2
Country : United Kingdom

View user profile

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by whist on Fri Jan 30, 2015 12:01 am

@taem wrote:But this assumes packets are sent even in sp...

They are. The single player mode is a kind of simulated server<->client environment, except your machine act both as the server and the client. It basically just sends the packet to itself in other words. I haven't got far enough into the server<->client communication code to tell you whether the communication process is the same, but I can tell for sure the game still uses the D2GS packets in single player.

whist
Nihlathak

Huehuehue™
Posts : 3927
Country : Canada

View user profile

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by Quirinus on Fri Jan 30, 2015 2:08 am

Nice. Smile

Though it would be better if it was in AutoIt, considering it's a very similar program, but vastly superior to AHK.

_____________________
"Zu jeder Zeit, an jedem Ort, bleibt das Tun der Menschen das gleiche."

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by Will on Fri Jan 30, 2015 2:13 am

Wish I had the time to understand the differences b/w this and autoclicker... looks ok for gamble without macro.

Will
Talic

Mr. Generosity/Former Forumer & Freak :)
Posts : 3859
TGBest Transferred
Country : Armenia

View user profile http://medianxl.net

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by looney-toons on Sun Feb 01, 2015 12:17 am

will this tool work with older versions of UMXL v6b?

looney-toons
Living Flame

Posts : 153
Country : United States

View user profile

Back to top Go down

Re: [Release] Diablo II Easy Launcher Script -- Map Reveal in a click, Multiple Instances, Auto-Gambling, Window your current D2...

Post by Denshii on Sun Feb 01, 2015 1:47 am

oh i hate that AHK's in Ragnarok rpgmmo all use that fucking ahk for auto pocs and spam for skills that's one reason why i fly of the servers .__.

Denshii
Blood Stone

Posts : 201
Country : Chile

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum