Lua BossFight Help Request menu

User Tag List

Results 1 to 2 of 2
  1. #1
    hellmix's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua BossFight Help Request

    Hi!
    I am trying to create lua bossfight!
    Can you show me mistakes in script so far?
    Its not ready yet. =P

    Code:
    function boss_OnInSmallRange(unit, event)
    	Unit:SendChatMessage(12, 0, "So, it really was not my imagination on hunger! Finally someone dare to enter 	
    
    	my realm, and face me!")
    	Unit:Emote(13, 100)
    	Unit:Emote(1, 5000)
    end
    
    function boss_OnCombat(unit, event)
    	Unit:Emote(1, 6000)
    	Unit:Emote(26, 1000)
    	Unit:Emote(3, 1000)
    	Unit:SendChatMessage(12, 0, "Ah, yes yes! The brave warrior with his pityful allys! Do you really belive I 	
    
    	am scared of your silly bunch of meat in metal cans?! You fools, run away! No! It is too late!")
    	Unit:Emote(11, 1000)
    	Unit:RegisterEvent("boss_StartToTalk01", 1000, 0)
    end
    
    function boss_StartToTalk01(unit, event)
    	if Unit:GetHealthPct() = 100 then
    	Unit:RemoveEvents()
    	Unit:SetCombatCapable(1)
    	Unit:SetFaction(35)
    	x=Unit:GetX()
    	y=Unit:GetY()
    	z=Unit:GetZ()
    	o=Unit:GetO()
    	Unit:MoveTo(x, y+10, z, o)
    	Unit:SendChatMessage(14, 0, "As you wish! %t ill fight you and your allys")
    	Unit:SendChatMessage(12, 0, "A little preparation before our fight")
    	Unit:Emote(11, 1000)
    	x=Unit:GetX()
    	y=Unit:GetY()
    	z=Unit:GetZ()
    	o=Unit:GetO()
    	Unit:MoveTo(x, y-15, z, o)
    	Unit:SetModel(30810)
    	Unit:SetScale(2)
    	Unit:SendChatMessage(14, 0, "Fallen warriors of the Scourge, GIVE ME YOUR POWERS!")
    	Unit:CastSpell(35874)
    	Unit:SendChatMessage(14, 0, "Fallen mages of the Plague, GIVE ME YOUR POWERS!")
    	Unit:CastSpell(38933)
    	Unit:SendChatMessage(14, 0, "Spirits of fallen Shamans, bless me for this fight!")
    	Unit:CastSpell(61570)
    	else
    	Unit:RegisterEvent("boss_startFight", 1000, 0)
    	end
    end
    
    function boss_startFight(unit, event)
    	Unit:SetCombatCapable(0)
    	Unit:SetFaction(14)
    	Unit:Emote(11, 100)
    	Unit:SendChatMessage(14, 0 , "So, Let's Have Fun!")
    	Unit:RegisterEvent("boss_FightPhases1", 1000, 0)
    end
    
    function boss_FightPhases1(unit, event)
    	if Unit:GetHealthPct() > 70 then
    	Unit:RegisterEvent("boss_FightPhase1", 1000, 0)
    	else
    	Unit:RegisterEvent("boss_FightPhases2", 1000, 0)
    	end
    end
    
    function boss_FightPhase1(unit, event)
    		Choice=math.random (1,5)
    		if Choice==1
    		Unit:RegisterEvent("boss_p1spell1", 60000, 6)
    		if Choice==2
    		Unit:RegisterEvent("boss_p1spell2", 60000, 10)
    		if Choice==3
    		Unit:RegisterEvent("boss_p1spell3", 60000, 2)
    		if Choice==4
    		Unit:RegisterEvent("boss_p1spell4", 60000, 6)
    		if Choice==5
    		unit:RegisterEvent("boss_p1spell5", 60000, 20)
    	end
    end
    
    function boss_p1spell1(unit, event)
    	Unit:SendChatMessage(42, 0, "Burn you silly Insects!")
    	Unit:CastSpell(31994)
    end
    
    function boss_p1spell2(unit, event)
    	Unit:FullCastSpellOnTarget(40832, Unit:GetClosestPlayer())
    end
    
    function boss_p1spell3(unit, event)
    	Unit:Emote(15, 1000)
    	Unit:SendChatMessage(41, 0, "I CAN'T HOLD POWER INSIDE ANYMORE! WAAAAHHHHHHHHHH!!!!!!!!!!!!!!")
    	Unit:CastSpell(40018)
    end
    
    function boss_p1spell4(unit, event)
    	Unit:FullCastSpellOnTarget(31972, Unit:GetRandomPlayer(0))
    end
    
    function boss_p1spell5(unit, event)
    	Unit:CastSpell(29765)
    	Unit:CastSpell(19777)
    end
    
    function boss_FightPhases2(unit, event)
    	if Unit:GetHealthPct() > 50 then
    	Unit:SendChatMessage(14, 0, "Prepare to feel the Power of Shadow!")
    	Unit:CastSpell(24742)
    	x=Unit:GetX()
    	y=Unit:GetY()
    	z=Unit:GetZ()
    	o=Unit:GetO()
    	Unit:MoveTo(x, y, z+10, o)
    	Unit:Emote(444, 0)
    	Unit:CastSpell(41142)
    	Unit:RegisterEvent("boss_FightPhase2", 1000, 0)
    	else
    	Unit:RegisterEvent("boss_FightPhases3", 1000, 0)
    	end
    end
    
    function boss_FightPhase2(unit, event)
    	Choice=math.random (1,3)
    	if Choice==1
    	Unit:RegisterEvent("boss_p2spell1, 60000, 6)
    	if Choice==2
    	Unit:RegisterEvent("boss_p2spell2, 60000, 30)
    	if Choice==3
    	Unit:RegisterEvent("boss_p2spell3, 60000, 30)
    	end
    end
    
    function boss_p2spell1(unit, event)
    	Unit:FullCastSpellOnTarget(63038, Unit:GetRandomPlayer(2))
    	Unit:FullCastSpellOnTarget(63038, Unit:GetRandomPlayer(3))
    	Unit:SendChatMessage(14, 0, "Closer.... Come Closer!")
    /script PlaySoundFile("Sound\\Creature\\KelidanTheBreaker\\HELL_Keli_Burn01.wav")
    	Unit:CastSpellOnTarget(31345, Unit:GetMainTank())
    end
    
    function boss_p2spell2(unit, event)
    	Unit:CastSpell(40314)
    	Unit:FullCastSpellOnTarget(40255, Unit:GetRandomPlayer(3))
    end
    
    function boss_FightPhases3(unit, event)
    	if Unit:GetHealthPct() >= 25 then
    	Unit:SendChatMessage(14, 0, "
    	Unit:RegisterEvent("boss_FightPhase3(unit,event)
    	else
    	Unit:RegisterEvent("boss_FightPhases4(unit, event)
    	end
    end
    
    	
    
    Unit:RegisterEvent(99001, 10, "boss_OnInSmallRange")
    Unit:RegisterEvent(99001, 1, "boss_OnCombat")
    Unit:RegisterEvent(99000, 18, "boss_OnLoad")
    Last edited by hellmix; 10-30-2009 at 05:05 PM.

    Lua BossFight Help Request
  2. #2
    mag1212's Avatar Active Member
    Reputation
    55
    Join Date
    Aug 2009
    Posts
    352
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [WRONG SECTION]use subforums

Similar Threads

  1. LUA Help Request
    By erebos in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 09-26-2008, 01:54 PM
  2. [HELP/Request] LUA Script
    By Babbaa in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-29-2008, 07:34 AM
  3. [help/request] I need trainers for 2.3 lol
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-28-2007, 12:39 PM
  4. Getting A Friend Connected (Help Request)
    By Magnusvermis in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-07-2007, 11:57 PM
  5. Help Request
    By sirios in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 10-14-2007, 12:47 PM
All times are GMT -5. The time now is 01:26 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