Rejuvanation Lua? menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Totoy Tulog's Avatar Member
    Reputation
    3
    Join Date
    May 2015
    Posts
    43
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rejuvanation Lua?

    Code:
    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end 
    /startattack
    /run if IsUsableSpell("Faerie Fire (Feral)(Feral)") then CastSpellByName ("Faerie Fire (Feral)(Feral)") end
    /run if IsUsableSpell("Mangle(Bear Form)") then else CastSpellByName("Mangle(Bear Form)") end
    /run if IsUsableSpell("Maul(Bear Form)") then CastSpellByName ("Maul(Bear Form)") end
    The Problem is it keep spamming "Rejuvenation" once I hit 80% HP. I only want Rejuvenation to be cast once and then go back to bear form.

    Rejuvanation Lua?
  2. #2
    clozer's Avatar Member
    Reputation
    10
    Join Date
    Mar 2016
    Posts
    61
    Thanks G/R
    17/9
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add a condition to check if you have the rejuv buff already.

  3. #3
    Totoy Tulog's Avatar Member
    Reputation
    3
    Join Date
    May 2015
    Posts
    43
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by clozer View Post
    Add a condition to check if you have the rejuv buff already.
    Now that where im clueless. The only condition macro i know.
    if UnitBuff("player","Rejuvenation") but still it wont stop casting rejuvanation.

    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end

    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") elseif UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end

    no matter what i do it just keep spamming rejuvenation lol.

    ive google search and even look at entire PLUA thread. I cant find any code to stop spamming rejuvanation.

    Nevermind ill just use castsequence lol
    /script CloseLoot()
    /run if UnitHealth("player")/UnitHealthMax("player") < 0.9 then RunMacroText("/castsequence reset=5 Rejuvenation, null") end
    /run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end
    /startattack
    /run local _,d,_ = GetSpellCooldown("Faerie Fire (Feral)(Feral)") if (d == 0) then CastSpellByName("Faerie Fire (Feral)(Feral)") end
    /run local _,d,_ = GetSpellCooldown("Mangle(Bear Form)") if (d == 0) then CastSpellByName("Mangle(Bear Form)") end
    /run local _,d,_ = GetSpellCooldown("Swipe(Bear Form)") if (d == 0) then CastSpellByName("Swipe(Bear Form)") end

    it would be helpful if someone post an example how to use macro condition to stop casting for a spell with 0 cooldown.
    Last edited by Totoy Tulog; 06-25-2019 at 09:11 PM.

  4. #4
    clozer's Avatar Member
    Reputation
    10
    Join Date
    Mar 2016
    Posts
    61
    Thanks G/R
    17/9
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end

    thats completly wrong i guess - you want something like this

    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end

    Now he checks if the player has rejuv buff and is under 80% health. If he has the rejuv buff already he will go straight to next statement, if not he will cast rejuv.

  5. Thanks Totoy Tulog (1 members gave Thanks to clozer for this useful post)
  6. #5
    Totoy Tulog's Avatar Member
    Reputation
    3
    Join Date
    May 2015
    Posts
    43
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by clozer View Post
    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Rejuvenation") then CastSpellByName("Bear Form") end

    thats completly wrong i guess - you want something like this

    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end

    Now he checks if the player has rejuv buff and is under 80% health. If he has the rejuv buff already he will go straight to next statement, if not he will cast rejuv.
    Thanks it works..
    Code:
    /script CloseLoot()
    /cleartarget [dead]
    /targetenemy [dead][noexist]
    /startattack
    /run if UnitHealth("player")/UnitHealthMax("player") < 0.8 and not UnitBuff("player", "Rejuvenation") then CastSpellByName ("Rejuvenation") end
    /run if not UnitBuff("player", "Bear Form") then CastSpellByName("Bear Form") end 
    /run local _,d,_ = GetSpellCooldown("Faerie Fire (Feral)(Feral)") if (d == 0) then CastSpellByName("Faerie Fire (Feral)(Feral)") end
    /run local _,d,_ = GetSpellCooldown("Mangle(Bear Form)") if (d == 0) then CastSpellByName("Mangle(Bear Form)") end
    /run if CheckInteractDistance("target", 2) and IsUsableSpell("Swipe(Bear Form)") then CastSpellByName("Swipe(Bear Form)") end
    Now if I want to remove the local _,d,_ = GetSpellCooldown and replace it with like this. It wont cast. maybe there a way to do distance check for melee spell..
    Code:
    /run if IsSpellInRange("Mangle(Bear Form)","target") and IsUsableSpell("Mangle(Bear Form)") then CastSpellByName("Mangle(Bear Form)") end
    Last edited by Totoy Tulog; 06-26-2019 at 10:17 AM.

  7. #6
    clozer's Avatar Member
    Reputation
    10
    Join Date
    Mar 2016
    Posts
    61
    Thanks G/R
    17/9
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mare sure your conditions are true: IsSpellInRange("Mangle(Bear Form)","target") and: IsUsableSpell("Mangle(Bear Form)")

    One of them or both are false, so he wont cast. Make sure wich one it is and find the error.

Similar Threads

  1. [Guide] Lua Scripting Guide is here [Updating]
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 93
    Last Post: 11-04-2008, 06:56 PM
  2. New LUA Scripts
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-26-2007, 05:58 PM
  3. Lua Ascent Script Documentation
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 11-26-2007, 12:42 PM
  4. LUA Refrences
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 11-22-2007, 08:09 PM
All times are GMT -5. The time now is 04:35 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