Help with a routine menu

User Tag List

Results 1 to 6 of 6
  1. #1
    thefrobel's Avatar Member CoreCoins Purchaser
    Reputation
    8
    Join Date
    Jul 2012
    Posts
    99
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with a routine

    Code:
    ProbablyEngine.rotation.register(258, {
    
      --------------------
      -- Start Rotation --
      --------------------
      
      -- Cooldowns
      { "Power Infusion", "modifier.cooldowns" },
      { "Shadowfiend", "modifier.cooldowns" },
        
      -- Keybinds
      { "Mind Sear", "modifier.shift" },
        
      -- If Moving
      { "Power Word: Shield", "player.moving" },
      { "Mind Blast", "player.moving" },
      { "Shadow Word: Death", "player.moving" },
      { "Devouring Plague", "player.moving" },
      { "Cascade", "player.moving" },
      { "Halo", "player.moving" },
      
        
      -- Priority
      { "Shadow Word: Death", "target.health < 20" }, -- SW:Death if target < 20% health
      { "Mind Blast", "player.shadoworbs < 5" }, --Mind Blast less then 5 orbs
      { "Shadow Word: Pain", "player.shadoworbs = 4" },  --  More than 1 condition? Same here?
      { "Vampiric Touch", "player.shadoworbs = 4" }, --  More than 1 condition? Not SW:P already?
      { "Devouring Plague", "player.shadoworbs = 5" },
      { "Insanity", "player.buff(Shadow Word: Insanity)" }, --Insanity with Proc Up
      { "Devouring Plague", "target.debuff(Vampiric Touch).duration > 1" }, -- Weave DP
      { "Mind Spike" },
    
      ------------------
      -- End Rotation --
      ------------------
      
      }, {
      
      ---------------
      -- OOC Begin --
      ---------------
      
      { "Power Word: Fortitude", "!player.buff(Power Word: Fortitude)" },
      { "Inner Fire", "!player.buff(Inner Fire)" },
      { "Shadow Form", "!player.buff(Shadowform)" },
      
      -------------
      -- OOC End --
      -------------
      
      })
    I understand why it just keeps casting SW:P until it MB's to 5 Orbs.
    Not sure how to write multiple conditions.

    Help with a routine
  2. #2
    lg40's Avatar Member
    Reputation
    1
    Join Date
    Nov 2014
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Shadow Word: Pain", { "player.shadoworbs = 4", "target.debuff(Shadow Word: Pain).duration <= 2" }},


    Using spellids is sometimes easier aswell

  3. #3
    Greymalkin's Avatar Corporal
    Reputation
    13
    Join Date
    May 2014
    Posts
    28
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by thefrobel View Post
    I understand why it just keeps casting SW:P until it MB's to 5 Orbs.
    Not sure how to write multiple conditions.
    I'm not sure what you mean by the first line here. Does it keep casting Shadow Word: Pain or Mind Blast to reach the 5 Shadow Orb limit? Is it casting only one and not the other? This may partially be an priority order issue. PE evaluates from top to bottom of the lua file so actions desired more often should be above those desired less often. Maybe this is a cleaner way of thinking about it, "If all spells were available at the same time, what order would you want them to be used?" When I write the priority section of the a CR, typically I start with this general structure and then adjust it as needed with testing. This allows the execute / proc based actions to be used during their limited availability, while maximum / medium resource actions are only used when the resource generating / filler actions build up enough of those resources for them to be available. This is a simple view of the priority section, but hopefully it's helpful in getting the order needed.
    1. Execute phase actions
    2. Proc based actions
    3. Maximum resource actions
    4. Medium resource actions
    5. Resource / Proc generating actions
    6. Filler actions



    As for the writing of multiple conditionals, put simply, each of the lines are parsed as { action, condition, target } if each of those entries are present. If you want to have a multiple conditions on a single line, then enclose them with curly brackets where the condition would go in the base line, i.e. { action, { condition1, condition2, condition3 }, target }. An example of this from your own CR is below. (I prefer to keep the target explicitly declared (and use the "target.enemy" conditional) so that PE isn't trying to cast harmful spells when you are targeting a friendly or yourself.)
    Code:
    { "Vampiric Touch", { "player.shadoworbs == 4", "target.debuff(Vampiric Touch).duration < 3", "!player.moving", "target.enemy" }, "target" },

    Another way of having multiple conditions is to nest a group of resulting actions that share a common conditional. Take the If Moving section of your code for example. Here is a "slightly" fleshed out version of it using player.moving as a conditional that is required before moving into the individual lines. If the player is standing still, then PE passes over the entire section. Even within this you can still have multiple additional conditionals on the same line. (I do not play a Shadow Priest so all of the logic for the conditionals below is theoretical from my quick look over of the spells. As such, use this purely an example so perform your own testing as needed.)
    Code:
      -- If Moving
      {{
      { "Power Word: Shield", { "!player.buff(Power Word: Shield)", "player.spell(Shadow Word: Shield).cooldown == 0" }, "player" }, -- Not sure why Shield is in here. Maybe to help the healers or a little self preservation?
      { "Devouring Plague", "player.shadoworbs == 5", "target" },
      { "Shadow Word: Pain", "target.debuff(Shadow Word: Pain).duration < 4", "target" },
      { "Mind Blast", "player.buff(Shadowy Insight)", "target" },
      { "Shadow Word: Death", { "player.spell(Shadow Word: Death).cooldown == 0", "target.health < 20" }, "target" },
      { "Shadow Word: Death", { "player.spell(Shadow Word: Death).cooldown == 0", "player.health >= 40" }, "target" }, -- Don't make your healers hate you.
      { "Cascade", { "talent(6,1)", "player.spell(Cascade).cooldown == 0" }, "target" },
      { "Halo", { "talent(6,3)", "player.spell(Halo).cooldown == 0" } }
      { "Devouring Plague", { "player.shadoworbs >= 1", "!target.debuff(Devouring Plague)" }, "target" },
      }, "player.moving" },

    Side note: Rather than "=" (stating A does equal B), use "==" (querying if A equals B) for evaluating equals in the conditionals.

  4. #4
    thefrobel's Avatar Member CoreCoins Purchaser
    Reputation
    8
    Join Date
    Jul 2012
    Posts
    99
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right on.
    Thanks IG40 and Greymalkin!

  5. #5
    thefrobel's Avatar Member CoreCoins Purchaser
    Reputation
    8
    Join Date
    Jul 2012
    Posts
    99
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Current Incarnation:
    Code:
    -- SPEC ID 258
    -- 12/30/14 - Updated by thefrobel
    
    ProbablyEngine.rotation.register(258, {
    
      --------------------
      -- Start Rotation --
      --------------------
      { "Shadow Form", "!player.buff(Shadowform)" },
      
      -- Cooldowns
      { "Power Infusion", "modifier.cooldowns" },
      { "Shadowfiend", "modifier.cooldowns" },
        
      -- Keybinds
      { "Mind Sear", "modifier.shift" },
      { "Mind Sear", "modifier.shift" },
        
      -- If Moving
      { "Power Word: Shield", "player.moving" },
      { "Mind Blast", "player.moving" },
      { "Shadow Word: Death", "player.moving" },
      { "Devouring Plague", "player.moving" },
    
        
      -- Priority
      { "Shadow Word: Death", "target.health < 20" }, -- SW:Death if target < 20% health
      { "Mind Blast", "player.shadoworbs < 5" }, --Mind Blast less then 5 orbs
      { "Shadow Word: Pain", {"player.shadoworbs >= 4", "!target.debuff(Shadow word: Pain)"  }},  --  Weave SWP
      { "Vampiric Touch", {"player.shadoworbs >= 4", "!target.debuff(Vampiric Touch)"  }}, --  Weave VT
      { "Devouring Plague", "player.shadoworbs = 5" },  -- DP
      { "Insanity", "player.buff(Shadow Word: Insanity).duration > 1" }, --Insanity with Proc Up
      { "Devouring Plague", {"target.debuff(Vampiric Touch).duration > 1", "player.shadoworbs = 3" }}, -- Weave DP
      { "Mind Spike", "target.debuff(Vampiric Touch).duration < 3" },
    
      ------------------
      -- End Rotation --
      ------------------
      
      }, {
      
      ---------------
      -- OOC Begin --
      ---------------
      
      { "Power Word: Fortitude", "!player.buff(Power Word: Fortitude)" },
      { "Inner Fire", "!player.buff(Inner Fire)" },
      { "Shadow Form", "!player.buff(Shadowform)" },
      
      -------------
      -- OOC End --
      -------------
      
      })
    Need to spruce up the execute portion of this. Is .timeToDie a built in function ? or something like it?

  6. #6
    Mackdaddy2887's Avatar Knight-Lieutenant
    Reputation
    43
    Join Date
    Mar 2011
    Posts
    265
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Greymalkin View Post
    1. Execute phase actions
    2. Proc based actions
    3. Maximum resource actions
    4. Medium resource actions
    5. Resource / Proc generating actions
    6. Filler actions


    This is pretty much identical to how I do healing routines.
    1. "Execute range" is "emergency healing"
    2. Proc effects and buff upkeeping
    3. High damage healing
    4. Moderate damage healing
    5. Light damage healing
    6. Filler

    Usually in each group, like high damage healing for example, I have a single target and an aoe target subgroup.


    About to start on updating my holy routine from SoO to WoD.

Similar Threads

  1. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  2. help with emu server
    By Chsz in forum World of Warcraft General
    Replies: 1
    Last Post: 07-04-2006, 10:01 PM
  3. Help with wowglider
    By Voldaroi in forum World of Warcraft General
    Replies: 6
    Last Post: 06-17-2006, 08:54 PM
  4. Help with Ranks!!
    By Krazzee in forum Community Chat
    Replies: 7
    Last Post: 06-16-2006, 06:58 PM
  5. Help with Auto-it!!
    By Krazzee in forum World of Warcraft General
    Replies: 7
    Last Post: 06-12-2006, 09:22 PM
All times are GMT -5. The time now is 11:36 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search