Advertisement
Guest User

Untitled

a guest
Mar 31st, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; This is an improved version of the DFOWeaponSwitch.ahk macro.  With this macro
  2. ; it directly accesses the weapon and accessory for a weapon set without first
  3. ; setting that hotbar.  It then sets the hotbar after the fact.  So, instead of
  4. ; setting the new hotbar, THEN selecting the weapon and accessory, this just
  5. ; directly selects the weapon, accessory, and THEN the new hotbar.  This change
  6. ; was made to provide a slight speed improvement in getting that new weapon ready.
  7. ;
  8. ; Its still timer based which means you can interrupt the current action and do
  9. ; something else.
  10. ;
  11. ; Also, CTRL+ALT+r is set to reload the script in case you want to tweak it while
  12. ; playing.
  13. ;
  14. ; SETUP
  15. ; ==============================================================================
  16. ; - modify DFO client input bindings as follows (in GUI mode, click Options,
  17. ;   then click Input Bindings, then select the GUI tab)
  18. ;   - change hotbars: CTRL+0, CTRL+1, ...
  19. ;   - use Nth hotbar slot 0: ALT+N
  20. ;   - use Nth hotbar slot 1: CTRL+ALT+N
  21. ;   - do the above two for 0...9, so ALT+3 selects hotbar 3, slot 0 and
  22. ;     CTRL+ALT+3 selects hotbar 3, slot 1  
  23. ; - in each hotbar set a weapon in slot 0 and an accessory item in slot 1
  24. ; - when selecting a weapon set, the weapon and accessory will be activated
  25. ; - examples
  26. ;
  27. ;      Weapon (slot 0)        Accessory (slot 1)
  28. ;      ===============        ==================
  29. ;      staff                  self heal
  30. ;      1H sword               shield
  31. ;      2H sword               power attack
  32. ;      bow                    <nothing>
  33. ;
  34. ; USAGE
  35. ; ==============================================================================
  36. ; - use F1, F2, ..., F10 to select weapon set 1, 2, ... 0 and then choose
  37. ;   the weapon and accessory for that hotbar
  38. ; - alternatively, use the mouse-wheel to switch to the next/prev weapon set
  39. ; - you might want to tweak the delay values below used between selecting the
  40. ;   weapon and accessory and between selecting the accessory and the new hotbar.
  41. ;   if you find the accessory not activating (shield for example), try increasing
  42. ;   that delay.  this is likely effected by the speed of your connection.  if you
  43. ;   want you could also try reducing it and see how low you can get it and still
  44. ;   have it reliably work.
  45.  
  46. #IfWinActive, Darkfall Online
  47. #NoEnv
  48. SendMode Input
  49. SetWorkingDir %A_ScriptDir%
  50.  
  51. End::Pause
  52. Home::Suspend
  53.  
  54. F2::
  55. send, {numpad8} ;BOUND TO sword
  56. sleep, 500
  57. send, {numpad9} ;BOUND TO shield
  58.  
  59.  
  60. ; Burst keys
  61. +Tab::
  62. Send, {{}
  63. Send, {}}
  64. Send, .
  65. Send, |
  66. return
  67.  
  68. Tab::
  69. Send, {{}
  70. Send, {}}
  71. send, .
  72. Send, |
  73. return
  74.  
  75.  
  76. H::
  77. Send, ?
  78. Send, "
  79. Send, '
  80. Send, \
  81.  
  82. +H::
  83. Send, ?
  84. Send, "
  85. Send, '
  86. Send, \
  87.  
  88.  
  89. curWeaponSet := 1
  90.  
  91. CancelPendingTasks:
  92.   SetTimer, SelectAccessory, off
  93.    SetTimer, SelectHotbar, off
  94. Return
  95.  
  96. SelectWeaponSet:
  97.   GoSub, CancelPendingTasks
  98.    SendInput, !%curWeaponSet%
  99.    SetTimer, SelectAccessory, -700 ; delay between picking weapon and accessory
  100. Return
  101.  
  102. SelectAccessory:
  103.   SendInput, ^!%curWeaponSet%
  104.    SetTimer, SelectHotbar, -50 ; delay between picking accessory and hotbar
  105. Return
  106.  
  107. SelectHotbar:
  108.   SendInput, ^%curWeaponSet%
  109. Return
  110.  
  111. `::
  112. {
  113.    curWeaponSet := 1
  114.    GoSub, SelectWeaponSet
  115.    Sleep, 500
  116.    Send, l
  117.    Return
  118.    
  119. }
  120.  
  121. +`::
  122. {
  123.    curWeaponSet := 1
  124.    GoSub, SelectWeaponSet
  125.    Sleep, 500
  126.    Send, l
  127.    Return
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement