Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

League of Legends AHK Scripts


  • Please log in to reply
19 replies to this topic
razaz03
  • Members
  • 10 posts
  • Last active: Jun 08 2013 03:53 PM
  • Joined: 09 Apr 2012

I am working on an in-game GUI overlay for Lol that will offer things like chat buttons, a dragon/baron timer, alert messages, etc.

I have written an overlay DLL that should enable you to actually overlay a customisable GUI over any D3D9 game (including LoL), and handle GUI events with an external program (in this case AHK, but it could be any language that is capable of loading a DLL and processing WM_COPYDATA messages).

Basically the DLL I have written is a framework for GUI overlay (using the CEGUI system) and I am using AHK as the scripting language to load the DLL and handle the events, and using LoL as an example game that it can be used with.

I am just doing some testing to check it works OK, then I plan to release both the DLL and the AHK script. Does this sound like it might be useful? (i.e. a GUI in-game rather than hotkeys)? Of course hotkeys can be used as well as a GUI, but I thoguht some people may also like the option of having clickable buttons on the screen.


I wrote an AHK script just now for LoL which tracks our/their blue/red camps and drake/baron with timers/progress bars etc. Simple and neat.

However, I'm struggling to use it as LoLs a d3d game and it seems to block the use of my hotkeys (despite it being Gui +always on top and myself reading over the FAQs to use those remedies, with no joy). Have you any update on this?

I'm including my script below for anyone wishing to have a fully-functional League of Legends jungle timer script. Note that you would have to change your directory for your chosen pictures and sounds!

;By Sir Coitus Maximus, Q4 2012
#NoEnv
SetWorkingDir , %A_ScriptDir%
;#NoTrayIcon

SendMode, Play

CustomColor = 000000
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, Color, %CustomColor%
Gui, Font, s12, Lucida Console
Gui, Add, Progress, Range-0-299 x112 x2 y0 w15 h90 cBlue +Vertical vOurBlueProgress
Gui, Add, Picture, x17 y0 w90 h90  , X:\work\autohotkey\lol\Squirtle2.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vOurBlueTime, unset
Gui, Add, Progress, Range-0-299 x112 y0 w15 h90 cBlue +Vertical vOurRedProgress
Gui, Add, Picture, x127 y0 w90 h90 , X:\work\autohotkey\lol\charmander.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vOurRedTime, unset
Gui, Add, Progress, Range-0-359 x252 y0 w15 h90 cGreen +Vertical vDrakeProgress
Gui, Add, Picture, x267 y0 w90 h90 , X:\work\autohotkey\lol\dragon.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vDrakeTime, unset
Gui, Add, Progress, Range-0-419 x362 y0 w15 h90 cGreen +Vertical vBaronProgress
Gui, Add, Picture, x377 y0 w90 h90 , X:\work\autohotkey\lol\baron.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vBaronTime, unset
Gui, Add, Progress, Range-0-299 x502 y0 w15 h90 cRed +Vertical vTheirBlueProgress
Gui, Add, Picture, x517 y0 w90 h90 , X:\work\autohotkey\lol\Squirtle2.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vTheirBlueTime, unset
Gui, Add, Progress, Range-0-299 x612 y0 w15 h90 cRed +Vertical vTheirRedProgress
Gui, Add, Picture, x627 y0 w90 h90 , X:\work\autohotkey\lol\charmander.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vTheirRedTime, unset
WinSet, TransColor, %CustomColor% 230
Gui, Show, w738 h115 xCenter Y0
return

Numpad1::
loop1_limit = 300
settimer, loop1, 1000

loop1:
loop1_count++
timer1_count := 301 - loop1_count
if (loop1_count > loop1_limit) {
   settimer, loop1, off
   soundplay, X:\audacity projects\lol\loltimer_data\ourblue.mp3
   loop1_count := 0
   GuiControl,, OurBlueProgress, 0
}
else
   GuiControl,, OurBlueProgress, %loop1_count%
   GuiControl,, OurBlueTime, %timer1_count%
return

Numpad2::
loop2_limit = 300
settimer, loop2, 1000

loop2:
loop2_count++
timer2_count := 301 - loop2_count
if (loop2_count >= loop2_limit) {
   settimer, loop2, off
   soundplay, X:\audacity projects\lol\loltimer_data\ourred.mp3
   loop2_count := 0
   GuiControl,, OurRedProgress, 0
}
else
   GuiControl,, OurRedProgress, %loop2_count%
   GuiControl,, OurRedTime, %timer2_count%
return

Numpad4::
loop3_limit = 360
settimer, loop3, 1000

loop3:
loop3_count++
timer3_count := 361 - loop3_count
if (loop3_count >= loop3_limit) {
   settimer, loop3, off
   soundplay, X:\audacity projects\lol\loltimer_data\drake.mp3
   loop3_count := 0
   GuiControl,, DrakeProgress, 0
}      
else
   GuiControl,, DrakeProgress, %loop3_count%
   GuiControl,, DrakeTime, %timer3_count%
return

Numpad5::
loop4_limit = 420
settimer, loop4, 1000

loop4:
loop4_count++
timer4_count := 421 - loop4_count
if (loop4_count >= loop4_limit) {
   settimer, loop4, off
   soundplay, X:\audacity projects\lol\loltimer_data\baron.mp3
   loop4_count := 0
   GuiControl,, BaronProgress, 0
}     
else
   GuiControl,, BaronProgress, %loop4_count%
   GuiControl,, BaronTime, %timer4_count%
return

Numpad7::
loop5_limit = 300
settimer, loop5, 1000

loop5:
loop5_count++
timer5_count := 301 - loop5_count
if (loop5_count >= loop5_limit) {
   settimer, loop5, off
   soundplay, X:\audacity projects\lol\loltimer_data\theirblue.mp3
   loop5_count := 0
   GuiControl,, TheirBlueProgress, 0
}     
else
   GuiControl,, TheirBlueProgress, %loop5_count%
   GuiControl,, TheirBlueTime, %timer5_count%
return

Numpad8::
loop6_limit = 300
settimer, loop6, 1000

loop6:
loop6_count++
timer6_count := 301 - loop6_count
if (loop6_count >= loop6_limit) {
   settimer, loop6, off
   soundplay, X:\audacity projects\lol\loltimer_data\theirred.mp3
   loop6_count := 0
   GuiControl,, TheirRedProgress, 0
}     
else
   GuiControl,, TheirRedProgress, %loop6_count%
   GuiControl,, TheirRedTime, %timer6_count%
return

GuiClose:
ExitApp


  • Guests
  • Last active:
  • Joined: --
hi can you link the "mp3"s and the "png"s

thank you

Wickster
  • Members
  • 97 posts
  • Last active: Jun 03 2019 03:24 AM
  • Joined: 12 Jan 2013

it wont let me use this in game, it will but i have to click it then hit the numberpad 1 or whatever, i cant just hit the numberpad..... really dumb if i cant, or am i doing something wrong ? would like some help pls and ty



Wickster
  • Members
  • 97 posts
  • Last active: Jun 03 2019 03:24 AM
  • Joined: 12 Jan 2013

Hey I just wanted to let everyone know that I fixed the code and updated it. AND I will include the sounds and pictures I used. Thanks to the original code to Razaz03!

 

pokemonleaguebuffs.png

 

 

 

 

 

Download:669kb

http://www.mediafire...l34ru2d2idld1b0

 

 

 

_______________________________________________________________________________________________________________________________________

 

 

 

 

 

Controls =       Numberpad 1, Blue Buff

                      Numberpad 2, Red Buff

                      Numberpad 4, Dragon

                      Numberpad 5, Baron Buff

 

 

 

 

The code itself without pictures:

 

https://ahknet.autoh...m/paste/1angmlj

 

 

If you wish to move the Gui instead of where I have it mess with line 38 in the code reads like this:

Gui, Show, w738 h115 x0 Y100

X and Y is all you have to change to get it where you want dont mess with W or H

 

_____________________________________________________________________________________________________________________

 

 

If you want the progress buttons for the other teams blue and red which I have removed add:


Gui, Add, Progress, Range-0-299 x502 y0 w15 h90 cRed +Vertical vTheirBlueProgress
Gui, Add, Picture, x517 y0 w90 h90 , %A_ScriptDir%\changethistoyourpicture.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vTheirBlueTime, unset

Gui, Add, Progress, Range-0-299 x612 y0 w15 h90 cRed +Vertical vTheirRedProgress
Gui, Add, Picture, x627 y0 w90 h90 , %A_ScriptDir%\changethistoyourpicture.png
Gui, Add, Text, y+3 w90 h20 cWhite +Center vTheirRedTime, unset

Make sure its UNDER line 35!

 

 

 

and also add:


Numpad7::
loop5_limit = 300
settimer, loop5, 1000

loop5:
loop5_count++
timer5_count := 301 - loop5_count
if (loop5_count >= loop5_limit) {
settimer, loop5, off
soundplay, %A_ScriptDir%\Changethistoyoursound.mp3
loop5_count := 0
GuiControl,, TheirBlueProgress, 0
}
else
GuiControl,, TheirBlueProgress, %loop5_count%
GuiControl,, TheirBlueTime, %timer5_count%
return

Numpad8::
loop6_limit = 300
settimer, loop6, 1000

loop6:
loop6_count++
timer6_count := 301 - loop6_count
if (loop6_count >= loop6_limit) {
settimer, loop6, off
soundplay, %A_ScriptDir%\Changethistoyoursound.mp3
loop6_count := 0
GuiControl,, TheirRedProgress, 0
}
else
GuiControl,, TheirRedProgress, %loop6_count%
GuiControl,, TheirRedTime, %timer6_count%

Make sure its UNDER line 112!

____________________________________________________________________________________________________________________________

 

 

WARNING!

 

Make sure you change the picture and sound if you want the timers I removed, you will have to supply your own sounds and pictures! I made it to where the script works out of the same folder. So just place the picture and sounds you want in the same folder as the script then change the coding to the pictures and sounds you have!



MarcusGamingFTW
  • Members
  • 1 posts
  • Last active: Dec 12 2014 10:17 AM
  • Joined: 12 Dec 2014

Can i edit the script to make the keys say what i wanna say and how