Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
0.97 update; fixes #14, fixes #16
Browse files Browse the repository at this point in the history
* Created dedicated config and hotkey files.
* Updated chat function; one function now holds all functionality for public, guild, and `/tell` chat.
* Fixed a couple outdated readme entries

Still to do:

- [ ] Finish code refactoring
- [ ] Finish code documentation
- [ ] Add FAQ/troubleshooting to readme
  • Loading branch information
Nightfirecat committed Nov 14, 2013
1 parent a036c40 commit 13f8046
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 206 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ You can [download the project's files here](https://github.com/Nightfirecat/real
* Extract the archive to a folder of your choice.
* Install [Autohotkey](http://www.autohotkey.com/) for Windows or [IronAHK](http://www.ironahk.net/)
for OSX or Linux
* Open `realmscript.ahk` using your preferred text editor. **(Windows users, do not use Notepad; use
[Notepad++](http://notepadplusplus.org/) or some other editor!)**
* Edit, add, or delete binds as needed in the top section of the code, as directed by the comments -
the text that appears after semicolons. (`;`)
* Open `options.ahk` and `hotkeys.ahk` using your preferred text editor.
**(Windows users, do not use Notepad; use [Notepad++](http://notepadplusplus.org/) or some other editor!)**
* Choose your default settings in `options.ahk` and edit, add, or delete binds as needed in `hotkeys.ahk`.

##Default Binds

Expand Down Expand Up @@ -55,6 +54,7 @@ You can [download the project's files here](https://github.com/Nightfirecat/real
* Swap hotkeys (allows for slot selecting via bind editing)
* Shift+scroll wheel scrolls chat log
* /tp is converted to /teleport
* Resizable borders can be disabled for projector or Steam client players
* Ctrl+f acts as a fixed interact key for portals and character select
* Ctrl+1 and Ctrl+2 act as item-swap binds.
* Ctrl+q and Ctrl+e are disabled to avoid accidental presses.
Expand Down
145 changes: 145 additions & 0 deletions hotkeys.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
; Create custom binds by using the key combination followed by two colons (::), using the function
; sendChat, and passing the string you want as a bind in quotes. Follow this with a line reading
; only `Return`. Below are some binds which you may use yourself, or use as templates for new binds.
; If you would like to make your own (custom) hotkeys,
; more is described here: http://www.autohotkey.com/docs/Hotkeys.htm#Intro

F1::
sendChat("Heal please?")
Return

F2::
sendChat("Thank you. :)")
Return

F3::
sendChat("MP please!")
Return

F4::
sendChat("He lives and reigns and conquers the world")
Return

F11::
sendChat("/tutorial")
Return

F12::
sendChat("/nexustutorial")
Return


; The following binds double-click on an inventory space to swap items/abilities/armors/rings.
; Add or remove them as you see fit.

^1::
invSwap(1) ;;;;; CHANGE TO YOUR WEAPON SWAP INVENTORY SLOT
Return

^2::
invSwap(2) ;;;;; CHANGE TO YOUR ABILITY SWAP INVENTORY SLOT
Return


; Here are some other 'default' binds which you can leave as-is, delete, or change, if you wish.

`:: ;(backtick)
sendChat("/pause")
Return

^w::
sendChat("/who")
Return

^s::
sendChat("/server")
Return

^d::
sendChat("/tell mreyeball server")
Return

; close script
^F8:: ExitApp


; The following are in place to prevent accidental closure of a window or tab because of nearby binds.

^q::
Return
^e::
Return


; Finally, here are some more core binds - adjust at your own risk~

RButton::
Send +{LButton}
GetKeyState, LB, LButton, P
if (LB == "D"){
Send {LButton down}
}
Return

^RButton::
Click Right
Return

; set a teleport target (input window title and text don't use quotes)
^t::InputBox, tptarget, Teleport target, Please enter a person to teleport to:

; teleport to the target set with shift+right-click
+RButton::
sendChat("/teleport "+tptarget)
Return

; fixed interact with ctrl+f
^f::
MouseGetPos, mousePosX, mousePosY
WinGetPos, , , winSizeX, winSizeY, A
global menuHeight
global vBorderWidth
global hBorderWidth
global titleHeight
stretched := false
if(!imageQualitySearch("enter", imageLocX, imageLocY)){
stretched := !imageQualitySearch("change", imageLocX, imageLocY)
}
if(stretched){
intendedX := 698
intendedY := 575
stretchedWindowPosition(intendedX, intendedY, stretchedX, stretchedY)
windowPosToClientPos(stretchedX, stretchedY, posX, posY)
} else {
windowPosToClientPos(imageLocX, imageLocY, posX, posY)
}
BlockInput, on
CoordMode, Mouse, Client
MouseMove, posX, posY
SendEvent {LButton Down}
SendEvent {LButton Up}
CoordMode, Mouse, Window
MouseMove, mousePosX, mousePosY
BlockInput, off
stretched := false
Return

; scroll the chat log with the default in game keybinds
+WheelUp::
global SCROLL_CHAT_UP_KEY
if(SCROLL_CHAT_UP_KEY){
key = %SCROLL_CHAT_UP_KEY%
}else{
key = PgUp
}
Send {%key%}
Return
+WheelDown::
global SCROLL_CHAT_DOWN_KEY
if(SCROLL_CHAT_UP_KEY){
key = %SCROLL_CHAT_UP_KEY%
}else{
key = PgDn
}
Send {%key%}
Return
21 changes: 21 additions & 0 deletions options.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
; Set to 1 if you want to use a custom .cur file when the window is active, 0 otherwise
USE_CUSTOM_CURSOR := 1

; name of the .cur file as it appears in /img/cursors/
; Available options:
; * bmj_precision.cur
; * rotmg_pro_cursor.cur
CUSTOM_CURSOR := "bmj_precision.cur"

; Custom activation keys. DO NOT PUT QUOTES AROUND CUSTOM KEYS (eg. use Enter, not "Enter")
; If you use Enter, Tab, g, PgUp and PgDn as your default keys for these actions, leave them blank.
; See this link for a list of key names: http://www.autohotkey.com/docs/KeyList.htm
CHAT_ACTIVATION_KEY =
TELL_ACTIVATION_KEY =
GUILD_ACTIVATION_KEY =
SCROLL_CHAT_UP_KEY =
SCROLL_CHAT_DOWN_KEY =

; Disables resizable borders for projector and Steam when focused
; (must restart client with option disabled to bring back normal borders)
DISABLE_RESIZE := 0
Loading

0 comments on commit 13f8046

Please sign in to comment.