Advertisement
Guest User

Untitled

a guest
Feb 27th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  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 cfg folder, autoexec.cfg
  14. Menu, tray, add, Exit
  15. ;Menu, Tray, Icon, %A_ScriptDir%\%A_ScriptName%,1,1
  16.  
  17. Version=v1.2
  18. IniRead, RunAtStart, %A_MyDocuments%\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_MyDocuments%\d2a.ini, Config, Accepter, F11
  27. IniRead, rageq, %A_MyDocuments%\d2a.ini, Config, RageQuit, !F4
  28.  
  29. IniRead, PosX, %A_MyDocuments%\d2a.ini, Config, Custom PosX, %A_Space%
  30. IniRead, PosY, %A_MyDocuments%\d2a.ini, Config, Custom PosY, %A_Space%
  31. IniRead, AcceptMethod, %A_MyDocuments%\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*.5
  54. } else {
  55. x:=PosX
  56. }
  57. if (!PosY){
  58. y:=A_ScreenHeight*.4907
  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, Destroy
  91. gui, font, s10 w500
  92.  
  93. Gui, Add, Hotkey, vaccepter x5 y5 w50 h20 , %accepter%
  94. Gui, Add, Text, x60 y5, to activate/deactivate Dota2 Accepter
  95. Gui, Add, Hotkey, vrageq x5 y30 w50 h20 , %rageq%
  96. Gui, Add, Text, x60 y30, to RageQuit
  97.  
  98. Gui, Add, Edit, vNewPosX x5 y55 w50 h20 , %PosX%
  99. Gui, Add, Text, x60 y55, Position X*
  100. Gui, Add, Edit, vNewPosY x5 y80 w50 h20 , %PosY%
  101. Gui, Add, Text, x60 y80, Position Y*
  102. Gui, Add, Text, x5 y100, *Position in pixels where to click. Leave blank for default. Used for clicker method.
  103.  
  104. Gui, Add, Text, x5 y140, Every 2 seconds produce:
  105. Gui, Add, Radio, x5 y160 altsubmit vAcceptMethod Checked%AcceptMethod1%, Enter Press
  106. Gui, Add, Radio, x5 y180 altsubmit Checked%AcceptMethod2%, Mouse Click
  107. gui, Add, checkbox, Checked%RunatStart% vRunatStart x5 y210, Run tool at startup
  108.  
  109. Gui, Add, Button, gsaveconfig x3 y230 w354 h30,Save
  110.  
  111. Gui, Show, w360 h260,Dota2 Accepter Config
  112. return
  113.  
  114.  
  115.  
  116. saveconfig:
  117. gui, submit
  118. IniWrite,%accepter%, %A_MyDocuments%\d2a.ini, Config, Accepter
  119. IniWrite,%rageq%, %A_MyDocuments%\d2a.ini, Config, RageQuit
  120. IniWrite, %RunatStart%, %A_MyDocuments%\d2a.ini, Config, RunatStart
  121. IniWrite,%NewPosX%, %A_MyDocuments%\d2a.ini, Config, Custom PosX
  122. IniWrite,%NewPosY%, %A_MyDocuments%\d2a.ini, Config, Custom PosY
  123. IniWrite,%AcceptMethod%, %A_MyDocuments%\d2a.ini, Config, AcceptMethod
  124. if RunAtStart {
  125. FileCreateShortcut , %A_ScriptDir%\%A_ScriptName%, %A_Startup%\D2A.lnk
  126. } else{
  127. IfExist %A_Startup%\D2A.lnk
  128. FileDelete, %A_Startup%\D2A.lnk
  129. }
  130. reload
  131. return
  132.  
  133. RQ:
  134. Process,Close,dota.exe
  135. Process,Close,dota2.exe
  136. return
  137.  
  138. GuiEscape:
  139. GuiClose:
  140. gui, destroy
  141. return
  142.  
  143. Exit:
  144. ExitApp
  145. return
  146.  
  147. About:
  148. Run http://auct.eu/d2a/
  149. return
  150.  
  151. Rosh:
  152. 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
  153. return
  154.  
  155. SteamIdFinder:
  156. FileRead, Contents, %SteamPath%\logs\connection_log.txt
  157. StringGetPos, pos, Contents,ConnectionCompleted(),R,1
  158. FoundPos := RegExMatch(Contents, "(?<=\[U:\d:)(\d+)(?=\] 'OK')", SteamID, pos)
  159. Run https://steamid.xyz/%SteamID%
  160. return
  161.  
  162. Dotabuff:
  163. FileRead, Contents, %SteamPath%\logs\connection_log.txt
  164. StringGetPos, pos, Contents,ConnectionCompleted(),R,1
  165. FoundPos := RegExMatch(Contents, "(?<=\[U:\d:)(\d+)(?=\] 'OK')", SteamID, pos)
  166. Run http://www.dotabuff.com/players/%SteamID%
  167. return
  168.  
  169. autoexec.cfg:
  170. ;FileAppend, , %SteamPath%\steamapps\common\dota 2 beta\game\dota\cfg\autoexec.cfg
  171. ;Run, Notepad.exe %SteamPath%\steamapps\common\dota 2 beta\game\dota\cfg\autoexec.cfg
  172. Run, Explore %SteamPath%/steamapps/common/dota 2 beta/game/dota/cfg
  173. return
  174.  
  175.  
  176. UpdateCheck:
  177. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement