Zed automated combo (League Of Legends)

Post gaming related scripts
User avatar
17kimv
Posts: 35
Joined: 21 Dec 2015, 20:15

Zed automated combo (League Of Legends)

30 Mar 2016, 05:52

Hello, before I start I want to say that my English is not that good so please point out all grammatical mistakes I make, thank you.

Alright! So this is my script for a champion Zed in game "league of legends", all it does is that it finds enemy's health bar and then moves down and to the right, then it sends out the shadow (w ability), then it does the slash (e ability), and then finds the enemy position again, then throws the shurikens (q ability). It will only do so if it finds the enemy. It is bind to forward button on the mouse. Also it needs to have 1920x1080 resolution, so all people with square monitors, I am sorry but I am not sure if it will work (to be honest if you are here you can probably change it).

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



link to the health image(just place in the same folder as the code) :
https://www.dropbox.com/s/j0041hgkf8syu ... h.png?dl=0
Look MA! I am a programmer! :superhappy:
_3D_
Posts: 139
Joined: 29 Jan 2014, 14:40

Re: Zed automated combo (League Of Legends)

01 May 2016, 08:11

Hi 17kimv
Your post became starting point for learning script language with my students. (There no faster way to take focus of yang brain like game.)
I never play League of Legend - so my comments possibly will be curios.
Comment 1:

Code: [Select all] [Download] GeSHi © Codebox Plus

ImageSearch, x, y, 0, 0, 1920, 1080, health.png
;1920, 1080 throw script to be used in only this resolution
ImageSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, health.png
;Any resolution is possible

Comment 2: In second ImageSearch

Code: [Select all] [Download] GeSHi © Codebox Plus

ImageSearch, X, Y, 0, 0, 1920, 1080, health.png
;Here no IF ErrorLevel check that make ImageSearch nonsense
;The code below will be executed no matter of ImageSearch result and if FAIL x and y became ""
;I think that code must depends from ErrorLevel
xa := x+42
ya := y+100
mousemove, %xa%, %ya%, 0

Comment 3: It is known like DRY (Don`t Repeat Yourself) principle.

Code: [Select all] [Download] GeSHi © Codebox Plus

send, {w down}
sleep 100
send, {w up}
;Here 3 times used this construction
It is better to be made function that will repeat the same code with low mistakes.

Code: [Select all] [Download] GeSHi © Codebox Plus

slowSend(key, wait) {
send {%key% down}
sleep %wait%
send {%key% up}
}

The result in my opinion:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Please test the code and comment it.
Thanks in advance.
Edit:
In connection of https://autohotkey.com/board/topic/93246-ingame-scripts-howto/#entry587806

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

AHKv2.0 use the future now.
akumetsu
Posts: 5
Joined: 25 May 2016, 13:13
GitHub: devakumetsu

Re: Zed automated combo (League Of Legends)

23 Feb 2017, 13:52

@_3d_ really a good script, but failed in the execution to the target.
NPDropshot
Posts: 6
Joined: 10 Apr 2017, 13:17

Re: Zed automated combo (League Of Legends)

10 Apr 2017, 16:11

So question , would like to try this out , but i dont know what "forward" button on the mouse is. it shows if i'm not mistaken x button 2 , but idk what that is. tried to change it to t but no luck.
wombatt

Re: Zed automated combo (League Of Legends)

20 Oct 2017, 15:33

I tried the 3d script but it doesnt seem to work do I have to use autohotkey v2?
_3D_
Posts: 139
Joined: 29 Jan 2014, 14:40

Re: Zed automated combo (League Of Legends)

21 Oct 2017, 01:19

AutoHotkey_2.0-a081-cad307c syntax:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I never tested this script in "LOL".
AHKv2.0 use the future now.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 4 guests