Monday, June 8, 2009

Makro ROSE Online

| Monday, June 8, 2009 | 0 comments
In order to use the script below or create your own you will first need to download and install the AutoHotKey program(it's 100% free). I'm not going to post a link, juts google it and it will be the first result. You can create your script in Windows Notepad and save the file with an ".AHK" extention; example: "cleric.ahk".

#SingleInstance, Force
#Persistent
#NoEnv

^1::WinGet, active_id, PID, A

+F2::ControlSend, , {F1}, ahk_pid %active_id%

+WheelUp::ControlSend, , {F3}, ahk_pid %active_id%

WheelUp::ControlSend, , {F4}, ahk_pid %active_id%

WheelDown::ControlSend, , {F2}, ahk_pid %active_id%

+WheelDown::
{
ControlSend, , {F5}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F6}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F7}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F8}, ahk_pid %active_id%
Return
}

PgDn::
{
ControlSend, , {F12}, ahk_pid %active_id%
Sleep 1000
ControlSend, , {F8}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F7}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F6}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F5}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F4}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F3}, ahk_pid %active_id%
Sleep 1000
ControlSend, , {F9}, ahk_pid %active_id%
Return
}



#SingleInstance, Force
#Persistent
#NoEnv


Place these first 3 lines at the start of your script. Don't worry about what they mean, they are just instructions to AHK on how the script should be run. For example, the first line tells AHK to only allow you to run one copy of this script at a time.

^1::WinGet, active_id, PID, A

THIS IS THE MOST IMPORTANT PART OF THE SCRIPT. READ THIS OR FAIL.

This line creates a macro for CTRL-1 that will tell AHK to store the current window's process ID in the variable active_id.

Basically what this means is by selecting your Cleric's ROSE online client window and hitting CTRL-1 it will tell AHK that this client is the cleric so it knows witch window to send the keystrokes to for all your other macros.

So when your script is finished, the startup process will look like this.

1) Start both ROSE clients and log in both characters.
2) Start your AHK script.
3) Switch to your Cleric's client and hit CTRL-1

Now AHK knows what window is the cleric and you're ready to go. You only need to do this once per session.

+F2::ControlSend, , {F1}, ahk_pid %active_id%

Above is the first real macro of my script. What this says is when I hit SHIFT-F2(+F2:smile.gif send the keystroke F1 (ControlSend, , {F1},) to the window ID we stored when selected the cleric's client( ahk_pid %active_id%). (see previous section)

F1 on my Cleric = Kiss. So for this macro, when I hit SHIFT-F2 while playing my Bourg it will cast the Kiss skill on the cleric without me having to switch windows. Closest thing to auto-follow in this game

When making macros:

+ = Shift
! = Alt
^ = Ctrl

So in the above macro, if you wanted to change it to CTRL-F2 hotkey = F1 sent to cleric it would look like: ^F2::ControlSend, , {F1}, ahk_pid %active_id%. Or if you wanted the hotkey to be ALT-CTRL-F2 it would look like: !^F2::ControlSend, , {F1}, ahk_pid %active_id%.

The AHK helpfile lists all hotkeys and lables available.

WheelUp::ControlSend, , {F4}, ahk_pid %active_id%

In this macro hitting WheelUp on my mouse will send F4 to the cleric (my heal spell).

+WheelUp::ControlSend, , {F3}, ahk_pid %active_id%

In this macro hitting SHIFT+WheelUp on my mouse will send F3 to the cleric (my group heal spell).

PgDn::
{
ControlSend, , {F12}, ahk_pid %active_id%
Sleep 1000
ControlSend, , {F8}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F7}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F6}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F5}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F4}, ahk_pid %active_id%
Sleep 2000
ControlSend, , {F3}, ahk_pid %active_id%
Sleep 1000
ControlSend, , {F9}, ahk_pid %active_id%
Return
}


You can also have a macro send more then one keystroke to your cleric. The above is my buff macro. When I hit PageDown it will do the following.

1) Send F12 to the cleric (this will switch to my buff hotbar)

2) Wait 1 second. The Sleep 1000 command tells AHK to pause for 1 second. Sleep command uses milliseconds so 1000 = 1sec, 2000 = 2 sec, etc

3) Send F3-F8 keys to the cleric with a 2 second pause in between. This will cast the 6 buffs.

4) Send F9 to the cleric to switch back to my normal hotbar.

Be sure to enclose these multi-line macros in the { } brackets and have a Return at the end. ie.

Hotkey::
{

commands here


Return

Related Post:

0 comments:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

 
© Copyright 2010. yourblogname.com . All rights reserved | yourblogname.com is proudly powered by Blogger.com | Template by o-om.com - zoomtemplate.com