Advertisement
recca062

Ragnarok Online Smart Cast - Source

Jan 20th, 2016
9,550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Language:       Autohotkey
  2. ; Name:     Ragnarok Online Smart Cast
  3. ; Description:  Smart cast for any games really, but this script was specifically made for Ragnarok Online
  4. ; Author:         Recca
  5. ; READ ME - https://autohotkey.com/boards/viewtopic.php?f=19&t=13162
  6. ; BLOG - http://ragindex.blogspot.com
  7. /* ------------------------------ROSC.ini----------------------------- READ ME
  8. 120         // SPEED        : Skill Delay (in millisecond)
  9. 100         // SPEED        : Usable Delay (in millisecond)
  10. !p          // Alt + P      ; Pause Script Hotkey
  11. !Esc            // Alt + Esc        ; Exit Hotkey
  12.             //  "//" = comment start
  13.             // Empty lines will be ignore
  14. //s         // Put '//' infront to disable a hotkey
  15. z           // Hotkey Z, Use Z and CLick
  16. a,u         // Hotkey A, Use A ; ",u" for usable, for Spamming pots without click
  17.             // Anything behind '//' will be ignore
  18.             // NEED TO RESTART FOR CHANGE TO TAKE EFFECT
  19.  
  20. //F1=F1,170,u|F2,170,u|F1,170,u|F3,250,u    //Working Asura Combo
  21. // DO NOT OVERLAP HOTKEYS, OR ELSE... idk
  22. // F1 - F9 Macro
  23. F1
  24. F2
  25. F3
  26. F4
  27. F5
  28. F6
  29. F7
  30. F8
  31. F9
  32. */
  33. ; Nam: Ragnarok Onlin Smart Cast ( Self-Cast / Macro / Chain Macro )
  34. ; AutoHotkey Version:  Autohotkey_L
  35. ; Platform:       Windows Only
  36. ; Author:        Recca
  37. ; Description: A self-cast script for Ragnarok Online
  38. ; /camera to turn off CAMERA SMOOTH for more accurate Self-Cast
  39. ; See "HTTP://RAGINDEX.BLOGSPOT.COM" for more information
  40.  
  41. #NoEnv
  42. SendMode Input
  43. SetWorkingDir %A_ScriptDir%
  44. #Persistent
  45. #SingleInstance force
  46. ;SetBatchLines -1
  47. if not A_IsAdmin
  48. {
  49.    Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
  50.    ExitApp
  51. }
  52.  
  53. configName = ROSC.ini
  54.  
  55. IfNotExist, %configName%
  56. {
  57.     MsgBox There is no '%configName%' within this folder, app will exit now.
  58.     ExitApp
  59. }
  60. ToolTip, SPAM ON
  61. Sleep 1000
  62. x := 0
  63. x1 := 0
  64. s := 0
  65. Loop, read, %configName%
  66. {
  67.     IfInString, A_Loopreadline, //
  68.     {
  69.         StringSplit, fix_, A_Loopreadline, //
  70.         fix := fix_1
  71.         StringReplace, fix, fix, %A_Tab%,,all
  72.         StringReplace, fix, fix, %A_Space%,,all
  73.     }
  74.     else
  75.     {
  76.         fix := A_LoopReadLine
  77.         StringReplace, fix, fix, %A_Tab%,,all
  78.         StringReplace, fix, fix, %A_Space%,,all
  79.     }
  80.     if fix =
  81.         continue
  82.     if A_Index = 1
  83.     {
  84.         lagrate = %fix%
  85.         continue
  86.     }
  87.     if A_Index = 2
  88.     {
  89.         lagrate1 = %fix%
  90.         continue
  91.     }
  92.     if A_Index = 3
  93.     {
  94.         Hotkey, %fix%, Suspend1
  95.         continue
  96.     }
  97.     if A_Index = 4
  98.     {
  99.         Hotkey, %fix%, Exit1
  100.         continue
  101.     }
  102.     IfInString, fix, =
  103.     {
  104.         StringSplit, Hotk_, fix, =
  105.         %Hotk_1%sequence = %Hotk_2%
  106.         Hotkey, %Hotk_1%, sequenceStart
  107.         Hotkey, %Hotk_1% Up, sequenceStop
  108.     }
  109.     else  IfInString, fix, ,u
  110.     {
  111.         StringTrimRight, nowHotk, fix, 2
  112.         Hotkey, %nowHotk%, start1
  113.         Hotkey, %nowHotk% Up, stop1
  114.     }
  115.     else
  116.     {
  117.         Hotkey, %fix%, start
  118.         Hotkey, %fix% Up, stop
  119.     }
  120. }
  121. ToolTip
  122. return
  123.  
  124. sequenceStart:
  125. StringSplit, sequence_, %A_ThisHotkey%sequence, |
  126. s := 1
  127. while s = 1
  128. {
  129.     Loop %sequence_0%
  130.     {
  131.         temp := sequence_%A_Index%
  132.                 StringSplit, temp_, temp, `,
  133.                 if temp_0 = 3
  134.                 {
  135.                     Send {%temp_1%}
  136.                     Sleep %temp_2%
  137.                 }
  138.                 else
  139.                 {
  140.                     Send {%temp_1%}
  141.                     Sleep %temp_2%
  142.                     Send {LButton Down}
  143.                     Sleep 55
  144.                     Send {Lbutton Up}
  145.                     Sleep %temp_2%
  146.                 }
  147.     }
  148.         if s = 0
  149.             break
  150. }
  151. return
  152.  
  153. sequenceStop:
  154. s := 0
  155. return
  156.  
  157. start:
  158. x := 1
  159. while x = 1
  160. {
  161.     Send {%A_ThisHotkey%}
  162.     Sleep %lagrate%
  163.     Click
  164.     Sleep %lagrate%
  165.     If x = 0
  166.         Break
  167. }
  168. return
  169.  
  170. stop:
  171. x := 0
  172. return
  173.  
  174. start1:
  175. x1 := 1
  176. while x1 = 1
  177. {
  178.     Send {%A_ThisHotkey%}
  179.     Sleep %lagrate1%
  180.     If x1 = 0
  181.         Break
  182. }
  183. return
  184.  
  185. stop1:
  186. x1 := 0
  187. return
  188.  
  189. Exit1:
  190. ExitApp
  191. return
  192.  
  193. Suspend1:
  194. Suspend
  195. toggle := !toggle
  196. if toggle = 1
  197. {
  198. ToolTip, SCRIPT PAUSED
  199. Sleep 1000
  200. ToolTip
  201. }
  202. else
  203. {
  204. ToolTip, SCRIPT STARTED
  205. Sleep 1000
  206. ToolTip
  207. }
  208. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement