Question: Will that code work?

Page 1 of 1

1 Replies - 244 Views - Last Post: 01 October 2012 - 09:44 AM Rate Topic: -----

#1 Fraysa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-September 12

Question: Will that code work?

Posted 01 October 2012 - 09:33 AM

I'm making a code that will act like a macro for a certain game. That certain game has players (It's a moba game), and in your turn
you select the player you want to play. There is a search box where you can search from the big list of players to choose, and there is a
Lock In button to confirm your select.

I've made groups for each "role" in that game and put each player in there.

Dim tank As New List(Of String)
Dim adc As New List(Of String)
Dim jungle As New List(Of String)
Dim support As New List(Of String)
Dim apmid As New List(Of String)



I've also added each player to each group.

adc.AddRange({"ashe", "caitlyn", "corki", "draven", "ezreal", "graves", "kog'maw", "miss fortune", "sivir", "tristana", "twitch", "varus", "vayne"})
tank.AddRange({"alistar", "amumu", "leona", "nautilus", "rammus", "sejuani", "shen", "taric", "volibear"})
apmid.AddRange({"ahri", "anivia", "annie", "brand", "cassiopeia", "diana", "fiddlesticks", "heimerdinger", "karthus", "kassadin", "kennen", "leblanc", "lux", "malzahar", "morgana", "orianna", "rumble", "ryze", "swain", "syndra", "veigar", "viktor", "vlad", "xerath", "ziggs", "zilean", "zyra"})
jungle.AddRange({"hecarim", "skarner", "evelynn"})
support.AddRange({"janna", "karma", "lulu", "sona", "soraka", "taric"})



Now I have "Select Case strText" which detects what the user said (I've added each player's name to the
Speech Dictionairy, strText = the recognized text, what the uesr said).

 Case adc.ToString
                Dim selectedChampion As String = strText
                SetCursorPos(1063, 186) 'Search box.
                wait(100)
                mouse_event(MOUSEEVENTF_LEFTDOWN, 1063, 186, 0, 0)
                mouse_event(MOUSEEVENTF_LEFTDOWN, 1063, 186, 0, 0)
                mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
                SendKeys.Send(selectedChampion)
                wait(200)
                SetCursorPos(481, 250) 'Selects the champion.
                wait(200)
                mouse_event(MOUSEEVENTF_LEFTDOWN, 481, 250, 0, 0)
                mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
                wait(200)
                SetCursorPos(1029, 552) 'Clicks the "Lock In" button.
                mouse_event(MOUSEEVENTF_LEFTDOWN, 1029, 552, 0, 0)
                mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)



My question is will that work? I can't test it right now so that's why I'm asking. I'm not sure about the
adc.toString which is supposed to recognize a player's name from the "adc" group and then do the code.
I'm also not sure about selectedChampion for hte strText.

EDIT: Also, I'm not using SendKeys.Send, that was just to show you the code. I'm using keybd_event, Just a quick question:
can I send a full word using keybd? Because with sendKeys it's possible, but with keybd I can only send one key at a time. The problem
with sendKeys is that it's not reliable and I can't use it on the game I'm trying to use it on.

Is This A Good Question/Topic? 0
  • +

Replies To: Question: Will that code work?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9206
  • View blog
  • Posts: 34,588
  • Joined: 12-June 08

Re: Question: Will that code work?

Posted 01 October 2012 - 09:44 AM

... how about you just try the code yourself? I am unclear how anyone will be able to test a random gutted chunk of code for you.

... oh and not to mention League of Legends prohibits third party apps.

J. Using any unauthorized third party programs,

We are not fond of people trying to use our site to violate the terms of use of another. I am going to close this thread and please do not continue pursuing help for this endeavor here. If you have a question on this shoot me a pm.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1