Advertisement
Nutgear

[AHK, C#] Mortem Metallum Crossbow Macro

Oct 28th, 2022 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.85 KB | Gaming | 0 0
  1. ; https://drive.google.com/file/d/19UJDzEIBnhCzJj6vkzgeBf7VDlRPOlFW/view?usp=sharing
  2. ; Do not copy and paste past the link! Theres the chance of it breaking if you wanna copy and paste the code and its recommended that you use the bundle with WeAreDevs lag switch
  3.  
  4. ; !! CTRL+ALT Ends script !!
  5. ; T shows counter (which crossbow to use)
  6. ; F fires the current crossbow
  7. ; CTRL+R resets counter. Do it after dying
  8. ; R reloads
  9. ; CTRL+T inspects (kinda important!)
  10.  
  11. ; Default fire rate value is optimized for ~50 fps average. At least i5-6600 or ryzen 5 1600X is required for good consistency!
  12. ; SendBatchLines = Time multiplier
  13.  
  14. SetBatchLines, -1
  15.  
  16. FireRate := 24
  17. ReloadRate := 16
  18.  
  19. MsgBox AHK SuperCrossbow Macro V2.2 has been started. Download is in the source!
  20.  
  21. ReloadNum := 1
  22. Current := 1
  23.  
  24. ^r:: ; Reset
  25. msgBox Secondary counter reset
  26. Current := 1
  27. return
  28.  
  29. r:: ; Mass Reload
  30.  
  31.  
  32. ReloadNum = 1
  33. LoopNum := Current - 1
  34.  
  35. Loop, %LoopNum%
  36. {
  37.     If (ReloadNum = 10)
  38.     {  
  39.     Send, 0
  40.         Sleep, ReloadRate
  41.         MouseClick, left
  42.     } Else {
  43.     Send, %ReloadNum%
  44.         Sleep, ReloadRate
  45.         MouseClick, left
  46.     }  
  47.     ReloadNum := ReloadNum + 1
  48. }
  49. Sleep, ReloadRate
  50. Current := 1
  51. Send, %Current%
  52. return
  53.  
  54. f:: ; Fire, order: check CVAR, send CVAR increase CVAR, click
  55.     While GetKeyState("F") {
  56.         if (Current < 11) {
  57.         MouseClick, left
  58.         Sleep, FireRate        
  59.         Current := Current + 1
  60.         if (Current < 10)
  61.             {
  62.             Send, %Current%
  63.         } Else {
  64.             Send, 0
  65.         }
  66.         }
  67.     }
  68.  
  69. return
  70.  
  71. t:: ; Inspect
  72.     Send, %Current%
  73. return
  74.  
  75.  
  76. ^t:: ; Inspect for bad bows
  77.     ChkNum := 1
  78.     Loop, 10
  79.     {
  80.         If (ChkNum > 9)
  81.         {  
  82.             Send, 0
  83.         } Else {
  84.             Send, %ChkNum%
  85.             ChkNum := ChkNum + 1
  86.             Sleep, 66
  87.         }
  88.     }
  89. return
  90.  
  91. ^alt::
  92.     MsgBox Script ended (CTRL+ALT)
  93.     ExitApp ; VERY NECESSARY
  94. return
  95.  
  96. ; redpawner
  97.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement