Skip to content

Commit 6697879

Browse files
committed
D2A v1.1
1 parent 41279e2 commit 6697879

File tree

2 files changed

+183
-91
lines changed

2 files changed

+183
-91
lines changed

Dota2 Accepter v1.1.ahk

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
#SingleInstance force
2+
Menu, tray, NoStandard
3+
Menu, tray, add, Config
4+
Menu, tray, Default, Config
5+
Menu, tray, add, About
6+
Menu, tray, add, Check update, UpdateCheck
7+
Menu, tray, add
8+
Menu, tray, add, SteamIdFinder
9+
Menu, tray, add, Dotabuff
10+
Menu, tray, add
11+
Menu, tray, add, Rosh, Rosh
12+
Menu, tray, add
13+
Menu, tray, add, Open autoexec.cfg, autoexec.cfg
14+
Menu, tray, add, Exit
15+
;Menu, Tray, Icon, %A_ScriptDir%\%A_ScriptName%,1,1
16+
17+
Version=v1.1
18+
IniRead, RunAtStart, %A_temp%\d2a.ini, Config, RunAtStart, 0
19+
if RunAtStart {
20+
FileCreateShortcut , %A_ScriptDir%\%A_ScriptName%, %A_Startup%\D2A.lnk
21+
} else{
22+
IfExist %A_Startup%\D2A.lnk
23+
FileDelete, %A_Startup%\D2A.lnk
24+
}
25+
26+
IniRead, accepter, %A_temp%\d2a.ini, Config, Accepter, F11
27+
IniRead, rageq, %A_temp%\d2a.ini, Config, RageQuit, !F4
28+
29+
IniRead, PosX, %A_temp%\d2a.ini, Config, Custom PosX, %A_Space%
30+
IniRead, PosY, %A_temp%\d2a.ini, Config, Custom PosY, %A_Space%
31+
IniRead, AcceptMethod, %A_temp%\d2a.ini, Config, AcceptMethod, 1
32+
33+
if (AcceptMethod==1){
34+
AcceptMethod1:=1
35+
AcceptMethod2:=0
36+
}else {
37+
AcceptMethod1:=0
38+
AcceptMethod2:=1
39+
}
40+
41+
42+
RegRead, SteamPath, HKEY_CURRENT_USER, Software\Valve\Steam, SteamPath
43+
44+
Hotkey,%accepter%, accept
45+
Hotkey,%rageq%, RQ
46+
return
47+
48+
accept:
49+
gojoin:=!gojoin
50+
if gojoin
51+
{
52+
if (!PosX){
53+
x:=A_ScreenWidth*.4
54+
} else {
55+
x:=PosX
56+
}
57+
if (!PosY){
58+
y:=A_ScreenHeight*.497
59+
} else {
60+
y:=PosY
61+
}
62+
63+
gosub, Accepter
64+
sleep 100
65+
SetTimer, Accepter, 2012
66+
}
67+
else
68+
{
69+
ToolTip
70+
SetTimer, Accepter, off
71+
}
72+
return
73+
74+
Accepter:
75+
ifWinActive,Dota 2
76+
{
77+
78+
ToolTip, Dota2 Accepter is active`nPress %accepter% to deactivate
79+
if (AcceptMethod==1){
80+
send {vk0D}
81+
}else {
82+
MouseMove,x,y
83+
sleep,1
84+
Click
85+
}
86+
}
87+
return
88+
89+
Config:
90+
gui, font, s10 w500
91+
92+
Gui, Add, Hotkey, vaccepter x5 y5 w50 h20 , %accepter%
93+
Gui, Add, Text, x60 y5, to activate/deactivate Dota2 Accepter
94+
Gui, Add, Hotkey, vrageq x5 y30 w50 h20 , %rageq%
95+
Gui, Add, Text, x60 y30, to RageQuit
96+
97+
Gui, Add, Edit, vNewPosX x5 y55 w50 h20 , %PosX%
98+
Gui, Add, Text, x60 y55, Position X*
99+
Gui, Add, Edit, vNewPosY x5 y80 w50 h20 , %PosY%
100+
Gui, Add, Text, x60 y80, Position Y*
101+
Gui, Add, Text, x5 y100, *Position in pixels where to click. Leave blank for default. Used for clicker method.
102+
103+
Gui, Add, Text, x5 y140, Every 2 seconds produce:
104+
Gui, Add, Radio, x5 y160 altsubmit vAcceptMethod Checked%AcceptMethod1%, Enter Press
105+
Gui, Add, Radio, x5 y180 altsubmit Checked%AcceptMethod2%, Mouse Click
106+
gui, Add, checkbox, Checked%RunatStart% vRunatStart x5 y210, Run tool at startup
107+
108+
Gui, Add, Button, gsaveconfig x3 y230 w354 h30,Save
109+
110+
Gui, Show, w360 h260,Dota2 Accepter Config
111+
return
112+
113+
114+
115+
saveconfig:
116+
gui, submit
117+
IniWrite,%accepter%, %A_temp%\d2a.ini, Config, Accepter
118+
IniWrite,%rageq%, %A_temp%\d2a.ini, Config, RageQuit
119+
IniWrite, %RunatStart%, %A_temp%\d2a.ini, Config, RunatStart
120+
IniWrite,%NewPosX%, %A_temp%\d2a.ini, Config, Custom PosX
121+
IniWrite,%NewPosY%, %A_temp%\d2a.ini, Config, Custom PosY
122+
IniWrite,%AcceptMethod%, %A_temp%\d2a.ini, Config, AcceptMethod
123+
if RunAtStart {
124+
FileCreateShortcut , %A_ScriptDir%\%A_ScriptName%, %A_Startup%\D2A.lnk
125+
} else{
126+
IfExist %A_Startup%\D2A.lnk
127+
FileDelete, %A_Startup%\D2A.lnk
128+
}
129+
reload
130+
return
131+
132+
RQ:
133+
Process,Close,dota.exe
134+
Process,Close,dota2.exe
135+
return
136+
137+
GuiEscape:
138+
GuiClose:
139+
gui, destroy
140+
return
141+
142+
Exit:
143+
ExitApp
144+
return
145+
146+
About:
147+
Run http://auct.eu/d2a/
148+
return
149+
150+
Rosh:
151+
MsgBox 64, Rosh Notifier, Alt+click the clock in game!`nRosh respawns after a random time between 8-11 minutes`nAegis is removed after 5 minutes
152+
return
153+
154+
SteamIdFinder:
155+
FileRead, Contents, %SteamPath%\logs\connection_log.txt
156+
FoundPos := RegExMatch(Contents, "(?<=\[U:\d:)(\d+)(?=\] 'OK')", SteamID, -1200)
157+
Run https://steamid.xyz/%SteamID%
158+
return
159+
160+
Dotabuff:
161+
FileRead, Contents, %SteamPath%\logs\connection_log.txt
162+
FoundPos := RegExMatch(Contents, "(?<=\[U:\d:)(\d+)(?=\] 'OK')", SteamID, -1200)
163+
Run http://www.dotabuff.com/players/%SteamID%
164+
return
165+
166+
autoexec.cfg:
167+
Run, Notepad.exe %SteamPath%/SteamApps/common/dota 2 beta/dota/cfg/autoexec.cfg
168+
return
169+
170+
171+
UpdateCheck:
172+
UrlDownloadToFile, https://dl.dropboxusercontent.com/u/45755423/D2A/latestD2A.html, %A_Temp%\latestD2A.html
173+
FileReadLine, NetVer, %A_Temp%\latestD2A.html, 1
174+
If (Version <> NetVer)
175+
{
176+
;MsgBox, 4,Check for update, %NetVer% is available! `nWould you like to download new version?
177+
MsgBox 68, Update is available , Dota 2 Accepter %NetVer% is available! `nWould you like to download new version?,5
178+
IfMsgBox Yes
179+
run, http://auct.eu/d2a/
180+
}
181+
else
182+
MsgBox 64, Info ,Your Dota 2 Accepter is up to date!,2
183+
return

Dota2 Accepter.ahk

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)