Phased bossfight not working... menu

User Tag List

Results 1 to 3 of 3
  1. #1
    tyeeeee1's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Phased bossfight not working...

    Well I have absolutely no idea what's going wrong with this script. It doesn't show any errors in the world.exe, and I haven't been very successful at fixing this. Any help is appreciated (and +reped)
    Code:
    local NAME = "Elite Boss"
    local NPCID = 500026
    
    function Elite_OnCombat(pUnit, event, player)
     Elite=pUnit
     pUnit:SendChatMessage(14, 0, "Feel the earth's wrath!")
     pUnit:RegisterEvent("Elite_Phase1", 1000, 1) ----- Here is the Very First Phase.
     end
    
    function Elite_OnLeaveCombat(pUnit, event, player)
     pUnit:RemoveEvents() 
     pUnit:SendChatMessage(14, 0, "Puny mortal, you are no match for the makers!")
    end
    
    function Elite_OnDeath(pUnit, event, player)
     pUnit:RemoveEvents()
    end
    
    function Elite_Phase1(pUnit, event, player)
    	local hp = pUnit:GetHealth()
    	if (hp <= 725000) then
    		Elite:SendChatMessage(14, 0, "I see that you must really want to die!")
    		Elite:CastSpell (30926)
    		Elite:RegisterEvent("Elite_Phase2", 1000, 1)
    	end 
    end
    
    function Elite_Phase2(pUnit, event, player) -- Here is the seond phase
    	local hp = pUnit:GetHealth()
    	if (hp <= 666666) then 
    		Elite:SendChatMessage(14, 0, "Prepare for pain!")
    		Elite:CastSpell (53791)
    		Elite:CastSpell (41107)
    		Elite:CastSpell (19636)
    	end 
    end
    
    RegisterUnitEvent(500026, 1, "Elite_OnCombat")
    RegisterUnitEvent(500026, 2, "Elite_OnLeaveCombat")
    RegisterUnitEvent(500026, 3, "Elite_OnDeath")

    Phased bossfight not working...
  2. #2
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local NAME = "Elite Boss"
    local NPCID = 500026
    
    function Elite_OnCombat(pUnit, event, player)
     Elite=pUnit
     pUnit:SendChatMessage(14, 0, "Feel the earth's wrath!")
     pUnit:RegisterEvent("Elite_Phase1", 1000, 0) --checks every sec
     end
    
    function Elite_OnLeaveCombat(pUnit, event, player)
     pUnit:RemoveEvents() 
     pUnit:SendChatMessage(14, 0, "Puny mortal, you are no match for the makers!")
    end
    
    function Elite_OnDeath(pUnit, event, player)
     pUnit:RemoveEvents()
    end
    
    
    function Elite_Phase1(pUnit, event, player)
    	local hp = pUnit:GetHealth()
    	if (hp <= 725000) then
                    Elite:RemoveEvents()
    		Elite:SendChatMessage(14, 0, "I see that you must really want to die!")
    		Elite:CastSpell (30926)
    		Elite:RegisterEvent("Elite_Phase2", 1000, 0)
    	end
    end
    
    function Elite_Phase2(pUnit, event, player) -- Here is the seond phase
    	local hp = pUnit:GetHealth()
    	if (hp <= 666666) then
                    Elite:RemoveEvents()
    		Elite:SendChatMessage(14, 0, "Prepare for pain!")
    		Elite:CastSpell (53791)
    		Elite:CastSpell (41107)
    		Elite:CastSpell (19636)
    	end 
    end
    
    RegisterUnitEvent(500026, 1, "Elite_OnCombat")
    RegisterUnitEvent(500026, 2, "Elite_OnLeaveCombat")
    RegisterUnitEvent(500026, 3, "Elite_OnDeath")
    try that.

    by the way, instead of

    Code:
    	local hp = pUnit:GetHealth()
    	if (hp <= 725000) then
    you can use
    Code:
    if pUnit:GetHealthPct() <= 50 then
    for example, if the event should trigger at 50%.
    Last edited by Kaidos; 08-15-2010 at 08:25 PM.

  3. #3
    tyeeeee1's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ^.^ Thx for fixing up te script for me & for the alternative code to use.
    +rep

Similar Threads

  1. [Lua]Boss phases not working, NEED PRO HELP!!
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-23-2008, 02:30 PM
  2. DBC editing not working anymore?
    By Charade in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 12-13-2006, 01:37 PM
  3. Wow glider is not working..
    By dragonmonster in forum World of Warcraft General
    Replies: 0
    Last Post: 10-24-2006, 06:29 PM
  4. weird model edits not working :S
    By nozzie in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 10-20-2006, 08:51 AM
  5. WoW Glider, key not working?
    By Shadowman2418 in forum World of Warcraft General
    Replies: 3
    Last Post: 07-28-2006, 03:49 AM
All times are GMT -5. The time now is 11:10 PM. 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