AutoHotkey Community

It is currently May 26th, 2012, 2:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Warcraft 3 Frozen Throne
PostPosted: January 10th, 2008, 4:23 pm 
Hello!

Ive just started using ahk and ive made a script:

#IfWinActive, ahk_class Warcraft III
!f::send f
!Tab::Send {Tab}
XButton1::Send {Numpad8}
LWin::Send {] Down}{[ Down}
^LWin::Send {] Up}{[ Up}

Can someone help me adding some extra to my scripts!

I would like a shortcut for sending units back to mainhall/base. What to type?

I would also like a shortcut for group adding..

Best regards
Nisbrix


Report this post
Top
  
Reply with quote  
PostPosted: January 10th, 2008, 6:11 pm 
Offline

Joined: January 18th, 2006, 12:37 am
Posts: 290
Nisbrix wrote:
I would like a shortcut for sending units back to mainhall/base. What to type?


You need to have 2 hotkeys setup. One to record the position of your main hall using MouseGetPos. (You will have to point to your hall on the minimap and then press this hotkey.) Then you have to run a second hotkey to send them to the position that you recorded. You should use MouseGetPos to record your current position and then use MouseClick (with Right click) to click the mini-map and then use MouseMove to return to your original position.

Nisbrix wrote:
I would also like a shortcut for group adding..


Adding to a group is normally shift and the group that you want to add to. The hotkey would be similar to your other hotkeys:

Code:
a::Send, +3 ; adds a unit to group 3

_________________
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2008, 6:24 pm 
Thank you for the fast reply POINTS! I appreciate that.

Can you explain how to make these two hotkey setups?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2008, 6:24 pm 
Anonymous wrote:
Thank you for the fast reply POINTS! I appreciate that.

Can you explain how to make these two hotkey setups?


Report this post
Top
  
Reply with quote  
 Post subject: Autocast
PostPosted: January 11th, 2008, 4:39 pm 
Offline

Joined: January 18th, 2006, 12:37 am
Posts: 290
I use this function to toggle autocast. Your code will be similar to this.

This function takes an number 1 to 12, and clicks the right mouse button on one of the grid.

The code will save the current mouse position, clicks on the appropriate grid position (based on the screen size), and returns to the starting position.

Code:
; AutoCast Function
AutoCast(iSpellQWERHotkey)
{
  MouseGetPos, iMousePosX, IMousePosY
  if (iSpellQWERHotkey == 1)
  {
    iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 2)
  {
    iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 3)
  {
    iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 4)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 5)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 6)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 7)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 8)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 9)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 10)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 11)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 12)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*19//20
  }
  Click, Right, %iMouseGotoX%, %iMouseGotoY%
  MouseMove, %iMousePosX%, %iMousePosY%
}


If you still need more help, I can try to look at it this weekend. (It's something I'm interested in developing too.)

_________________
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2008, 6:08 pm 
Wauw! What a post, really incredible.

The code looks very advanced, but i am a little confused. When i load the script and start playing warcraft 3 i cannot make it work. I try to put the available numbers on my units and right click on the ground/main hall ect. But it does not seem like it is recorded?

Thanks for everything so far!


Report this post
Top
  
Reply with quote  
 Post subject: Go home
PostPosted: January 13th, 2008, 1:19 am 
Offline

Joined: January 18th, 2006, 12:37 am
Posts: 290
The code above was for toggling autocasting. I tested this code and it works for sending your units home. Hover over hall on the minimap and press a to set it up. Then press s with your unit selected and he will go home.

Code:
a::MouseGetPos, iHallPosX, iHallPosY

s::
MouseGetPos, iMousePosX, iMousePosY
Click, Right, %iHallPosX%, %iHallPosY%
MouseMove, %iMousePosX%, %iMousePosY%
return

_________________
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Exabot [Bot] and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group