[REQ] AutoHotKey Ret Pally Rotation? menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Sikas's Avatar Active Member
    Reputation
    69
    Join Date
    Feb 2007
    Posts
    386
    Thanks G/R
    6/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [REQ] AutoHotKey Ret Pally Rotation?

    Hello,

    Since LuaNinja was gone awhile ago and I'm just looking for a Ret Pally 'rotation' script that will fire off certain keys after certain intervals, and also have a toggle so I can turn off the script because I'd like to chat. :P

    Judgements are on a 8 second cooldown.
    Crusader Strike is on a 4 second cooldown.
    Divine Storm is on a 10 second cooldown BUT with 2 piece Tier 10, the cooldown can reset, so if this key can be pressed constantly.. <3
    Consecration is on a 10 second cooldown.
    Hammer of Wrath is on a 6 second cooldown.
    Exorcism is on a 15 second cooldown.

    Here's an example I found on AHK forum with a guy using a Hunter Shot 'Rotation'.. maybe it'll help!

    Code:
    #cs  ----------------------------------------------------------------------------
     AutoIt  Version: 3.3.0.0
     Author:         Complex
     Script Function:
        To automate the casting rotation  of a warlock in the game World of Warcraft
    #ce  ----------------------------------------------------------------------------
    Global  $GCD = 1450  ; the standard global  cool down (ADDED 50 MS FOR SERVER LAG)
    Global $SBcd = 2350  ; the longer cool down of a specific  spell (ADDED 50 MS FOR SERVER LAG)
    Global $Mana = 2729  ; collection of mana used by spells,  starting at 2729 to force as first spell
    Global $Spells  ; database to house the spell  information
    Global $Duration  ; databse to maintain the current durration of each spell
    Global  $Paused  ; toggle to pause and  start the script, defaults paused
    #cs  ----------------------------------------------------------------------------
    The  global array Spells
    key to be sent to the game client | cool down |  mana cost | durration
    t | 1430 | -2729 | 40000
    1 | 1430 |   434 |  12000
    2 | 1430 |   506 | 18000
    3 | 1430 |   543 | 15000
    4 |  1430 |   361 | 28000
    5 | 2390 |   655 |     0
    #ce  ----------------------------------------------------------------------------
    Dim  $Spells[6][4] =  [['t',$GCD,-2729,40000],['1',$GCD,434,12000],['2',$GCD,506,18000],['3',$GCD,543,15000],['4',$GCD,361,28000],['5',$SBcd,655,0]]
    Dim  $Duration[6] = [0,0,0,0,0,0]
    
    HotKeySet("{PAUSE}", "TogglePause")
    HotKeySet("{ESC}",  "Terminate")
    
    WinWaitActive("World of Warcraft")
    
    ; The main driver
    While 1
        Select
        case $Mana >= 2729  ; check the amount of mana
            send("{t}")  ; send the key stroke t
           $Mana += $Spells[0][2]  ; add the  value of the spell cost (this instance is negitive)
              If $Mana < 0 Then $Mana = 0  ;  value must never drop below zero
          $Duration[0] =  $Spells[0][3]  ; set the duration  to the master value
          CoolDonws($Spells[0][1])  ; lower the duration of all spells based  on cool down
          Sleep($Spells[0][1])  ; pause the script for the cool down
    
         case $Duration[1] <= 0
          send("{1}")
            $Mana +=  $Spells[1][2]
          CoolDonws($Spells[1][1])  ; cool downs happen befor the duration is reset for  this spell since its cast time is the same as the cool down
           $Duration[1] = $Spells[1][3]
             ; special case is there is a spell 2 active then 1 resets its  counter
             If $Duration[2] > 1400 Then $Duration[2] =  $Spells[2][3]
          Sleep($Spells[1][1])
    
        case  $Duration[2] <= 0
          send("{2}")
            $Mana +=  $Spells[2][2]
          $Duration[2] = $Spells[2][3]
           CoolDonws($Spells[2][1])
          Sleep($Spells[2][1])
    
        case  $Duration[3] <= 0
          send("{3}")
            $Mana +=  $Spells[3][2]
          CoolDonws($Spells[3][1])
          $Duration[3] =  $Spells[3][3]
          Sleep($Spells[3][1])
    
        case $Duration[4]  <= 0
          send("{4}")
            $Mana += $Spells[4][2]
           $Duration[4] = $Spells[4][3]
          CoolDonws($Spells[4][1])
           Sleep($Spells[4][1])
    
        case $Duration[5] <= 0
           send("{5}")
            $Mana += $Spells[5][2]
          $Duration[5] =  $Spells[5][3]
          CoolDonws($Spells[5][1])
           Sleep($Spells[5][1])
    
    EndSelect
       While $Paused
           Sleep(100)
       Wend
    WEnd
    
    ;Functions
    Func CoolDonws($cd)
       For $i = 0 to 5
           $Duration[$i] -= $cd
          ;   duration can never go below 0
          If $Duration < 0 Then  $Duration = 0
       Next
    EndFunc
    
    Func TogglePause()
       ; serves two purposes, when paused the  state of the script is reset
       ; and it pauses the script
       If $Paused Then
           ToolTip("")
          $Mana = 2729
          For $i = 0 to 5
              $Duration[$i] = 0
          Next
          $Paused = False
       Else
           $Paused = True
          ToolTip('Script is "Paused"',0,0)
        Endif
    EndFunc
    
    Func Terminate()
       Exit 0
    EndFunc
    Code:
    IfWinActive, World of Warcraft 
    #HotkeyInterval 2000
    #MaxHotkeysPerInterval  70
    
    
    ;repeats a specified  key while holding down a  hotkey and sending other keystrokes at set timeintervals.
    
    ;sets wich key to be the first key  to be sent after loading the script and pressing the button
    var_keytopress  = 2
    
    ;set to 1 if you want  the key to be repeated in the  rotation
    var_key2run = 1
    var_key3run = 1
    var_key4run = 1
    
    ;set to 1 if you want this to be used at  the start of the rotation the first time after script is loaded
    var_key2q  = 1
    var_key3q = 1
    var_key4q = 1
    
    ;keys to be used and what I originally made them to do.
    var_key1  = {Numpad1} ;Steady Shot
    var_key2  = {Numpad2} ;Sting
    var_key3  = {Numpad3} ;Auto Shot
    var_key4  = {Numpad4} ;Multishot
    
    ;cooldowns after shooting
    var_gcd  = 1500 ;this is what you want to  use for global cooldown
    var_cd2 = 0 ;extra time before fire this particular shot
    var_cd3  = 0
    var_cd4 = 0
    
    ;Times  to be used between trying to fire special shots (like stings)
    var_key2_timer  = 15000
    var_key3_timer = 6000
    var_key4_timer = 12000
    
    $Numpad1::
    SetTimer,  CheckQ, 0 ;checks if the cooldown  of sting is down
    if var_key2run = 1 ;checks if var_key2 has been sent to not reset the timer  until that has happened
    {
    SetTimer, Key2, %var_key2_timer% ;starts the function to change key to var_key2
    }
    var_key2run  = 0 ;will be reset to 1 when y has  been sent
    
    if var_key3run = 1
    {
    SetTimer, Key3,  %var_key3_timer%
    }
    var_key3run = 0
    
    if var_key4run = 1
    {
    SetTimer,  Key4, %var_key4_timer%
    }
    var_key4run = 0
    
    ;This loop will run as long as the button  is pressed.
    Loop
    {
    
    if not GetKeyState("Numpad1",  "P")
    break
    
    if var_keytopress = 1
    {
    Send, %var_key1%
    if  var_key2q = 1
    var_keytopress = 2
    else if var_key3q = 1
    var_keytopress  = 3
    else if var_key4q = 1
    var_keytopress = 4
    else
    var_keytopress  = 1
    
    Sleep, %var_gcd%
    }
    
    else if var_keytopress = 2
    {
    Send,  %var_key2%
    var_key2q = 0
    
    if var_key2q = 1
    var_keytopress =  2
    else if var_key3q = 1
    var_keytopress = 3
    else if var_key4q =  1
    var_keytopress = 4
    else
    var_keytopress = 1
    
    var_key2run  = 1
    Sleep, %var_gcd%
    }
    
    else if var_keytopress = 3
    {
    Send,  %var_key3%
    var_key3q = 0
    
    if var_key2q = 1
    var_keytopress =  2
    else if var_key3q = 1
    var_keytopress = 3
    else if var_key4q =  1
    var_keytopress = 4
    else
    var_keytopress = 1
    
    var_key3run  = 1
    Sleep, %var_gcd%
    }
    
    else if var_keytopress = 4
    {
    Send,  %var_key4%
    var_key4q = 0
    
    if var_key2q = 1
    var_keytopress =  2
    else if var_key3q = 1
    var_keytopress = 3
    else if var_key4q =  1
    var_keytopress = 4
    else
    var_keytopress = 1
    
    var_key4run  = 1
    Sleep, %var_gcd%
    }
    
    }
    
    Return
    
    Key2:
    var_keytopress  = 2
    var_key2q = 1
    Sleep, %var_cd2%
    return
    
    Key3:
    var_keytopress  = 3
    var_key3q = 1
    Sleep, %var_cd3%
    return
    
    Key4:
    var_keytopress  = 4
    var_key4q = 1
    Sleep, %var_cd4%
    return
    
    CheckQ:
    if  var_key2q = 1
    var_keytopress = 2
    else if var_key3q = 1
    var_keytopress  = 3
    else if var_key4q = 1
    var_keytopress = 4
    return
    Last edited by Sikas; 04-11-2010 at 11:08 AM. Reason: Seems I found a better coded one, but it's for a Warlock.

    [REQ] AutoHotKey Ret Pally Rotation?

Similar Threads

  1. Ret Pally Rotation Macro
    By Sikas in forum WoW UI, Macros and Talent Specs
    Replies: 32
    Last Post: 02-12-2010, 07:25 PM
  2. [Request]:Level 62 ret pally to 70 (Reward)
    By Job For a Cowboy in forum Members Only Gold And Powerleveling Buy Sell
    Replies: 3
    Last Post: 05-06-2008, 03:03 PM
  3. UBER ret Pally / Enchancement Shamman / Warrior tip
    By Yooloze in forum World of Warcraft Guides
    Replies: 18
    Last Post: 10-01-2007, 12:46 PM
  4. A ret pally trick
    By Hitoshi in forum World of Warcraft Exploits
    Replies: 23
    Last Post: 09-29-2007, 04:03 PM
  5. Ret pally Guide All you need to know!
    By EliMob441 in forum World of Warcraft Guides
    Replies: 6
    Last Post: 12-26-2006, 02:17 PM
All times are GMT -5. The time now is 11:52 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search