Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. ; Full Direction Rotation Camera View (for Amber Client)
  2. ; Toggle it with Pause key
  3. ; you can inverse easily right and left keys by changing "Right::" to "Left::" and "Left::" to "Right::"
  4. ; you can also change the hotkey to Toggle (changing "Pause::" ) but avoid Ctrl or Alt combination as it is a little buggy (can work, tho)
  5.  
  6.  
  7. #singleinstance force
  8. #MaxThreadsPerHotkey 1
  9. SetTitleMatchMode, 1 ; match start of the title
  10. #IfWinActive Haven and Hearth
  11.  
  12. Toggle := 0
  13.  
  14.  
  15. Pause::
  16. Toggle := !Toggle
  17. If (Toggle = 1)
  18. {
  19. Direction = 0
  20. Send, {Control Down}
  21. Send, {up}
  22. Send, {Control Up}
  23.  
  24. Traytip,,FullDirRotation On,1
  25. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  26. }
  27. else{
  28. Direction := ""
  29. Traytip,,FullDirRotation Off,1
  30. }
  31. return
  32.  
  33.  
  34. $Right::
  35.  
  36. if (Direction = 1){
  37. Send, {Control Down}
  38. Send, {left}
  39. Send, {Control Up}
  40. Direction++
  41. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  42. return
  43. }
  44.  
  45. if (Direction = 3){
  46. Send, {Control Down}
  47. Send, {down}
  48. Send, {Control Up}
  49. Direction++
  50. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  51. return
  52. }
  53.  
  54. if (Direction = 5){
  55. Send, {Control Down}
  56. Send, {right}
  57. Send, {Control Up}
  58. Direction++
  59. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  60. return
  61. }
  62. if (Direction = 7){
  63. Direction = 0
  64. Send, {Control Down}
  65. Send, {up}
  66. Send, {Control Up}
  67. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  68. return
  69. }
  70.  
  71. if (VarExist(Direction) = 1)
  72. {
  73. Direction++
  74. Send {Right}
  75. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  76. return
  77. }
  78. else{
  79. Send {Right}
  80. }
  81. return
  82.  
  83.  
  84. $Left::
  85. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  86. if (Direction = 0){
  87. Direction = 8
  88. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  89. }
  90.  
  91. if (Direction = 1){
  92. Direction--
  93. Send, {Control Down}
  94. Send, {up}
  95. Send, {Control Up}
  96. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  97. return
  98. }
  99.  
  100. if (Direction = 3){
  101. Send, {Left}
  102. Sleep 130
  103. Send, {Control Down}
  104. Send, {left}
  105. Send, {Control Up}
  106. Direction--
  107. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  108. return
  109. }
  110.  
  111. if (Direction = 5){
  112. Send, {Control Down}
  113. Send, {down}
  114. Send, {Control Up}
  115. Direction--
  116. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  117. return
  118. }
  119. if (Direction = 7){
  120. Direction--
  121. Send, {Control Down}
  122. Send, {right}
  123. Send, {Control Up}
  124. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  125. return
  126. }
  127.  
  128. if (VarExist(Direction) = 1)
  129. {
  130. Direction--
  131. Send {Left}
  132. ;Progress, zh0 fs18 x300 y300, "%Direction%"
  133. ;msgbox % Direction
  134. return
  135. }
  136. else{
  137. Send {Left}
  138. }
  139. return
  140.  
  141.  
  142.  
  143. varExist(ByRef v) { ; Requires 1.0.46+
  144. return &v = &n ? 0 : v = "" ? 2 : 1
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement