Need .lua help! +rep menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need .lua help! +rep

    I have a npc and lua script, it was origanally made by brantx but i have tried to customize it, the problem is it wont cast ANY spells

    Here is the script:

    Code:
    function DeathKnightKthals_EnterCombat (pUnit, Event)
        pUnit:RegisterEvent("Kill all", 600000, 0)
        local Choice=math.random(1, 3)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Blade stike will cause your death!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "%t There is still time to retreat!")
            elseif Choice==3 then
                pUnit:SendChatMessage(14, 0, "You have 10 minutes to defeat me or....")
                pUnit:RegisterEvent("DeathKnightKthals_1",1000, 0)
      end
    end
    
    function DeathKnightKthals_OnKill (pUnit, Event)
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Dont say i didn't warn you!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "I have freed you, run now!")
      end
    end
    
    function DeathKnightKthals_LeaveCombat (pUnit, Event)
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Never challenge the Death Knight!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "Come back with more ranged DPS next time!")
      end
    end
    
    function DeathKnightKthals_Died (pUnit, Event)
        pUnit:SendChatMessage(14, 0, "This is my final move... aghhh")
        pUnit:FullCastSpellOnTarget(38831, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(25699, pUnit:GetMainTank())
    end
    
    function DeathKnightKthals_1(pUnit, Event)
     if pUnit:GetHealthPct() < 96 then
      pUnit:RemoveEvents();
        pUnit:SendChatMessage(14, 0, "Run now! Before it is too late!")
        pUnit:CastSpell(32829)
        pUnit:RegisterEvent("DeathKnightKthals_2",1000, 0)
       end
    end
    
    function DeathKnightKthals_2(pUnit, Event)
     if pUnit:GetHealthPct() < 93 then
        pUnit:RemoveEvents();
        pUnit:SendChatMessage(14, 0, "Spirit Wolfs! Come to me!")
        pUnit:CastSpell(43110) -- Summons Spirit Wolf
        pUnit:RegisterEvent("DeathKnightKthals_3",1000, 0)
       end
    end
    
    function DeathKnightKthals_3(pUnit, Event)
     if pUnit:GetHealthPct() < 91 then
        pUnit:SendChatMessage(14, 0, "You don't want to die here! Turn back before its to late!")
        pUnit:FullCastSpellOnTarget(41068, pUnit:GetRandomPlayer(0)) -- Makes Physical Damage increase by 100%
        pUnit:CastSpell(43110) -- Summons Spirit Wolf
        pUnit:CastSpell(43110) -- Summons Spirit Wolf  This rounds up of 2 Spirit Wolfs for the caster
        pUnit:RegisterEvent("DeathKnightKthals_4",1000, 0)
       end
    end
    
    function DeathKnightKthals_4(pUnit,Event)
     if pUnit:GetHealthPct() < 89 then
        pUnit:SendChatMessage(14, 0, "I'll show you the dark side of an Death Knight Kthals!")
        pUnit:FullCastSpellOnTarget(43439, pUnit:GetMainTank())  -- 6475 to 7525 Shadow damage after 30 sec.
        pUnit:CastSpell(18662) -- Doomguard
        pUnit:FullCastSpellOnTarget(27226, pUnit:GetMainTank()) -- Decrease armor by 800, advance damage by 180
        pUnit:RegisterEvent("DeathKnightKthals_5",1000, 0)
       end
    end
    
    function DeathKnightKthals_5(pUnit,Event)
     if pUnit:GetHealthPct() < 86 then
        pUnit:SendChatMessage(14, 0, "Prepare for extermination!")
        pUnit:CastSpell(36455)
        pUnit:SetScale(3)
        pUnit:SetModel(6372)
        pUnit:RegisterEvent("DeathKnightKthals_6",1000, 0)
       end
    end
    
    function DeathKnightKthals_6(pUnit,Event)
     if pUnit:GetHealthPct() < 83 then
        pUnit:SendChatMessage(14, 0, "One of your casters are dead!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(4))
        pUnit:RegisterEvent("DeathKnightKthals_7",1000, 0)
       end
    end
    
    function DeathKnightKthals_7(pUnit,Event)
     if pUnit:GetHealthPct() < 80 then
        pUnit:SendChatMessage(14, 0, "This has gone far enough %n, even for a %R like you, Nobody cant stand for this!")
        pUnit:CastSpell(40441)
        pUnit:FullCastSpellOnTarget(40932, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(36836, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(38533, pUnit:GetMainTank())
        pUnit:CastSpellOnTarget(38533, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_8",1000, 0)
       end
    end
    
    function DeathKnightKthals_8(pUnit,Event)
     if pUnit:GetHealthPct() < 86 then 
        pUnit:SendChatMessage(14, 0, "The End is Now!")
        pUnit:SendChatMessage(14, 0, "Souls of Dead Warriors, I Command you to release yourselfs and Corrupt this Un-Divine %R, Release your anger on The %R")
        pUnit:FullCastSpellOnTarget(45657, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_9",1000, 0)
       end
    end
    
    function DeathKnightKthals_9(pUnit,Event)
     if pUnit:GetHealthPct() < 83 then
        pUnit:SendChatMessage(14, 0, "Your own Rogue shall fall!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(6))
        pUnit:RegisterEvent("DeathKnightKthals_10",1000, 0)
       end
    end
    
    function DeathKnightKthals_10(pUnit,Event)
     if pUnit:GetHealthPct() < 81 then
        pUnit:SendChatMessage(14, 0, "Why so far away? Don't want to fight?! Then DIE!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(3))
        pUnit:RegisterEvent("DeathKnightKthals_11",1000, 0)
       end
    end
    
    function DeathKnightKthals_11(pUnit,Event)
     if pUnit:GetHealthPct() < 76 then
        pUnit:SendChatMessage(14, 0, "Master i require aid!")
        pUnit:CastSpell(43110) -- |
        pUnit:CastSpell(43110) -- |
        pUnit:CastSpell(43110) -- | -- These are Spirit Wolves!
        pUnit:CastSpell(43110) -- |
        pUnit:RegisterEvent("DeathKnightKthals_12",1000, 0)
       end
    end
    
    function DeathKnightKthals_12(pUnit,Event)
     if pUnit:GetHealthPct() < 73 then
        pUnit:SendChatMessage(14, 0, "The end has come! Come to me my demons!")
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:CastSpell(22865)  --|
                pUnit:CastSpell(22865)  --|-- Summon Doom Guards
                pUnit:CastSpell(22865)  --|
                pUnit:CastSpell(22865)  --|
            elseif Choice==2 then
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|--- Summons Spirit Wolves
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|
        pUnit:RegisterEvent("DeathKnightKthals_13",1000, 0)
       end
    end
    end
    
    function DeathKnightKthals_13(pUnit,Event)
     if pUnit:GetHealthPct() < 66 then
        pUnit:SendChatMessage(14, 0, "Light, Give me strength")
        pUnit:FullCastSpellOnTarget(41472, pUnit:GetMainTank())
        pUnit:CastSpell(27778)
        pUnit:CastSpell(27779)
        pUnit:CastSpell(1020)
        pUnit:RegisterEvent("DeathKnightKthals_14",1000, 0)
       end
    end
    
    function DeathKnightKthals_14(pUnit,Event)
     if pUnit:GetHealthPct() < 55 then
        pUnit:SendChatMessage(14, 0, "No... My powers... are faiding!")
        pUnit:SetModel(5233)
        pUnit:SetScale(1)
        pUnit:RegisterEvent("DeathKnightKthals_15",1000, 0)
       end
    end
    
    function DeathKnightKthals_15(pUnit,Event)
     if pUnit:GetHealthPct() < 43 then
        pUnit:SendChatMessage(14, 0, "I Will not give up this easily!")
        pUnit:FullCastSpellOnTarget(27085, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(27085, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(18435, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(18435, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_16",1000, 0)
       end
    end
    
    function DeathKnightKthals_16(pUnit,Event)
     if pUnit:GetHealthPct() <36 then
        pUnit:SendChatMessage(14, 0, "This will hurt only for a second!")
        pUnit:FullCastSpellOnTarget(45150, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_17",1000, 0)
       end
    end
    
    function DeathKnightKthals_17(pUnit,Event)
     if pUnit:GetHealthPct() < 30 then
        pUnit:SendChatMessage(14, 0,"There is need of mana for you!")
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:RegisterEvent("DeathKnightKthals_18",1000, 0)
       end
    end
    
    function DeathKnightKthals_18(pUnit,Event)
     if pUnit:GetHealPct() < 22 then
        pUnit:SendChatMessage(14, 0, "Seems like your a mighty ... Good... Time to show you the true power of a DeathKnightKthals!")
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:FullCastSpellOnTarget(45150, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:SendChatMessage(14, 0, "HAHAHAHA THERE IS NO SURVIVING!!!!!")
        pUnit:RegisterEvent("DeathKnightKthals_19",1000, 0)
       end
    end
    
    function DeathKnightKthals_19(pUnit,Event)
     if pUnit:GetHealthPct() < 21 then
        pUnit:SendChatMessage(14, 0, "You.. survived...through that... its... its impossible!!")
        pUnit:RegisterEvent("DeathKnightKthals_20",1000, 0)
       end
    end
    
    function DeathKnightKthals_20(pUnit,Event)
     if pUnit:GetHealthPct() < 18 then
        pUnit:SendChatMessage(14, 0, "Great one... i .. i am sorry..I Cannot win this...")
        pUnit:RegisterEvent("DeathKnightKthals_20",1000, 0)
       end
    end
    
    function DeathKnightKthals_21(pUnit,Event)
     if pUnit:GetHealthPct() < 10 then
        pUnit:SendChatMessage(14, 0, "I must... Kill!")
        pUnit:CastSpellOnTarget(29973, pUnit:GetMainTank())
       end
    end
    
    function Kill_all(pUnit, Event)
        pUnit:CastSpellOnTarget(35354, pUnit:GetRandomPlayer(7))
    end
    
    function DeathKnightKthals_Start(pUnit,Event)
        pUnit:RegisterEvent("DeathKnightKthals_1",1000, 0)
    end
    RegisterUnitEvent(94500, 1, "DeathKnightKthals_Start")
    RegisterUnitEvent(94500, 1, "DeathKnightKthals_EnterCombat")
    RegisterUnitEvent(94500, 3, "DeathKnightKthals_OnKill")
    RegisterUnitEvent(94500, 2, "DeathKnightKthals_LeaveCombat")
    RegisterUnitEvent(94500, 4, "DeathKnightKthals_Died")
    Could anyone help?
    Last edited by Kiev; 06-15-2008 at 05:14 PM.

    Need .lua help! +rep
  2. #2
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump - no reply

  3. #3
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does he says what he should say?

    If not, check if you have enables lua in your conf files

  4. #4
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    he does yes

  5. #5
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just checking some stuff that could be wrong..

    Remove the
    pUnit:RegisterEvent("DeathKnightKthals_1",1000, 0)in the EnterCombat function.

  6. #6
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i added that as it didnt work before... still dont

  7. #7
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has you tested if his orginal script is wrong first? =)

    Else, is he saying everything, even in the last phase?

  8. #8
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    o, he wont say things on a certain percent only at death etc

  9. #9
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Problem has been found, modified it some (just one part) so you still would have everything in it. I just removed the Start function it had. And added the register phase 1 to the EnterCombat... you can't have 2x functions that register on entercombat

    Code:
    function DeathKnightKthals_EnterCombat (pUnit, Event)
        pUnit:RegisterEvent("Kill all", 600000, 0)
        local Choice=math.random(1, 3)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Blade stike will cause your death!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "%t There is still time to retreat!")
            elseif Choice==3 then
                pUnit:SendChatMessage(14, 0, "You have 10 minutes to defeat me or....")
                pUnit:RegisterEvent("DeathKnightKthals_1",1000, 0)
      end
      pUnit:RegisterEvent("DeathKnightKthals_1",1000, 0)
    end
    
    function DeathKnightKthals_OnKill (pUnit, Event)
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Dont say i didn't warn you!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "I have freed you, run now!")
      end
    end
    
    function DeathKnightKthals_LeaveCombat (pUnit, Event)
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:SendChatMessage(14, 0, "Never challenge the Death Knight!")
            elseif Choice==2 then
                pUnit:SendChatMessage(14, 0, "Come back with more ranged DPS next time!")
      end
    end
    
    function DeathKnightKthals_Died (pUnit, Event)
        pUnit:SendChatMessage(14, 0, "This is my final move... aghhh")
        pUnit:FullCastSpellOnTarget(38831, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(25699, pUnit:GetMainTank())
    end
    
    function DeathKnightKthals_1(pUnit, Event)
     if pUnit:GetHealthPct() < 96 then
      pUnit:RemoveEvents();
        pUnit:SendChatMessage(14, 0, "Run now! Before it is too late!")
        pUnit:CastSpell(32829)
        pUnit:RegisterEvent("DeathKnightKthals_2",1000, 0)
       end
    end
    
    function DeathKnightKthals_2(pUnit, Event)
     if pUnit:GetHealthPct() < 93 then
        pUnit:RemoveEvents();
        pUnit:SendChatMessage(14, 0, "Spirit Wolfs! Come to me!")
        pUnit:CastSpell(43110) -- Summons Spirit Wolf
        pUnit:RegisterEvent("DeathKnightKthals_3",1000, 0)
       end
    end
    
    function DeathKnightKthals_3(pUnit, Event)
     if pUnit:GetHealthPct() < 91 then
        pUnit:SendChatMessage(14, 0, "You don't want to die here! Turn back before its to late!")
        pUnit:FullCastSpellOnTarget(41068, pUnit:GetRandomPlayer(0)) -- Makes Physical Damage increase by 100%
        pUnit:CastSpell(43110) -- Summons Spirit Wolf
        pUnit:CastSpell(43110) -- Summons Spirit Wolf  This rounds up of 2 Spirit Wolfs for the caster
        pUnit:RegisterEvent("DeathKnightKthals_4",1000, 0)
       end
    end
    
    function DeathKnightKthals_4(pUnit,Event)
     if pUnit:GetHealthPct() < 89 then
        pUnit:SendChatMessage(14, 0, "I'll show you the dark side of an Death Knight Kthals!")
        pUnit:FullCastSpellOnTarget(43439, pUnit:GetMainTank())  -- 6475 to 7525 Shadow damage after 30 sec.
        pUnit:CastSpell(18662) -- Doomguard
        pUnit:FullCastSpellOnTarget(27226, pUnit:GetMainTank()) -- Decrease armor by 800, advance damage by 180
        pUnit:RegisterEvent("DeathKnightKthals_5",1000, 0)
       end
    end
    
    function DeathKnightKthals_5(pUnit,Event)
     if pUnit:GetHealthPct() < 86 then
        pUnit:SendChatMessage(14, 0, "Prepare for extermination!")
        pUnit:CastSpell(36455)
        pUnit:SetScale(3)
        pUnit:SetModel(6372)
        pUnit:RegisterEvent("DeathKnightKthals_6",1000, 0)
       end
    end
    
    function DeathKnightKthals_6(pUnit,Event)
     if pUnit:GetHealthPct() < 83 then
        pUnit:SendChatMessage(14, 0, "One of your casters are dead!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(4))
        pUnit:RegisterEvent("DeathKnightKthals_7",1000, 0)
       end
    end
    
    function DeathKnightKthals_7(pUnit,Event)
     if pUnit:GetHealthPct() < 80 then
        pUnit:SendChatMessage(14, 0, "This has gone far enough %n, even for a %R like you, Nobody cant stand for this!")
        pUnit:CastSpell(40441)
        pUnit:FullCastSpellOnTarget(40932, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(36836, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(38533, pUnit:GetMainTank())
        pUnit:CastSpellOnTarget(38533, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_8",1000, 0)
       end
    end
    
    function DeathKnightKthals_8(pUnit,Event)
     if pUnit:GetHealthPct() < 86 then 
        pUnit:SendChatMessage(14, 0, "The End is Now!")
        pUnit:SendChatMessage(14, 0, "Souls of Dead Warriors, I Command you to release yourselfs and Corrupt this Un-Divine %R, Release your anger on The %R")
        pUnit:FullCastSpellOnTarget(45657, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_9",1000, 0)
       end
    end
    
    function DeathKnightKthals_9(pUnit,Event)
     if pUnit:GetHealthPct() < 83 then
        pUnit:SendChatMessage(14, 0, "Your own Rogue shall fall!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(6))
        pUnit:RegisterEvent("DeathKnightKthals_10",1000, 0)
       end
    end
    
    function DeathKnightKthals_10(pUnit,Event)
     if pUnit:GetHealthPct() < 81 then
        pUnit:SendChatMessage(14, 0, "Why so far away? Don't want to fight?! Then DIE!")
        pUnit:CastSpellOnTarget(5, pUnit:GetRandomPlayer(3))
        pUnit:RegisterEvent("DeathKnightKthals_11",1000, 0)
       end
    end
    
    function DeathKnightKthals_11(pUnit,Event)
     if pUnit:GetHealthPct() < 76 then
        pUnit:SendChatMessage(14, 0, "Master i require aid!")
        pUnit:CastSpell(43110) -- |
        pUnit:CastSpell(43110) -- |
        pUnit:CastSpell(43110) -- | -- These are Spirit Wolves!
        pUnit:CastSpell(43110) -- |
        pUnit:RegisterEvent("DeathKnightKthals_12",1000, 0)
       end
    end
    
    function DeathKnightKthals_12(pUnit,Event)
     if pUnit:GetHealthPct() < 73 then
        pUnit:SendChatMessage(14, 0, "The end has come! Come to me my demons!")
        local Choice=math.random(1, 2)
            if Choice==1 then
                pUnit:CastSpell(22865)  --|
                pUnit:CastSpell(22865)  --|-- Summon Doom Guards
                pUnit:CastSpell(22865)  --|
                pUnit:CastSpell(22865)  --|
            elseif Choice==2 then
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|--- Summons Spirit Wolves
                pUnit:CastSpell(43110)  --|
                pUnit:CastSpell(43110)  --|
        pUnit:RegisterEvent("DeathKnightKthals_13",1000, 0)
       end
    end
    end
    
    function DeathKnightKthals_13(pUnit,Event)
     if pUnit:GetHealthPct() < 66 then
        pUnit:SendChatMessage(14, 0, "Light, Give me strength")
        pUnit:FullCastSpellOnTarget(41472, pUnit:GetMainTank())
        pUnit:CastSpell(27778)
        pUnit:CastSpell(27779)
        pUnit:CastSpell(1020)
        pUnit:RegisterEvent("DeathKnightKthals_14",1000, 0)
       end
    end
    
    function DeathKnightKthals_14(pUnit,Event)
     if pUnit:GetHealthPct() < 55 then
        pUnit:SendChatMessage(14, 0, "No... My powers... are faiding!")
        pUnit:SetModel(5233)
        pUnit:SetScale(1)
        pUnit:RegisterEvent("DeathKnightKthals_15",1000, 0)
       end
    end
    
    function DeathKnightKthals_15(pUnit,Event)
     if pUnit:GetHealthPct() < 43 then
        pUnit:SendChatMessage(14, 0, "I Will not give up this easily!")
        pUnit:FullCastSpellOnTarget(27085, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(27085, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(18435, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(18435, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_16",1000, 0)
       end
    end
    
    function DeathKnightKthals_16(pUnit,Event)
     if pUnit:GetHealthPct() <36 then
        pUnit:SendChatMessage(14, 0, "This will hurt only for a second!")
        pUnit:FullCastSpellOnTarget(45150, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:RegisterEvent("DeathKnightKthals_17",1000, 0)
       end
    end
    
    function DeathKnightKthals_17(pUnit,Event)
     if pUnit:GetHealthPct() < 30 then
        pUnit:SendChatMessage(14, 0,"There is need of mana for you!")
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:RegisterEvent("DeathKnightKthals_18",1000, 0)
       end
    end
    
    function DeathKnightKthals_18(pUnit,Event)
     if pUnit:GetHealPct() < 22 then
        pUnit:SendChatMessage(14, 0, "Seems like your a mighty ... Good... Time to show you the true power of a DeathKnightKthals!")
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(4))
        pUnit:CastSpellOnTarget(29881, pUnit:GetRandomPlayer(3))
        pUnit:FullCastSpellOnTarget(45150, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:FullCastSpellOnTarget(15743, pUnit:GetMainTank())
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(43110)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:CastSpell(22865)
        pUnit:SendChatMessage(14, 0, "HAHAHAHA THERE IS NO SURVIVING!!!!!")
        pUnit:RegisterEvent("DeathKnightKthals_19",1000, 0)
       end
    end
    
    function DeathKnightKthals_19(pUnit,Event)
     if pUnit:GetHealthPct() < 21 then
        pUnit:SendChatMessage(14, 0, "You.. survived...through that... its... its impossible!!")
        pUnit:RegisterEvent("DeathKnightKthals_20",1000, 0)
       end
    end
    
    function DeathKnightKthals_20(pUnit,Event)
     if pUnit:GetHealthPct() < 18 then
        pUnit:SendChatMessage(14, 0, "Great one... i .. i am sorry..I Cannot win this...")
        pUnit:RegisterEvent("DeathKnightKthals_20",1000, 0)
       end
    end
    
    function DeathKnightKthals_21(pUnit,Event)
     if pUnit:GetHealthPct() < 10 then
        pUnit:SendChatMessage(14, 0, "I must... Kill!")
        pUnit:CastSpellOnTarget(29973, pUnit:GetMainTank())
       end
    end
    
    function Kill_all(pUnit, Event)
        pUnit:CastSpellOnTarget(35354, pUnit:GetRandomPlayer(7))
    end
    
       
    RegisterUnitEvent(94500, 1, "DeathKnightKthals_EnterCombat")
    RegisterUnitEvent(94500, 3, "DeathKnightKthals_OnKill")
    RegisterUnitEvent(94500, 2, "DeathKnightKthals_LeaveCombat")
    RegisterUnitEvent(94500, 4, "DeathKnightKthals_Died")

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. Need LUA Help!
    By Dz The Rage in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-04-2009, 01:21 AM
  3. Need lua help
    By Noobcraft in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-31-2008, 07:13 PM
  4. [Help] i need Lua help with this script...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 25
    Last Post: 03-03-2008, 03:45 PM
All times are GMT -5. The time now is 05:10 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