Boss scripting troubles menu

User Tag List

Results 1 to 4 of 4
  1. #1
    CellPunk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Boss scripting troubles

    Im attempting to create a boss that slowly because immune to all types of damage except Holy damage, and I was wondering how I would go about this. I have it all compiled, but it decides not to work, or say any sort of errors. I think the first problem would be: How do I cast spells on the boss? So far I have

    Code:
    function Boss_OnCombat(pUnit, event)
    pUnit:SendChatMessage(14,0,"You think you can challenge me? The Warrior of Gilneas?!")
    pUnit:RegisterEvent("Balth_Phase2",0,0)
    pUnit:RegisterEvent("Balth_Phase3",0,0)
    pUnit:RegisterEvent("Balth_Phase4",0,0)
    pUnit:RegisterEvent("Balth_Phase5",0,0)
    pUnit:RegisterEvent("Balth_Phase6",0,0)
    end
    
    function Balth_Phase2(pUnit, event)
    if pUnit:GetHealthPct() < 84 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(34308)
    end
    end
    
    function Balth_Phase3(pUnit, event)
    if pUnit:GetHealthPct() < 70 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(39804)
    end
    end
    
    function Balth_Phase4(pUnit, event)
    if pUnit:GetHealthPct() < 56 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(34306)
    end
    end
    
    function Balth_Phase5(pUnit, event)
    if pUnit:GetHealthPct() < 32 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(34309)
    end
    end
    
    function Balth_Phase6(pUnit, event)
    if pUnit:GetHealthPct() < 18 then
    pUnit:RemoveEvents()
    pUnit:FullCastSpell(34311)
    end
    end
    
    function Balth_OnLeaveCombat (pUnit, Event)
    pUnit:SendChatMessage(12,0,"Once again, I have bested you... Inferior beings.")
    pUnit:RemoveEvents()
    end
    
    function Balth_OnDied (pUnit, Event)
    pUnit:SendChatMessage(11,0,"You may have slain me, but I live on.")
    pUnit:RemoveEvents()
    end 
    
    RegisterUnitEvent(100000, 1, "Balth_OnCombat")
    RegisterUnitEvent(100000, 2, "Balth_OnLeaveCombat")
    RegisterUnitEvent(100000, 4, "Balth_OnDied")
    Meaning, when he hits Less than 56% HP, bump it into Phase4 which will remove that search and cast 34306 (Immune to Frost damage) on himself.

    Also, Im getting a server error saying tried to call invalid lua function Balth_OnCombat from ArcEmu (Unit)!, when I have it declared later in the script. Or do I need to declare it first?
    Last edited by CellPunk; 09-15-2009 at 09:07 PM.

    Boss scripting troubles
  2. #2
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, please edit your post and put that script in Code tags.
    E.g.
    Code:
    Hey! I am an Example box o.o


    Secondly, you are using the wrong function.
    You need to do "CastSpell()" not "FullCastSpell()".

    Edit that.

    Thirdly you wrote "Boss_OnCombat" in your script, but you call "Balth_OnCombat" in your bottom function.

    Fix those two issues.

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It's a good first attempt but you should do what AngelSandy said and read a couple more guides on Lua to check what your doing is correct.
    To make mobs imune there are invisible spell auras that you can use, but the easiest and best way is to do it in SQL via going into creature_proto and changing the resistance_1 etc (I cant remember what each one is).

  4. #4
    CellPunk's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by stoneharry View Post
    It's a good first attempt but you should do what AngelSandy said and read a couple more guides on Lua to check what your doing is correct.
    To make mobs imune there are invisible spell auras that you can use, but the easiest and best way is to do it in SQL via going into creature_proto and changing the resistance_1 etc (I cant remember what each one is).
    Alright, Ill try Angel's fix. But problem is if I set the Resistances up, he will be immune to all types of damage instantly, instead of slowly becoming immune. My first script used CastSpell() but it didn't work, so then I attempted FullCast, but I totally missed the fact I named my function and register completely different.

Similar Threads

  1. [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
  2. LUA Boss Script
    By Lindoz12 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 03-04-2008, 02:45 PM
  3. LUA Boss Script Help
    By neurothymia in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-05-2008, 02:57 PM
  4. Lua Boss Script Problems!!
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 01-22-2008, 08:59 PM
  5. [Ascent] Boss Scripts help
    By n0t5ew in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-24-2007, 03:04 PM
All times are GMT -5. The time now is 06:43 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