[Help] Lua boss script menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Lua boss script

    Echoes helped me create a boss script, but, however, it's not working as intended.

    Here's the script if you want to look at it.
    Code:
    function grom_entercombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Fools! You dare to attack Grom Hellscream?!")
    pUnit:RegisterEvent("grom_sunder", 10000, 0)
    pUnit:RegisterEvent("grom_charge", 30000, 0)
    end
    
    function grom_sunder(pUnit, Event)
    pUnit:FullCastSpellOnTarget(30901, GetMainTank())
    end
    
    function grom_charge(pUnit, Event)
    pUnit:FullCastSpellOnTarget(36833, GetRandomPlayer(0))
    end
    
    function grom_phase2(pUnit, Event)
    pUnit:RemoveEvents()
    if pUnit:GetHealthPct() < 75 then
    pUnit:FullCastSpell(16592)
    pUnit:RegisterEvent("grom_pull", 10000, 0)
    pUnit:RegisterEvent("grom_blast", 11000, 0)
    end
    end
    
    function grom_pull(pUnit, Event)
    pUnit:FullCastSpell(29979)
    pUnit:SendChatMessage(14, 0, "Burn!")
    end
    
    function grom_blast(pUnit, Event)
    pUnit:FullCastSpell(33933)
    end
    
    function grom_phase3(pUnit, Event)
    if pUnit:GetHealthPct() < 15 then
    pUnit:SendChatMessage(14, 0, "You shall die right here, right now!")
    pUnit:FullCastSpell(23505)
    end
    end
    
    function grom_leavecombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function grom_onkilledtarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Gotcha!")
    end
    
    function grom_die(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "This can't.. be.. the end..")
    end
    
    RegisterUnitEvent(500003, 1, "grom_entercombat")
    RegisterUnitEvent(500003, 2, "grom_leavecombat")
    RegisterUnitEvent(500003, 3, "grom_onkilledtarget")
    RegisterUnitEvent(500003, 4, "grom_die")
    RegisterUnitEvent(500003, 1, "grom_phase2")
    RegisterUnitEvent(500003, 1, "grom_phase3")


    [Help] Lua boss script
  2. #2
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exaclty isn't working?
    Is the script loading up correctly?

  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)
    You have several stages that loads on "OnCombat". When I last did this, it bugged me the way out to mars. Also, have you lua enabled in your config files?

  4. #4
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's loading perfectly and I have lua enabled, only thing that's not working is the spells. None of them works. However, chat worked previously, but not anymore.

    I have it in my scripts folder, there's no error while loading it. Only the boss never casts the spells.

  5. #5
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    function grom_entercombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Fools! You dare to attack Grom Hellscream?!")
    pUnit:RegisterEvent("grom_sunder", 10000, 0)
    pUnit:RegisterEvent("grom_charge", 30000, 0)
    end

    function grom_sunder(pUnit, Event)
    pUnit:FullCastSpellOnTarget(30901, GetMainTank())
    end

    function grom_charge(pUnit, Event)
    pUnit:FullCastSpellOnTarget(36833, GetRandomPlayer(0))
    end

    function grom_phase2(pUnit, Event)
    pUnit:RemoveEvents()
    if pUnit:GetHealthPct() < 75 then
    pUnit:FullCastSpell(16592)
    pUnit:RegisterEvent("grom_pull", 10000, 0)
    pUnit:RegisterEvent("grom_blast", 11000, 0)
    end
    end

    function grom_pull(pUnit, Event)
    pUnit:FullCastSpell(29979)
    pUnit:SendChatMessage(14, 0, "Burn!")
    end

    function grom_blast(pUnit, Event)
    pUnit:FullCastSpell(33933)
    end

    function grom_phase3(pUnit, Event)
    if pUnit:GetHealthPct() < 15 then
    pUnit:SendChatMessage(14, 0, "You shall die right here, right now!")
    pUnit:FullCastSpell(23505)
    end
    end

    function grom_leavecombat(pUnit, Event)
    pUnit:RemoveEvents()
    end

    function grom_onkilledtarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Gotcha!")
    end

    function grom_die(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "This can't.. be.. the end..")
    end

    RegisterUnitEvent(500003, 1, "grom_entercombat")
    RegisterUnitEvent(500003, 2, "grom_leavecombat")
    RegisterUnitEvent(500003, 3, "grom_onkilledtarget")
    RegisterUnitEvent(500003, 4, "grom_die")
    RegisterUnitEvent(500003, 1, "grom_phase2")
    RegisterUnitEvent(500003, 1, "grom_phase3")


    As you can see in the orange. You have registered the two phases
    with "EnterCombat".

    As you see in the blue, the two phases BLOCKS the first one (blue text) to
    fully regsiter. If you remove the orange, I'm sure he'll cast the two spells you've registered in the function "EnterCombat".

  6. #6
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So if I remove those 2, wouldn't they need to be registered in some other way then?

  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)
    You can register them inside the entercombat function. Just like you done with the spells

  8. #8
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not me who coded it, but I'll let Echoes (who coded it) know.

  9. #9
    Battle Chicken's Avatar Member
    Reputation
    12
    Join Date
    Oct 2006
    Posts
    94
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function grom_entercombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Fools! You dare to attack Grom Hellscream?!")
    pUnit:RegisterEvent("grom_sunder", 10000, 0)
    pUnit:RegisterEvent("grom_charge", 30000, 0)
    pUnit:RegisterEvent("grom_phase2", 1000, 0)
    end
    
        function grom_sunder(pUnit, Event)
        pUnit:FullCastSpellOnTarget(30901, GetMainTank())
        end
    
        function grom_charge(pUnit, Event)
        pUnit:FullCastSpellOnTarget(36833, GetRandomPlayer(0))
        end
    
    function grom_phase2(pUnit, Event)
    if pUnit:GetHealthPct() < 75 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(16592)
    pUnit:RegisterEvent("grom_pull", 10000, 0)
    pUnit:RegisterEvent("grom_blast", 11000, 0)
    pUnit:RegisterEvent("grom_phase3", 1000, 0)
    end
    end
    
        function grom_pull(pUnit, Event)
        pUnit:FullCastSpell(29979)
        pUnit:SendChatMessage(14, 0, "Burn!")
        end
    
        function grom_blast(pUnit, Event)
        pUnit:FullCastSpell(33933)
        end
    
    function grom_phase3(pUnit, Event)
    if pUnit:GetHealthPct() < 15 then
    pUnit:SendChatMessage(14, 0, "You shall die right here, right now!")
    pUnit:FullCastSpell(23505)
    end
    end
    
    function grom_leavecombat(pUnit, Event)
    pUnit:RemoveEvents()
    end
    
    function grom_onkilledtarget(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Gotcha!")
    end
    
    function grom_die(pUnit, Event)
    pUnit:RemoveEvents()
    pUnit:SendChatMessage(14, 0, "This can't.. be.. the end..")
    end
    
    RegisterUnitEvent(500003, 1, "grom_entercombat")
    RegisterUnitEvent(500003, 2, "grom_leavecombat")
    RegisterUnitEvent(500003, 3, "grom_onkilledtarget")
    RegisterUnitEvent(500003, 4, "grom_die")
    Should work, fixed phase 2 aswell, having the removeevents() before the if statement means it would remove events even if the phase wasnt to be loaded.

  10. #10
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I'll test it when I get home.

Similar Threads

  1. [HELP] LUA Boss Script
    By Babbaa in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 07-30-2008, 07:21 AM
  2. [Help] LUA boss script error.
    By arthars1 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-09-2008, 08:23 PM
  3. [help] LUA boss script
    By arthars1 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-08-2008, 07:11 PM
  4. [HELP] Lua boss script not working-solutions?
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 03-21-2008, 08:19 AM
  5. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
All times are GMT -5. The time now is 12:01 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