Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # toggle-able safe mode movement for webtiles
- ###
- : function startsafemode()
- : safemodeon = true
- : crawl.mpr("Safe mode on.")
- bindkey = [b] CMD_SAFE_MOVE_DOWN_LEFT
- bindkey = [h] CMD_SAFE_MOVE_LEFT
- bindkey = [j] CMD_SAFE_MOVE_DOWN
- bindkey = [k] CMD_SAFE_MOVE_UP
- bindkey = [l] CMD_SAFE_MOVE_RIGHT
- bindkey = [n] CMD_SAFE_MOVE_DOWN_RIGHT
- bindkey = [u] CMD_SAFE_MOVE_UP_RIGHT
- bindkey = [y] CMD_SAFE_MOVE_UP_LEFT
- # the 1-9 keys only work for webtiles keypad
- bindkey = [1] CMD_SAFE_MOVE_DOWN_LEFT
- bindkey = [4] CMD_SAFE_MOVE_LEFT
- bindkey = [2] CMD_SAFE_MOVE_DOWN
- bindkey = [8] CMD_SAFE_MOVE_UP
- bindkey = [6] CMD_SAFE_MOVE_RIGHT
- bindkey = [3] CMD_SAFE_MOVE_DOWN_RIGHT
- bindkey = [9] CMD_SAFE_MOVE_UP_RIGHT
- bindkey = [7] CMD_SAFE_MOVE_UP_LEFT
- : end
- : function stopsafemode()
- : safemodeon = false
- : crawl.mpr("Safe mode off.")
- bindkey = [b] CMD_MOVE_DOWN_LEFT
- bindkey = [h] CMD_MOVE_LEFT
- bindkey = [j] CMD_MOVE_DOWN
- bindkey = [k] CMD_MOVE_UP
- bindkey = [l] CMD_MOVE_RIGHT
- bindkey = [n] CMD_MOVE_DOWN_RIGHT
- bindkey = [u] CMD_MOVE_UP_RIGHT
- bindkey = [y] CMD_MOVE_UP_LEFT
- # the 1-9 keys only work for webtiles keypad
- bindkey = [1] CMD_MOVE_DOWN_LEFT
- bindkey = [4] CMD_MOVE_LEFT
- bindkey = [2] CMD_MOVE_DOWN
- bindkey = [8] CMD_MOVE_UP
- bindkey = [6] CMD_MOVE_RIGHT
- bindkey = [3] CMD_MOVE_DOWN_RIGHT
- bindkey = [9] CMD_MOVE_UP_RIGHT
- bindkey = [7] CMD_MOVE_UP_LEFT
- : end
- # initialize off
- : stopsafemode()
- : function togglesafe()
- : if safemodeon then
- : stopsafemode()
- : else
- : startsafemode()
- : end
- : end
- # FOR THIS SCRIPT TO WORK IT MUST BE BOUND TO A MACRO
- # (Replace ']' below with your desired key)
- # If you use rcfile macro definitions, simply uncomment the line below
- # macros += M ] ===togglesafe
- # Otherwise, bind a macro to your preferred key in-game
- # and define it as: ===togglesafe
- # Or add the following two lines (without #) into your macro.txt
- # M:]
- # A:===togglesafe
- # Binding macros in RC file will overwrite macros made with any other method!
- # The same macro binding methods can be used to bind keys like the
- # arrow keys and keypad outside of webtiles
- # to the hjkl keys, which will allow you to use those keys with safemode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement