Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.70 KB | None | 0 0
  1. Func castingEngine()
  2.  
  3.     cast(7)
  4.     For $i=1 To 6
  5.         cast($i)
  6.     Next
  7.  
  8.     Do
  9.         $cbType = "int"
  10.  
  11.         For $i=3 To 6
  12.             CmdCB($CA_SKILLRECHARGE, $i)
  13.             If Not $cbVar[0] Then
  14.                 cast($i)
  15.             EndIf
  16.         Next
  17.  
  18.         $cbType = "float"
  19.         CmdCB($CA_GETNEARESTALIVEENEMYTOAGENT, -2)
  20.  
  21.     Until $cbVar[1] > 1250
  22.  
  23. EndFunc
  24.  
  25.  
  26. ;cast
  27. ;casts the skill in slot $skillBarSlot on target $target
  28. ;with $waitForCast=True the function returns after the character has finished casting
  29. Func cast($skillBarSlot, $target = -2, $waitForCast=True)
  30.  
  31.     $cbType = "int"
  32.  
  33.     Cmd($CA_USESKILL, $skillBarSlot, $target)
  34.  
  35.     If $waitForCast Then
  36.         Sleep(150)
  37.         Do
  38.             CmdCB($CA_CASTING)
  39.             Sleep(10)
  40.         Until $cbVar[0] = 0
  41.     EndIf
  42.  
  43. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement