Advertisement
Guest User

Untitled

a guest
Jul 7th, 2016
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. # toggle-able safe mode movement for webtiles
  2. ###
  3. : function startsafemode()
  4. : safemodeon = true
  5. : crawl.mpr("Safe mode on.")
  6. bindkey = [b] CMD_SAFE_MOVE_DOWN_LEFT
  7. bindkey = [h] CMD_SAFE_MOVE_LEFT
  8. bindkey = [j] CMD_SAFE_MOVE_DOWN
  9. bindkey = [k] CMD_SAFE_MOVE_UP
  10. bindkey = [l] CMD_SAFE_MOVE_RIGHT
  11. bindkey = [n] CMD_SAFE_MOVE_DOWN_RIGHT
  12. bindkey = [u] CMD_SAFE_MOVE_UP_RIGHT
  13. bindkey = [y] CMD_SAFE_MOVE_UP_LEFT
  14. # the 1-9 keys only work for webtiles keypad
  15. bindkey = [1] CMD_SAFE_MOVE_DOWN_LEFT
  16. bindkey = [4] CMD_SAFE_MOVE_LEFT
  17. bindkey = [2] CMD_SAFE_MOVE_DOWN
  18. bindkey = [8] CMD_SAFE_MOVE_UP
  19. bindkey = [6] CMD_SAFE_MOVE_RIGHT
  20. bindkey = [3] CMD_SAFE_MOVE_DOWN_RIGHT
  21. bindkey = [9] CMD_SAFE_MOVE_UP_RIGHT
  22. bindkey = [7] CMD_SAFE_MOVE_UP_LEFT
  23. : end
  24.  
  25. : function stopsafemode()
  26. : safemodeon = false
  27. : crawl.mpr("Safe mode off.")
  28. bindkey = [b] CMD_MOVE_DOWN_LEFT
  29. bindkey = [h] CMD_MOVE_LEFT
  30. bindkey = [j] CMD_MOVE_DOWN
  31. bindkey = [k] CMD_MOVE_UP
  32. bindkey = [l] CMD_MOVE_RIGHT
  33. bindkey = [n] CMD_MOVE_DOWN_RIGHT
  34. bindkey = [u] CMD_MOVE_UP_RIGHT
  35. bindkey = [y] CMD_MOVE_UP_LEFT
  36. # the 1-9 keys only work for webtiles keypad
  37. bindkey = [1] CMD_MOVE_DOWN_LEFT
  38. bindkey = [4] CMD_MOVE_LEFT
  39. bindkey = [2] CMD_MOVE_DOWN
  40. bindkey = [8] CMD_MOVE_UP
  41. bindkey = [6] CMD_MOVE_RIGHT
  42. bindkey = [3] CMD_MOVE_DOWN_RIGHT
  43. bindkey = [9] CMD_MOVE_UP_RIGHT
  44. bindkey = [7] CMD_MOVE_UP_LEFT
  45. : end
  46.  
  47. # initialize off
  48. : stopsafemode()
  49. : function togglesafe()
  50. : if safemodeon then
  51. : stopsafemode()
  52. : else
  53. : startsafemode()
  54. : end
  55. : end
  56.  
  57. # FOR THIS SCRIPT TO WORK IT MUST BE BOUND TO A MACRO
  58. # (Replace ']' below with your desired key)
  59. # If you use rcfile macro definitions, simply uncomment the line below
  60. # macros += M ] ===togglesafe
  61.  
  62. # Otherwise, bind a macro to your preferred key in-game
  63. # and define it as: ===togglesafe
  64. # Or add the following two lines (without #) into your macro.txt
  65. # M:]
  66. # A:===togglesafe
  67.  
  68.  
  69. # Binding macros in RC file will overwrite macros made with any other method!
  70. # The same macro binding methods can be used to bind keys like the
  71. # arrow keys and keypad outside of webtiles
  72. # to the hjkl keys, which will allow you to use those keys with safemode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement