Need help with LUA Boss please! menu

User Tag List

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

    Need help with LUA Boss please!

    Hey all.. im making a boss that is supposed to shout things out, cast spells etc, and i think i got my LUA script to work, Arcemu doesnt give me any LUA errors when LuaHypArc loads up anyway. So i go in-game and i spawn my boss and i attack it, but it never does anything except attack me? I dont know if the script didnt get loaded or if i did something wrong. Here it is:

    Code:
    -- Epic Boss Fight
    
    	--Functions
    	function Random_OnCombat(pUnit, Event)
    		pUnit:SendChatMessage(14, 0, "FOOLS! Your pathetic armor and weaponry is no match for the power of the SCOURGE!")
    		pUnit:RegisterEvent("Combat_Buff", 1000, 0)
    		end
    		
    		function Combat_Buff(pUnit, Event)
    			pUnit:FullCastSpell(55336)
    			end
    			
    		
    		function Rage_Start(pUnit, Event)
    		if pUnit:GetHealthPct(75)then 
    		 pUnit:RemoveEvents()
    		 pUnit:SetScale(1.2)
    		 pUnit:FullCastSpell(6742)
    		 pUnit:SendChatMessage(14, 0, "Ha! You think I'm going to let your pathetic efforts thwart me?!")
    	     end	
    		
    		
    		function Random_OnLeave(pUnit, Event)
    		pUnit:SendChatMessage(14, 0, "Yes! Run you pathetic scum! You are worthless in the eyes of the undead!")
    		pUnit:RemoveEvent()
    		end
    		
    		function Random_OnDie(pUnit, Event)
    		pUnit:SendChatMessage(14, 0, "I.. am.. released... master... Forgive me my lord!")
    		end
    		
    		function Random_OnTargetDie(pUnit, Event)
    		pUnit:SendChatMessage(14, 0, "Your soul will find no rest here!")
    		end
    		
    		--RegisterUnitEvents
    		RegisterUnitEvent(96000, 1, "Random_OnCombat")
    		RegisterUnitEvent(96000, 2, "Random_OnLeave")
    		RegisterUnitEvent(96000, 4, "Random_OnDie")
    		RegisterUnitEvent(96000, 3, "Random_OnTargetDie")
    		RegisterUnitEvent(96000, 5, "Rage_Start") 
    		end
    If someone could point out what is wrong or give me some tips that would be great, thanks.

    Need help with LUA Boss please!
  2. #2
    blukkiee's Avatar Active Member
    Reputation
    18
    Join Date
    Jun 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You sure the script is linked to the (right) NPC?

  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)
    As blukkiee said, make sure the npc id is 96000.
    You've registered your event wrong, correct way is:

    Code:
    
    
    Code:
    -- Epic Boss Fight
    
        --Functions
        function Random_OnCombat(pUnit, Event)
            pUnit:SendChatMessage(14, 0, "FOOLS! Your pathetic armor and weaponry is no match for the power of the SCOURGE!")
            pUnit:RegisterEvent("Combat_Buff", 1000, 1) -- You only want to do this once so change 0 to 1
            pUnit:RegisterEvent("Rage_Start", 2000, 0) -- remember this?
            end
            
            function Combat_Buff(pUnit, Event)
                pUnit:FullCastSpell(55336)
                end
                
            
            function Rage_Start(pUnit, Event)
            if pUnit:GetHealthPct(75)then 
             pUnit:RemoveEvents()
             pUnit:SetScale(1.2)
             pUnit:FullCastSpell(6742)
             pUnit:SendChatMessage(14, 0, "Ha! You think I'm going to let your pathetic efforts thwart me?!")
             end    
            
            
            function Random_OnLeave(pUnit, Event)
            pUnit:SendChatMessage(14, 0, "Yes! Run you pathetic scum! You are worthless in the eyes of the undead!")
            pUnit:RemoveEvent()
            end
            
            function Random_OnDie(pUnit, Event)
            pUnit:SendChatMessage(14, 0, "I.. am.. released... master... Forgive me my lord!")
            end
            
            function Random_OnTargetDie(pUnit, Event)
            pUnit:SendChatMessage(14, 0, "Your soul will find no rest here!")
            end
            
            --RegisterUnitEvents
            RegisterUnitEvent(96000, 1, "Random_OnCombat")
            RegisterUnitEvent(96000, 2, "Random_OnLeave")
            RegisterUnitEvent(96000, 4, "Random_OnDie")
            RegisterUnitEvent(96000, 3, "Random_OnTargetDie")
            end


Similar Threads

  1. Need help with private server! PLEASE look!
    By Linkmaster007 in forum World of Warcraft General
    Replies: 3
    Last Post: 06-17-2009, 04:45 AM
  2. Need help with LUA Hearthstone 3.1.1
    By andreasv18_2005 in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 05-16-2009, 08:13 AM
  3. Need help with LUA
    By marcelo_20xx in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 11-29-2008, 11:22 AM
  4. Need help with LUA
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 02-28-2008, 12:54 PM
All times are GMT -5. The time now is 04:44 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